Skip to main content

pyrig is a python toolkit that rigs up your project by standardizing and automating project setup, configuration and maintenance

Project description

pyrig

SecurityChecker DependencyAuditor

VersionController RemoteVersionController ContainerEngine Pyrigger PackageManager

DocsBuilder Documentation

PreCommitter Linter MDLinter TypeChecker

PackageIndex ProgrammingLanguage License

ProjectTester ProjectCoverageTester

CI CD


pyrig is a python toolkit that rigs up your project by standardizing and automating project setup, configuration and maintenance


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. Rerun it anytime: pyrig is idempotent.

Quick Start

uv init
uv add pyrig
uv run pyrig init

See the Getting Started Guide for detailed setup instructions.

Features

Idempotent Project Scaffolding

pyrig init generates a complete project in one command — source tree, tests, CI/CD workflows, documentation, configs, and a working CLI. Run it again anytime to sync everything; pyrig never overwrites your customizations.

Getting Started · Generated Structure

Config File System

Every generated file is backed by a Python class that validates and merges automatically. Override any config by subclassing, or define entirely new config files — pyrig discovers and manages them for you.

Config Architecture

Automatic CLI

pyrig init sets up a CLI for your project that works immediately. Add commands by defining functions in <package>.rig.cli.subcommands — they're discovered automatically. Shared commands propagate across the entire dependency chain.

CLI docs

Testing Infrastructure

  • pytest as the test runner with autouse fixtures that enforce best practices
  • pyrig mktests generates test skeletons mirroring your source structure
  • Autouse fixtures validate project invariants — init files, config correctness, dependency freshness

Test Structure · Autouse Fixtures

Multi-Package Inheritance (.I pattern)

Override almost any behavior — configs, tools, CLI commands, builders — by subclassing the pyrig-provided class. pyrig discovers your implementation automatically and uses it instead of the default.

This enables creating a personal pyrig package with your own standards, adding it as a dependency to any project, and having pyrig init apply everything automatically.

Tool Architecture · Config Architecture

Tool Wrappers

Type-safe wrappers around uv, git, ruff, pytest, bandit, and more. Customizable via subclassing for organization-wide or per-project overrides.

Tools · Tooling Choices

Builders, Resources & Packaging

  • Builders — PyInstaller integration and extensible build system
  • Resources — Reliable file access in both development and PyInstaller bundles
  • Packaginguv_build backend with console script integration

Builders · Resources

CI/CD & Repository Automation

Generates GitHub Actions workflows, branch protection configs, issue/PR templates, and release flows. Verbosity flags (-v, -vv, -q) provide flexible logging across all commands.

Workflows · Branch Protection

CLI Commands

uv run pyrig init           # Full project initialization
uv run pyrig mkroot         # Create/update all config files
uv run pyrig mktests        # Generate test skeletons
uv run pyrig mkinits        # Create missing __init__.py files
uv run pyrig build          # Build artifacts (PyInstaller, etc.)
uv run pyrig protect-repo   # Configure repository protection
uv run pyrig scratch        # Execute the project's .scratch file
uv run pyrig rmpyc          # Remove __pycache__ directories
uv run my-project --help    # Your project's CLI
uv run my-project version   # Show pyrig or project version

CLI Reference

Documentation

Getting Started Complete setup guide
Full Documentation Comprehensive reference
Trade-offs What you give up and what you gain
CodeWiki AI-generated docs
Tutorials YouTube tutorials for pyrig

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-11.1.17.tar.gz (131.6 kB view details)

Uploaded Source

Built Distribution

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

pyrig-11.1.17-py3-none-any.whl (200.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyrig-11.1.17.tar.gz
  • Upload date:
  • Size: 131.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","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-11.1.17.tar.gz
Algorithm Hash digest
SHA256 c8afcdb0c976e904112e6426e737e97a9a28cb5c50a176b7106796b5e670d55f
MD5 3210fc67acc6036b2615dc187b6e87cf
BLAKE2b-256 d44a270819b43b8399d8e9d63edd86fef3104a2525b772821c303ba3c661793b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyrig-11.1.17-py3-none-any.whl
  • Upload date:
  • Size: 200.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","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-11.1.17-py3-none-any.whl
Algorithm Hash digest
SHA256 397d8b6f3f7f44a59d3d70341f9a64d8fc3b30548177d0cff511d3666686c04b
MD5 c17bffb8ce56e9bb4a65d1e7b4909aac
BLAKE2b-256 3545a5aa6550c17bda7ea5aa936959290867782a3ea0d0a9ffa68f7af71cacf7

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