Skip to main content

Pyrig is a toolkit that standardizes and automates Python project setup, configuration, development, and maintenance.

Project description

pyrig

DependencyAuditor SecurityChecker

CI CD

DependencyChecker MarkdownLinter PythonLinter SpellChecker TypeChecker VersionControlHookManager

CoverageTester ProjectTester

PackageManager Pyrigger RemoteVersionController VersionController

DocsBuilder Documentation

PackageIndex ProgrammingLanguage License


Pyrig is a toolkit that standardizes and automates Python project setup, configuration, development, and maintenance.


What is pyrig?

pyrig is a package and tool that rigs up your project. It scaffolds and initializes a complete, fully configured, installed and working Python project with one command 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
uv add pyrig
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

pyrig init generates a complete project in one command that works out of the box. This includes everything a modern python project needs:

  • 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

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. Run pyrig sync to create or update all config files at once. Run pyrig mk subcls to generate a subclass for overriding a specific file.

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 Generation & Maintenance

Generate test skeletons with pyrig sync. This will generate test skeletons for all source modules and update them automatically as your project evolves.

Test Fixtures

pyrig enables automatic sharing and registration of pytest fixtures. Run pyrig mk fixture <name> to generate a new fixture that is automatically registered and available across all your tests.

Multi-Package Inheritance and Extensibility Architecture

Override and customize any and all behaviour 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.

CI/CD & Repository Protection

Pyrig generates GitHub Actions workflows for CI/CD and automatically configures and applies repository protection settings and branch protection rules to ensure your repository is protected. Run pyrig protect-repo to apply or update repository protection settings or simply use the fully working CI/CD pipeline to apply them automatically.

Commands

Run pyrig <command> --help for more information about a specific command and its usage.

uv run pyrig init                    # Full project initialization
uv run pyrig sync                    # Synchronize project
uv run pyrig mk fixture <name>       # Generate a new pytest fixture
uv run pyrig mk cmd <name>           # Create a new CLI subcommand stub
uv run pyrig mk subcls               # Generate and override subclasses
uv run pyrig protect-repo            # Configure repository protection
uv run pyrig scratch                 # Execute the project's .scratch.py file
uv run pyrig rmpyc                   # Remove __pycache__ directories
uv run pyrig version                 # Show pyrig version
uv run my-project --help             # Your project's CLI
uv run my-project version            # Show your project's version

Documentation

Full Documentation The manually written documentation
CodeWiki AI-generated documentation
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-15.2.0.tar.gz (87.2 kB view details)

Uploaded Source

Built Distribution

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

pyrig-15.2.0-py3-none-any.whl (131.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pyrig-15.2.0.tar.gz
Algorithm Hash digest
SHA256 760f6cd5832b8ca179f8a0acb7da3332998cfb2ad4f3549a2ecf232f5280c5b1
MD5 f7a758a0312981660cdc97464a855c47
BLAKE2b-256 c287fde07cbfa401f6024f35861b63c072cb75da7f6aabd83c9f0a5864c67aed

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pyrig-15.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e1046f8d09f8392bc9a7cf19eca8f7fab71403cc2de1f360fea1a365c921d4ad
MD5 af6c6d67cea93125fcf272405639b3ae
BLAKE2b-256 e841fe82916a3c4ec1f7dfec8fcb15a55482ea153e82a00729bde2aec001871d

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