Winipedia/pyrig
关于
A Python project setup and management tool built on infrastructure as code and convention over configuration.
系统与基础设施实测星标增长
- 24小时
- 0
- 7天
- +1
- 15天
- +1
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文pyrig
A Python project setup and management tool built on infrastructure as code and convention over configuration.
What is pyrig?
pyrig is a package and tool that rigs up Python projects with Convention-over-Configuration via Infrastructure as Code. 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 the project as code: each managed file is represented by a class
that declares its desired state, and pyrig sync validates or updates the file.
Files are treated as data structures (dict or list), so user additions can be
preserved while required content is kept in sync. Subclass these classes to
override and adjust pyrig's behavior; 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 flag 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, and 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 |
探索相关项目
加载中…