Skip to main content

A Python toolkit to rig up your project that standardizes and automates project setup, configuration and development.

Project description

pyrig

pyrig uv Container pre-commit MkDocs

ruff ty security: bandit pytest codecov rumdl

PyPI Python License

CI CD

Documentation


A Python toolkit to rig up your project that standardizes and automates project setup, configuration and development.


What is pyrig?

pyrig generates and maintains a complete, production-ready Python project from a single command. It creates all the files you need—source structure, tests, CI/CD, documentation, configs—and keeps them in sync as your project evolves.

Run once, stay current: pyrig is idempotent. Rerun it anytime to update configs, add missing files, or sync with the latest best practices.

Quick Start

# Initialize project with uv and pyrig
uv init
uv add pyrig
uv run pyrig init

That's it. You now have a complete project with:

  • Source code structure with CLI entry point
  • Test framework with 90% coverage enforcement
  • GitHub Actions (CI/CD, releases, docs deployment)
  • Pre-commit hooks (linting, formatting, type checking)
  • MkDocs documentation site
  • Container support (Podman/Docker)

See the Getting Started Guide for detailed setup instructions.

Key Features

Config File System

pyrig's core is a declarative config file system. Each config file (pyproject.toml, .pre-commit-config.yaml, GitHub workflows, etc.) is a Python class that:

  • Generates the file with working sensible defaults
  • Validates existing files against expected structure
  • Merges missing values without removing your customizations (overrides are possible, read the docs for details)

Create custom configs by subclassing—pyrig discovers them automatically.

Multi-Package Inheritance

Build on pyrig to create multiproject-wide standards. Your base package defines configs, fixtures, and CLI commands that all dependent projects inherit:

pyrig → company-base → auth-service
                     → payment-service
                     → notification-service

Override any config by subclassing with the same class name. Leaf classes win.

Automatic Discovery

Everything is discovered automatically across the dependency chain:

  • CLI commands from <package>.dev.cli.subcommands
  • Config files from <package>.dev.configs
  • Test fixtures from <package>.dev.tests.fixtures
  • Builders from <package>.dev.builders
  • Tools from <package>.dev.management

No registration required. Just define and it works.

What Gets Generated

After pyrig init, your project includes:

Category Files
Source Package structure, main.py CLI, py.typed marker
Tests Mirror structure, conftest.py, test skeletons
CI/CD Health check, build, release, deploy workflows
Docs MkDocs config, index, API reference
GitHub Issue templates, PR template, branch protection
Community CODE_OF_CONDUCT, CONTRIBUTING, SECURITY
Config pyproject.toml, .gitignore, .pre-commit-config.yaml, Containerfile

CLI Commands

uv run pyrig init         # Complete project initialization
uv run pyrig mkroot       # Create/update all config files
uv run pyrig mktests      # Generate test skeletons
uv run pyrig mkinits      # Create __init__.py files
uv run pyrig build        # Build artifacts (PyInstaller, etc.)
uv run pyrig protect-repo # Configure repository protection
uv run my-project --help  # Your project's CLI

Opinionated Defaults

pyrig enforces modern Python best practices:

  • Python 3.12+ with full type hints
  • All ruff rules enabled (with sensible exceptions)
  • Strict type checking with ty
  • 90% test coverage minimum
  • Linear git history with branch protection

Documentation


Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyrig-7.0.17.tar.gz (133.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyrig-7.0.17-py3-none-any.whl (201.0 kB view details)

Uploaded Python 3

File details

Details for the file pyrig-7.0.17.tar.gz.

File metadata

  • Download URL: pyrig-7.0.17.tar.gz
  • Upload date:
  • Size: 133.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","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}

File hashes

Hashes for pyrig-7.0.17.tar.gz
Algorithm Hash digest
SHA256 3f1c7194c93b6367d8f4d2ba2de1cfebc06b0117cfed1e3a2ff672ff39322472
MD5 0b4b45f365f41c9300db3342fa3f79f7
BLAKE2b-256 9f9bd447810952c05ad75888827fa84f163651b13c5b862fedcea514638d4a32

See more details on using hashes here.

File details

Details for the file pyrig-7.0.17-py3-none-any.whl.

File metadata

  • Download URL: pyrig-7.0.17-py3-none-any.whl
  • Upload date:
  • Size: 201.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","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}

File hashes

Hashes for pyrig-7.0.17-py3-none-any.whl
Algorithm Hash digest
SHA256 3912265a92228bdd8bd8e9b5f188da55fdc638ed4975ac2bdf7c69a3666320b6
MD5 1443c5b4756bf88323703775c28b1270
BLAKE2b-256 bb1ce92a865068a354d5e5f6c492ad169cf8913515146cd5f723c4108fa62749

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page