PyHatchery 🐍🥚
| main | develop | |||
|---|---|---|---|---|
Hatch new Python projects instantly!
PyHatchery is a command-line tool that generates a standardized, best-practice project structure with modern tooling like uv for dependency management, and ruff and pylint for linting/formatting, all pre-configured.
Stop wrestling with boilerplate and start coding faster. Inspired by the efficiency of hatchling, PyHatchery helps you seamlessly start new Python projects with a well-organized structure in minutes!
Key Goals & Features
- 🚀 Rapid Project Scaffolding: Generate a complete project skeleton with a single command.
- 🛠️ Modern Tooling Pre-configured: Comes with:
uvfor lightning-fast dependency management and virtual environments.ruffandpylintconfigurations for immediate code quality checks.- (hatchling for building the package).
- ⚙️ Best Practices Baked In: Standardized directory layout, basic testing setup,
.gitignore, and essential configuration files. - 📝 Automated Personalization: Automatically customizes project name, author details, and license information.
- ✅ Standardized: Ensures consistency across your Python projects, making them easier to navigate and maintain.
- 🌱 Foundation for Growth: Provides a solid, clean base for projects of any scale.
Installation
You can install PyHatchery directly from PyPI:
pip install pyhatchery
How it Works: The PyHatchery Wizard
Using PyHatchery is designed to be simple and intuitive. Open your terminal and run:
pyhatchery new your_project_name
PyHatchery will then typically:
- Ask for Project Details: Prompt you for information such as:
- Author Name (e.g., "Your Name")
- Author Email (e.g., "your.email@example.com")
- Project Description (a short summary of your project)
- Clone Template: Internally, it clones its built-in, best-practice project template.
- Personalize Files: It intelligently updates key files (like
pyproject.toml,LICENSE,README.md_template) with your provided project name, author details, and the current copyright year. - Finalize Structure: Sets up a fresh project structure in a new directory named
your_project_name. - Clean Up: Removes the template's
.githistory, allowing you to initialize your own version control.
NOTE:
pyhatcherywill also check if the project name you have chosen is already taken onPyPi. It will then present you with a choice:
Once completed, navigate to your new project:
cd your_project_name
Your new Python project is ready. You can now initialize your own Git repository if you wish
git init
git add .
git commit -m "Initial project structure from PyHatchery"
Start developing!
Post-Setup Recommendations
After your project is hatched, you might want to:
- Review the generated
README.mdin your new project and fill in your project's specific details. - Begin outlining your project's purpose and vision in a project brief document.
- To enable auto-publishing of your package to TestPyPI and PyPI (on pushes to
developandmain, respectively) via the included GitHub Actions workflow:- In your new project, set
ENABLE_PUBLISHINGtotruein.github/workflows/publish.yml. - Add the necessary
PYPI_API_TOKEN(for PyPI) andTEST_PYPI_API_TOKEN(for TestPyPI) as GitHub Actions secrets to your new repository.
- In your new project, set
- To enforce Git PR discipline in your new repository, consider creating Git branch protection rules or rulesets as outlined in PyHatchery's
docs/contributing.md(adapt as needed for your project).
Happy hacking!!!
Understanding the Project Structure (Optional)
PyHatchery creates projects based on its embedded template structure. This includes a standard layout for Python projects, such as:
src/your_project_name/: The main package directory.tests/: For your unit and integration tests.docs/: For project documentation.pyproject.toml: Pre-configured foruv,hatchling,ruff,pylint, and your project metadata.LICENSE: Typically an MIT License, personalized with your details..gitignore: A standard Python .gitignore file.- GitHub Actions workflows for testing and publishing.
.pylintrcand.ruff.tomlsettings files.
This structure is designed to be a comprehensive starting point.
Contributing
Feedback on PyHatchery itself is highly welcome! Please open an issue on the PyHatchery GitHub repository to share your thoughts, suggestions, or report bugs.
Read the contribution document here and please follow the guidelines for this repository.
License
PyHatchery is licensed under the MIT License. Generated projects will also include a personalized MIT License by default.
Copyright (c) 2025, Kayvan Sylvan
Metadata
Release files for pyhatchery 0.9.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyhatchery-0.9.1.tar.gz | 529.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyhatchery-0.9.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 546.4 kB
Release files / pyhatchery-0.9.1.tar.gz
| Download URL | pyhatchery-0.9.1.tar.gz |
|---|---|
| Size | 529.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7b953819d78dcb7e7621d62af38adca5a4983d5c0586e381f8650e33be4afda7
|
|
BLAKE2b-256 checksum How to use checksums |
1b6634ea4759d5708a3931d2c0d54057319b9d6376dcec85416961b218b44c0f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.3
|
Release files / pyhatchery-0.9.1-py3-none-any.whl
| Download URL | pyhatchery-0.9.1-py3-none-any.whl |
|---|---|
| Size | 17.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ddbb410254f27e15e6f8c008ca5a966ceb97efeb1f11868e0ad2b22256ba059b
|
|
BLAKE2b-256 checksum How to use checksums |
fdee8896eca6e7c15b02e4a2b427fffd9f3535ea7c285c2596da1b5ca9730e4d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.3
|