pyrig
A tool that standardizes and automates Python project setup, configuration, development, and maintenance.
What is pyrig?
pyrig is a package and tool that rigs up Python projects with Convention-over-Configuration. It scaffolds a complete, fully configured, installed and working Python project with everything a modern Python project should have and makes the process of developing and maintaining it more seamless and efficient by automating things like configuration management, CLI generation, testing infrastructure, and more.
Requirements
- Python 3.12+
- Git
- uv
Quick Start
uv init my-project --python 3.12
cd my-project
uv add pyrig --dev
uv run pyrig init
See the Getting Started Guide for detailed setup instructions to also fully integrate with GitHub and CI/CD from the start.
Features
Project Scaffolding & Initialization
The pyrig init command generates a complete project, this includes, but is not
limited to:
- Standardized directory structure
- Fully configured dev tools (linters, formatters, type checkers, test frameworks, git hooks, etc.)
- End-to-end CI/CD pipeline with GitHub Actions and integrated repository protection
- Complete and working CLI
- And much more...
File & Configuration Management
pyrig manages and validates project files via classes, where every file is treated
as a data structure (dict or list), the content is loaded and validated against
the declared state in the class. This makes it possible to override and adjust
any and all behavior of pyrig via subclassing said classes. pyrig will automatically
discover and use your custom classes without any additional configuration.
Run pyrig mk subcls to generate a subclass for any pyrig class.
Run pyrig sync to create or update all config files at once.
Automatic CLI
pyrig init sets up a CLI for your project that works immediately.
Generate and add new commands by running pyrig mk cmd <name>.
An automatic version command is included that shows the version of your project.
Run my-project version to see it in action.
Mirror Test Structure
Generate test skeletons with pyrig sync.
This will generate test skeletons for all source modules
and update them automatically as your project evolves.
Plugin Architecture
Override and customize any and all behavior to suit your project's needs.
pyrig's classes are designed for inheritance and composition, allowing you to
create custom configurations, tools, and more by subclassing and simply
overriding methods. pyrig will automatically discover and use your custom classes
without any additional configuration.
Run pyrig mk subcls to generate a subclass for any pyrig class.
Create your own plugins this way to extend pyrig's functionality.
CI/CD & Repository Protection
Pyrig generates GitHub Actions workflows for CI/CD which automatically test and release your code. They also configure and apply repository protection settings and protection rulesets. Push your code to GitHub after initialization and see it in action.
Commands
Run pyrig --help to see a list of all available commands and their usage.
Run pyrig <command> --help for more information about a specific command and
its usage.
Run my-project --help to see the automatically generated CLI for your project.
Comparisons
pyrig isn't the only tool in this field. See how it compares to other popular tools like cookiecutter, copier or pyscaffold.
Documentation
| Full Documentation | The manually written documentation |
| CodeWiki | AI-generated documentation |
| Tutorials | YouTube tutorials for pyrig |
Release files for pyrig 18.76.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyrig-18.76.4.tar.gz | 103.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyrig-18.76.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 271.5 kB
Release files / pyrig-18.76.4.tar.gz
| Download URL | pyrig-18.76.4.tar.gz |
|---|---|
| Size | 103.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
65ef620a5de3916ae99f9f040f0bf5dfb2cce8c8369b2aa9e1215701bc7262d4
|
|
BLAKE2b-256 checksum How to use checksums |
4ede9a605d58d3d6c6f10033dbe47755d772249c177b9f2029fe8916f2aef1e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pyrig-18.76.4-py3-none-any.whl
| Download URL | pyrig-18.76.4-py3-none-any.whl |
|---|---|
| Size | 168.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1210a41d17dd63a24be786203072926b594964caa27b33d37bfc5b5b8f4ad38a
|
|
BLAKE2b-256 checksum How to use checksums |
34fb55277ac48628b985bcb460e02f1cb4f9f181902b520b1d4adf7cdc8a842b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|