tlc.core.helpers.project_helper¶
Helper methods for project-level operations beyond layout/path construction.
Module Contents¶
Classes¶
Class |
Description |
|---|---|
Helper methods for project-level operations. |
API¶
- class ProjectHelper¶
Helper methods for project-level operations.
This class provides static helpers for project functionality that goes beyond URL/path construction (which lives in
ProjectLayout).- static register_project_url_alias(
- token: str,
- path: str | Url,
- *,
- project_name: str | None = None,
- root_url: Url | str | None = None,
- force: bool = True,
Register and persist a URL alias for a project.
A project URL alias is a per-project alias that is persisted in the project’s configuration file and will be loaded for other users that share the same project but not necessarily the same startup-config. The alias is also registered in the current session and is immediately available for use.
- Parameters:
token – The alias token to register. Must match the regex [A-Z][A-Z0-9_]*.
path – The path to alias.
project_name – The project name.
root_url – The root URL.
force – If True, force the registration of the alias even if it is already registered.
- Raises:
ValueError – If the token is already registered and force is False.