Skip to main content

PyTemplate UV: A Modern Python Project Generator

Project description

PyTemplate UV

Overview

PyTemplate UV is a powerful CLI tool for creating Python project templates using the uv package manager. It provides a seamless way to generate standardized project structures with modern development practices.

Features

  • 🚀 Quick project initialization
  • 🔧 Support for multiple project templates (FastAPI, Standard Python)
  • 📦 Integrated with uv package management
  • 🧪 Comprehensive testing infrastructure
  • 🔍 Linting and type checking support

Prerequisites

  • Python 3.11+
  • uv package manager
  • cookiecutter

Installation

pip install pytemplate-uv
# or
uv pip install pytemplate-uv

Usage

Create a Project

# Create a standard Python project (default)
pytemplate-uv create-project

# Create a FastAPI project
pytemplate-uv create-project --template fastapi

# Create a project with a custom name
pytemplate-uv create-project --name my-awesome-project

# Create a project with custom template and name
pytemplate-uv create-project --template fastapi --name my-api-project

Project Creation Options

  • --template: Choose the project template (default: pyproject)
    • Options: pyproject, fastapi
  • --name: Specify a custom project name
  • Additional template-specific options can be passed as needed

Next Steps After Project Creation

  1. cd into your project directory
  2. Run uv venv to create a virtual environment
  3. Run uv pip install -e . to install dependencies
  4. Run make setup to set up the development environment

Development

Setup

  1. Clone the repository

  2. Create a virtual environment:

    uv venv
    source .venv/bin/activate
    
  3. Install development dependencies:

    uv pip install -e .[dev]
    

Running Tests

pytest

Linting

ruff check .
black .
mypy .

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for details.

License

MIT License - See LICENSE for details.

Contact

Leo Liu - GitHub


Simplifying Python project creation with modern best 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

pytemplate_uv-2.0.0.tar.gz (41.3 kB view details)

Uploaded Source

Built Distribution

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

pytemplate_uv-2.0.0-py3-none-any.whl (52.1 kB view details)

Uploaded Python 3

File details

Details for the file pytemplate_uv-2.0.0.tar.gz.

File metadata

  • Download URL: pytemplate_uv-2.0.0.tar.gz
  • Upload date:
  • Size: 41.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.11

File hashes

Hashes for pytemplate_uv-2.0.0.tar.gz
Algorithm Hash digest
SHA256 e677683b3502119deff8ebc47bb0621b0a5f84b682662405ecee6f7a19226cea
MD5 00e4b8121493b5f59199b0b1e84b8402
BLAKE2b-256 02d31a15bd3c5232e09b4f1d20ddbcf8ceb46da69dcf2d6a18b997b33c7480bf

See more details on using hashes here.

File details

Details for the file pytemplate_uv-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: pytemplate_uv-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 52.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.11

File hashes

Hashes for pytemplate_uv-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 13b377f10bd289408cede71c21437215c417c21b1bc927ac11d899e9f1503ea8
MD5 dc8a09050f43c19f0d18a101c7255b81
BLAKE2b-256 92b0df3f1f8d96cfac0d64995c24d08f450910b321bec9122659fd9ffe69a5c9

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