cookiecutter_python.backend package

Subpackages

Submodules

cookiecutter_python.backend.check_server_result module

class cookiecutter_python.backend.check_server_result.CheckWebServerResult[source]

Bases: ABC

Interface for checking the result of a web server request.

abstract property future
abstract property name: str

The name of the resource requested to search on the web server.

Returns:

the name of the resource (ie python package slug, rtd project)

Return type:

str

abstract property service_name: str

The name of the web server.

Returns:

the name (slug) of the web server

Return type:

str

cookiecutter_python.backend.gen_docs_common module

Internal configuration for Documentation Generation.

cookiecutter_python.backend.gen_docs_common.get_docs_gen_internal_config() Dict[str, str][source]

Derive the internal configuration for Documentation Generation.

Information included:
  • the folder where we each docs builder will generate the docs. We locate the template folder for each docs builder, which is the Single Source of Truth for the docs builder’s output folder.

cookiecutter_python.backend.helpers module

cookiecutter_python.backend.helpers.parse_context(config_file: str)[source]

cookiecutter_python.backend.load_config module

exception cookiecutter_python.backend.load_config.InvalidYamlFormatError[source]

Bases: Exception

exception cookiecutter_python.backend.load_config.UserYamlDesignError[source]

Bases: Exception

cookiecutter_python.backend.load_config.get_interpreters_from_yaml(config_file: str) Mapping[str, Sequence[str]] | None[source]

Parse the ‘interpreters’ variable out of the user’s config yaml file.

Parameters:

config_file (str) – path to the user’s config yaml file

Raises:
Returns:

dictionary with intepreters as a sequence of strings,

mapped to the ‘supported-interpreters’ key

Return type:

GivenInterpreters

cookiecutter_python.backend.load_config.load_yaml(config_file) MutableMapping[source]

cookiecutter_python.backend.main module

cookiecutter_python.backend.main.generate(no_input=False, offline=False, extra_context=None, replay=False, overwrite=False, output_dir='.', config_file=None, skip_if_file_exists=False, default_config=False, password=None, directory=None, checkout=None) str[source]

Create Python Project, with CI/CD pipeline, from the project template.

Generate/Scaffold a new Python Project, including configuration enabling automations such as CI and Continuous Delivery of Docker and Python ‘artifacts’, and Continuous Documentation of the Python Project.

cookiecutter_python.backend.post_main module

exception cookiecutter_python.backend.post_main.CheckWebServerError[source]

Bases: Exception

Raised on Connection Error, when Requesting a Web Server’s Future.

cookiecutter_python.backend.post_main.post_main(request)[source]

Check if any CI ‘deployment’ (ie in pypi), would require minor tweak.

cookiecutter_python.backend.pre_main module

cookiecutter_python.backend.pre_main.pre_main(request)[source]

Do preparatory steps Generation process, by settings things as the Template Context.

Parameters:

**kwargs – Arbitrary keyword arguments.

cookiecutter_python.backend.proxy module

class cookiecutter_python.backend.proxy.BaseProxy(proxy_subject: ProxySubject)[source]

Bases: Proxy[T], Generic[T]

static log_info_args(message: str, *args, **kwargs) Tuple[str, str][source]

cookiecutter_python.backend.request module

class cookiecutter_python.backend.request.Request(*, config_file: str, default_config: bool, web_servers: List[str], no_input: bool, extra_context: dict, check: Any | None = None, check_results: None | Iterable[CheckWebServerResult] = None, offline: bool = False)[source]

Bases: object

check: Any
check_results: None | Iterable[CheckWebServerResult]
config_file: str
default_config: bool
extra_context: dict
no_input: bool
offline: bool
web_servers: List[str]

cookiecutter_python.backend.user_config_proxy module

Module contents

exception cookiecutter_python.backend.CheckWebServerError[source]

Bases: Exception

Raised on Connection Error, when Requesting a Web Server’s Future.

cookiecutter_python.backend.generate(no_input=False, offline=False, extra_context=None, replay=False, overwrite=False, output_dir='.', config_file=None, skip_if_file_exists=False, default_config=False, password=None, directory=None, checkout=None) str[source]

Create Python Project, with CI/CD pipeline, from the project template.

Generate/Scaffold a new Python Project, including configuration enabling automations such as CI and Continuous Delivery of Docker and Python ‘artifacts’, and Continuous Documentation of the Python Project.

cookiecutter_python.backend.get_docs_gen_internal_config() Dict[str, str][source]

Derive the internal configuration for Documentation Generation.

Information included:
  • the folder where we each docs builder will generate the docs. We locate the template folder for each docs builder, which is the Single Source of Truth for the docs builder’s output folder.