Copier template for Python libraries in the bedrock-python organization.
# Install copier
pip install copier
# Create a new library
copier copy gh:bedrock-python/python-library-template my-new-lib
cd my-new-libCopier will prompt for:
| Variable | Description | Example |
|---|---|---|
project_name |
Display name | my-library |
project_slug |
PyPI package name (kebab-case) | my-library |
package_name |
Python import name (snake_case) | my_library |
project_description |
One-line description | A great library |
author_name |
Author full name | Alex Shalaev |
author_email |
Author email | you@example.com |
github_org |
GitHub org or username | bedrock-python |
python_min_version |
Minimum Python version | 3.11 |
initial_version |
Initial version | 0.0.0 |
# Install dependencies
uv sync --group dev
# Install pre-commit hooks
uv run pre-commit install --hook-type commit-msg
# Verify everything works
make checkThen:
- Create a GitHub repo:
gh repo create bedrock-python/my-library --public - Configure repo (after the first CI pass, then delete the script):
Idempotent. Sets the org standard:
python scripts/setup_repo.py bedrock-python/my-library git rm scripts/setup_repo.py .claude/LIBRARY_CREATION.md
pypi/github-pagesenvironments and Pages, read-only workflow tokens, squash/merge-commit only with branches deleted on merge, secret scanning + push protection + Dependabot security updates + private vulnerability reporting, topics frompyprojectkeywords, and amasterruleset (pull requests only, no force-push or deletion, "All checks passed" required). - Push (
⚠️ noCo-Authored-By:in commits!):git init && git add . && git commit -m "feat: initial release" && git push -u origin master
- Set up PyPI Trusted Publisher at pypi.org/manage/account/publishing/
- Add
CODECOV_TOKENsecret in repo Settings → Secrets → Actions
See .claude/LIBRARY_CREATION.md for important rules:
- Never add AI agents as co-authors in commits
- Delete
scripts/setup_repo.pybefore initial commit - Start with version
0.0.0(Release Please creates0.1.0)
pyproject.toml— uv + hatchling + ruff + mypy + pytestMakefile— fmt, check, test-unit, test-integration, test, build, docs-serve, docs-build.github/workflows/— CI (lint + unit + integration), publish to PyPI, deploy docs, Release Please.github/— dependabot, issue templates, PR templatedocs/— zensical (MkDocs Material) setup with mkdocstrings, a Copy page control that hands any page to an LLM as Markdown, anddocs/agents.md, the one-page brief for coding assistants (ships as a skeleton — fill it in).pre-commit-config.yaml— ruff, mypy, conventional commitsrelease-please-config.json— automated semver + CHANGELOG generation