Quick Start
Get up and running with your new Python package in minutes!
Prerequisites
- Python 3.9+ installed on your system
- Git for version control
- pip or uv for package management
Installation
Install cookiecutter:
Create Your Package
-
Generate the project:
-
Answer the prompts (or press Enter for defaults):
full_name [Your Name]: John Doe email [your.email@example.com]: john@example.com github_username [yourusername]: johndoe project_name [My Python Package]: Awesome Calculator project_slug [awesome_calculator]: project_short_description [A modern Python package with best practices built-in.]: A calculator library with advanced features version [0.1.0]: python_requires [>=3.9]: license [MIT]: use_uv [y]: use_ruff [y]: use_mypy [y]: use_pytest [y]: use_coverage [y]: use_pre_commit [y]: command_line_interface [typer]: # ... more options -
Navigate to your project:
Set Up Development Environment
Choose your preferred package manager:
Verify Everything Works
-
Run the CLI (if you chose a CLI interface):
-
Run tests:
-
Check code quality:
What's Next?
Your package is now ready for development! Here are some common next steps:
📝 Customize Your Package
- Edit
src/awesome_calculator/core.pyto add your functionality - Update the CLI commands in
src/awesome_calculator/cli.py - Write tests in the
tests/directory
🔄 Development Workflow
- Use
pre-commithooks to ensure quality (runs automatically on commit) - Run
pytestto test your changes - Use
rufffor linting and formatting
📚 Documentation
- Update
README.mdwith your project details - Add documentation in the
docs/directory (if enabled) - Keep
CHANGELOG.mdupdated with your changes
🚀 Publishing
- Push to GitHub to trigger CI/CD workflows
- Use GitHub releases for versioning
- Publish to PyPI when ready
Common Commands
| Task | uv | pip + venv |
|---|---|---|
| Install deps | uv sync |
pip install -e ".[dev]" |
| Run tests | uv run pytest |
pytest |
| Run CLI | uv run <package-name> |
<package-name> |
| Lint code | uv run ruff check |
ruff check |
| Format code | uv run ruff format |
ruff format |
| Type check | uv run mypy src/ |
mypy src/ |
Need Help?
- Check the Configuration Guide for all available options
- See Usage Examples for different package types
- Review the Tools Guide to understand included tools
- Visit our FAQ for common questions