source
Entry point for cookiecutter templates.
Classes¶
Functions¶
get_template_repo
¶
get_template_repo(
url: str,
local_path: Optional[Path] = None,
checkout: Optional[str] = None,
password: Optional[str] = None,
) -> TemplateRepo
Get a template repository from a URL.
Parameters:
url
-
The string from the template field in the composition file.
TYPE:
str
local_path
-
Used to resolve local paths.
DEFAULT:
None
checkout
-
The branch, tag or commit to check out after git clone
DEFAULT:
None
password
-
The password to use if template is a password-protected Zip archive.
DEFAULT:
None
Returns:
-
TemplateRepo
-
A TemplateRepo object.
identify_repo
¶
identify_repo(
url: str, local_path: Optional[Path] = None
) -> Tuple[TemplateFormat, Locality]
Identify the repo format and locality from the URL.
resolve_local_path
¶
resolve_local_path(
url: str, local_path: Optional[Path] = None
) -> Path