Skip to main content

packright

Automate Python package development the right way — inspired by R's usethis.

Installation

pip install packright

Quickstart

# Create a new package with all conventions in place
packright scaffold my-analytics-lib
cd my-analytics-lib
uv sync
uv run pytest

This creates a complete package with src/ layout, errors.py, _messages.py, tests, docs, CI — all conventions in place, passing 22/22 checks.

Commands

Create

Command What it does
packright scaffold <name> Create a complete package from scratch
packright init Interactive project setup (prompts for name, author, license)
packright use-module <name> Create a paired module + test file

Configure

Command What it does
packright use-pytest Add pytest config + test structure
packright use-mkdocs Add mkdocs-material documentation
packright use-pre-commit Add pre-commit hooks (ruff, mypy)
packright use-ruff Add ruff linter/formatter config
packright use-mypy Add mypy strict config + py.typed
packright use-coverage Add coverage.py config
packright use-rich Add _messages.py for structured output
packright use-errors Add errors.py exception hierarchy

Integrate

Command What it does
packright use-github-actions Add CI, release, and docs workflows
packright use-gitlab-ci Add GitLab CI pipeline
packright use-git Init git + .gitignore + initial commit
packright use-github Create GitHub repo via gh CLI
packright use-docker Add Dockerfile + .dockerignore

Manage

Command What it does
packright use-license Add LICENSE file (MIT)
packright use-readme Generate README with badges
packright use-changelog Add CHANGELOG.md
packright use-contributing CONTRIBUTING + CODE_OF_CONDUCT + issue templates
packright use-dep <name> Add a dependency
packright use-dev-dep <name> Add a dev dependency
packright bump-version <part> Bump version (major/minor/patch)

Inspect

Command What it does
packright check Audit project against 22 conventions
packright doctor Check development environment (uv, git, gh, ruff)
packright browse-pypi Open PyPI page in browser
packright browse-github Open GitHub repo in browser
packright browse-docs Open docs site in browser

Examples

# Start from scratch
packright scaffold my-lib
cd my-lib

# Or add to an existing project piece by piece
packright use-pytest
packright use-ruff
packright use-pre-commit
packright use-github-actions

# Check what's missing
packright check

# Add a new feature module
packright use-module auth

# Bump version and release
packright bump-version minor
git tag v0.2.0
git push --tags  # CI publishes to PyPI

Philosophy

packright follows the python-package-development skill conventions — 5 principles from R's package ecosystem applied to Python:

  1. User communication is first-class — rich, not print()
  2. Function names form a grammar — verb_noun() patterns
  3. Lifecycle deserves ceremony — formal deprecation process
  4. Documentation lives next to code — Google docstrings + mkdocs
  5. There is a whole game — scaffold first, refine later

Metadata

Release files for packright 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for packright 0.1.0
File Size Uploaded Provenance Actions
packright-0.1.0.tar.gz 34.4 kB Without provenance Details for packright-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for packright 0.1.0
File Interpreter ABI Platform Actions
packright-0.1.0-py3-none-any.whl Python 3 none any Details for packright-0.1.0-py3-none-any.whl

Total release size: 78.5 kB

Release files / packright-0.1.0.tar.gz

Download URL packright-0.1.0.tar.gz
Size 34.4 kB
Tags Source
SHA-256 checksum
How to use checksums
9c1b043fbaf3fc135ffff7d7fdf01b818d54ae0981870770f371bdf66e5c19a1
BLAKE2b-256 checksum
How to use checksums
96dd7985bba87e014c1e1d1b40855345d8aa15d3993dae41dc8f06a4a1e3de21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / packright-0.1.0-py3-none-any.whl

Download URL packright-0.1.0-py3-none-any.whl
Size 44.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e5a9aca9070582294cba6cd960b510be6e5a684ffefa67c7b4f86b4c79cc9cf4
BLAKE2b-256 checksum
How to use checksums
cd0d12bc2f41fef6939595c952d8cef049828fcb49046a710d42c6d05e2dd774
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Security for packright 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page