API Reference
Public package exports for the template library.
- class drc_python_template.ProjectBlueprint(name, package_name, python_version='3.12', include_docs=True, include_examples=True, toolchain=('ruff', 'mypy', 'pytest', 'sphinx'))[source]
Bases:
objectDescribe the baseline choices captured by the template.
- Parameters:
name – The distribution name used for packaging.
package_name – The Python import package name.
python_version – The minimum supported Python version line.
include_docs – Whether the repository ships with docs scaffolding.
include_examples – Whether the repository ships with example scripts.
toolchain – The default local quality and documentation tools.
- include_docs
- include_examples
- name
- package_name
- python_version
- summary_lines()[source]
Return a compact, human-readable project summary.
- Returns:
A tuple of display lines that can be printed directly.
- toolchain
- drc_python_template.build_default_blueprint(project_name, package_name=None)[source]
Build a default project blueprint for the template repository.
- Parameters:
project_name – The distribution or repository name.
package_name – An optional explicit import package name.
- Returns:
A populated project blueprint.
- drc_python_template.describe_project(blueprint)[source]
Render a blueprint into a printable multi-line description.
- Parameters:
blueprint – The project blueprint to describe.
- Returns:
A newline-delimited description string.
- drc_python_template.normalize_package_name(name)[source]
Convert a project name into a valid import package token.
- Parameters:
name – An arbitrary project or distribution name.
- Returns:
A normalized, underscore-separated package token.
- Raises:
ValueError – Raised when the normalized name would be empty.