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

VersionControlHookManager PythonLinter MarkdownLinter 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 is a package and tool that scaffolds and initializes a complete, fully configured and working python project with one command and makes the process of developing and maintaining more seemless 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 (PythonLinters, formatters, type checkers, test frameworks, etc.)
  • GitHub Actions workflows for CI/CD
  • Repository management configs (branch protection, issue/PR templates, etc.)
  • A working CLI

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

Automatic CLI

pyrig init sets up a CLI for your project that works immediately. Generate and add new commands by running pyrig mkcmd <command-name>. An automatic version command is included that shows the version of your project. Run my-project version to see it in action.

Test Generation

Generate test skeletons with pyrig mktests. 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 mkfixture <fixture-name> to generate a new fixture that is automatically registered and available across all your tests.

Build Artifacts

PyInstaller integration and extensible build system for generating executables, distributable packages, and more. Run pyrig subcls to create a custom builder for your specific build needs. Run pyrig build to execute the build process and generate artifacts. Run pyrig resources to create a resources directory for your project.

Multi-Package Inheritance

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, builders, and more by subclassing and overriding methods. pyrig will automatically discover and use your custom classes without any additional configuration. Run pyrig subcls to generate a subclass for any pyrig class.

The multi-package inheritance system is probably pyrig's most powerful and unique feature, enabling you to easily customize behaviour across your project and any other projects that have your project installed as a dependency making this an automatic plugin system for pyrig-based projects. Tired of setting up all your projects manually the same way? Create your personal pyrig-based package with your preferred setup and configs. Everything is overridable and extendable, you could even replace uv with something like poetry. After that you can run:

uv init # or poetry init, add and run if you replaced uv with poetry
uv add my-pyrig-package
uv run pyrig init

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.

Pyrig Commands

uv run pyrig init           # Full project initialization
uv run pyrig mkroot         # Create/update all concrete config files
uv run pyrig mktests        # Generate test skeletons
uv run pyrig mkinits        # Create missing __init__.py files
uv run pyrig mkfixture      # Generate a new pytest fixture
uv run pyrig subcls         # Generate a subclass for overriding a config or tool
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 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-11.4.1.tar.gz (148.7 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.4.1-py3-none-any.whl (217.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyrig-11.4.1.tar.gz
  • Upload date:
  • Size: 148.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","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.4.1.tar.gz
Algorithm Hash digest
SHA256 c0dc4dae4e18f80e9ab35ee0c2afd39cd7b09f28a4be26d57974e9421f4df81e
MD5 51950f695892ea5ebf5895ef5f4bdc39
BLAKE2b-256 67db6faee1dfeadda7a2d963f45c7009433ea29efab12b8541b1f59b55a23f15

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyrig-11.4.1-py3-none-any.whl
  • Upload date:
  • Size: 217.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","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.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0faaa9f4730ffd71a863eb536c5dcb235111a6e46c886a9ddd6228ad591f7564
MD5 5f888879d7c96eab0cd489a50d62e55e
BLAKE2b-256 43d617f372317e5b598dadd7d89ccfd8d9cbccb21e24e54a057adb9e982bc290

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