Skip to main content

A CLI tool to scaffold Python projects with uv

Project description

🐍 Py-Template

Interactive Python project generator - like create-react-app but for Python

Stop copying project structures and wrestling with configuration files. Answer a few questions, and get a perfectly structured Python project in seconds.

✨ Why py-template?

Before py-template:

mkdir my-project
cd my-project
touch setup.py pyproject.toml README.md requirements.txt .gitignore
mkdir src tests docs
# ... 15 more minutes of boilerplate setup

With py-template:

py-template
# Answer 4-5 quick questions
# ✅ Complete project ready in 30 seconds

vs. cookiecutter

Feature py-template cookiecutter
Setup method Interactive Q&A Config files first
Learning curve None - just answer questions Need to understand JSON/YAML
Customization Guided prompts Pre-configure everything
User experience Like create-react-app Like filling out forms

✨ Features

  • Interactive CLI - Guided setup with friendly prompts
  • Fast Setup - Uses uv for fast project initialization
  • Modern Structure - Creates src layout following Python packaging best practices
  • Testing Ready - Includes pytest setup with example tests
  • Docker Support - Optional Dockerfile generation
  • MIT License - Automatically generates license file
  • Development Tools - Pre-configured with ruff for linting

📦 Installation

Using pipx (Recommended)

pipx install git+https://github.com/manursutil/py-template.git

Using uv (Development)

git clone https://github.com/manursutil/py-template.git
cd py-template
uv sync
uv pip install -e .

🚀 Usage

Simply run the command and follow the interactive prompts:

py-template

Demo

Demo

Generated Project Structure

my-awesome-app/
├── src/
│   └── my_awesome_app/
│       ├── __init__.py
│       └── main.py
├── tests/
│   ├── __init__.py
│   └── test_main.py
├── docs/
├── .github/
│   └── workflows/
│       └── ci.yml
├── LICENSE
├── README.md
├── .gitignore
├── pyproject.toml
└── Dockerfile + docker-compose.yml (optional)

Development

See CONTRIBUTING.md for full details on setting up a dev environment, running tests, and contributing.

Quick start:

git clone https://github.com/manursutil/py-template.git
cd py-template
uv sync

uv run pytest
uv run ruff check .
uv run ruff format .

A Note from the Author

Py-Template started as a tool I built for my own workflow so it is a very opinionated way to spin up Python projects with the tools I use most frequently.

That said, I’d love to make it useful for a broader audience.If you use a different stack, need extra integrations, or have ideas for improvement, please open an issue or PR.

Together we can make Py-Template a universal scaffolding tool for modern Python projects 🚀

See CONTRIBUTING.md for guidelines on how to get involved.

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • Built with uv for fast Python package management
  • Uses Rich for beautiful terminal output
  • Inspired by modern Python packaging practices

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

uvforge-0.1.1.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

uvforge-0.1.1-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file uvforge-0.1.1.tar.gz.

File metadata

  • Download URL: uvforge-0.1.1.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for uvforge-0.1.1.tar.gz
Algorithm Hash digest
SHA256 53da2dc9360a01ceb393c4f8eeaaf6ea3373b67daa454071b5006b249efc1301
MD5 60462a4f25a61441d94bab8519a2846d
BLAKE2b-256 e496a57c3da5e45965679fa690a077ef5ac9b4533abe989ae52b89d979b39197

See more details on using hashes here.

File details

Details for the file uvforge-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: uvforge-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for uvforge-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 09e084f93cf1c55c68f920e4744a8b67324e50f60e9b8e96d699ad2b670a2a65
MD5 bf39e443c5b8683bbf9de43b17b10321
BLAKE2b-256 ee3de2059542d89bd9666d9bc8841b65e4b825f469dd0fed099e886a56fa62a1

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