cookiecutter_python.hooks package

Submodules

cookiecutter_python.hooks.pre_gen_project module

exception cookiecutter_python.hooks.pre_gen_project.InputSanitizationError[source]

Bases: Exception

cookiecutter_python.hooks.pre_gen_project.get_request()[source]
cookiecutter_python.hooks.pre_gen_project.hook_main(request)[source]
cookiecutter_python.hooks.pre_gen_project.input_sanitization(request)[source]
cookiecutter_python.hooks.pre_gen_project.main()[source]

cookiecutter_python.hooks.post_gen_project module

Cookiecutter post generation hook script that handles operations after the template project is used to generate a target project.

cookiecutter_python.hooks.post_gen_project.CLI_ONLY(x)
cookiecutter_python.hooks.post_gen_project.PYTEST_PLUGIN_ONLY(x)
exception cookiecutter_python.hooks.post_gen_project.PostFileRemovalError[source]

Bases: Exception

cookiecutter_python.hooks.post_gen_project.exception(subprocess_exception: subprocess.CalledProcessError)[source]
cookiecutter_python.hooks.post_gen_project.get_request()[source]
cookiecutter_python.hooks.post_gen_project.git_commit(request)[source]

Commit the staged changes in the generated project.

cookiecutter_python.hooks.post_gen_project.grant_basic_permissions(project_dir: str)[source]
cookiecutter_python.hooks.post_gen_project.initialize_git_repo(project_dir: str)[source]

Initialize the Git repository in the generated project.

cookiecutter_python.hooks.post_gen_project.is_git_repo_clean(project_directory: str)[source]

Check to confirm if the Git repository is clean and has no uncommitted changes. If its clean return True otherwise False.

cookiecutter_python.hooks.post_gen_project.iter_files(request)[source]
cookiecutter_python.hooks.post_gen_project.main()[source]
cookiecutter_python.hooks.post_gen_project.post_file_removal(request)[source]
cookiecutter_python.hooks.post_gen_project.post_hook()[source]
cookiecutter_python.hooks.post_gen_project.run_process_python36_n_below(*args, **kwargs)[source]
cookiecutter_python.hooks.post_gen_project.run_process_python37_n_above(*args, **kwargs)[source]
cookiecutter_python.hooks.post_gen_project.subprocess_run(*args, **kwargs)[source]

Module contents