A configurable, extensible Python project generator that supports multiple templates and dependency management tools.
- Multiple Templates: Standard, minimal, CLI, and web application templates
- Tool Support: Both Poetry and uv dependency managers
- Configurable: YAML configuration files and CLI arguments
- Extensible: Plugin-ready architecture for future tools
- Modern: Follows current Python packaging best practices
- Tested: Includes test structure and configuration
# Install from source
git clone https://github.com/yourusername/pyfresh.git
cd pyfresh
poetry install
# Or install globally
poetry build
pip install dist/*.whl# Generate a standard Python project
pyfresh my-awesome-project
# Generate with specific template and tool
pyfresh my-cli-app --template cli --tool uv
# Use custom configuration
pyfresh my-project --config my-config.yaml- standard: Full-featured project with common dependencies and tools
- minimal: Lightweight project with basic structure
- cli: Command-line application with Click
- web: Web application with FastAPI
Create a config.yaml file to customize defaults:
author:
name: "Your Name"
email: "your.email@example.com"
templates:
standard:
dependencies:
- "requests>=2.31.0"
- "click>=8.0.0"
dev_dependencies:
poetry:
- "pytest^7.4.0"
- "black^24.0.0"usage: pyfresh [-h] [--author AUTHOR] [--email EMAIL]
[--description DESCRIPTION] [--template {standard,minimal,cli,web}]
[--tool {poetry,uv}] [--config CONFIG] [--output-dir OUTPUT_DIR]
[--force] [--dry-run] [--version]
project_name
Generate Python project structures with configurable templates
positional arguments:
project_name Name of the project to create
optional arguments:
-h, --help show this help message and exit
--author AUTHOR Project author name
--email EMAIL Project author email
--description DESCRIPTION
Project description
--template {standard,minimal,cli,web}
Project template to use (default: standard)
--tool {poetry,uv} Dependency management tool (default: poetry)
--config CONFIG Path to configuration file
--output-dir OUTPUT_DIR
Output directory for the project
--force Overwrite existing project directory
--dry-run Show what would be created without creating files
--version show program's version number and exit
# Clone the repository
git clone https://github.com/yourusername/pyfresh.git
cd pyfresh
# Install dependencies
poetry install
# Run tests
make test
# Format code
make lint
# Run the generator locally
poetry run pyfresh --help- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Add tests for your changes
- Run the test suite (
make test) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Plugin system for custom templates
- Support for additional tools (pip-tools, pipenv, etc.)
- Interactive template selection
- Template validation and testing
- GitHub Actions workflow templates
- Docker support
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by modern Python packaging practices
- Built with Poetry and designed for the Python community