Skip to content
Public template

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

Python Project Template

A modern Python project template using uv for fast and reliable package management.

Features

  • 🚀 uv for package management - Fast, reliable, and drop-in replacement for pip
  • 📦 Modern project structure - Uses pyproject.toml for configuration
  • 🔧 Development tools - Pre-configured with ruff for linting and formatting
  • 🎯 Python 3.14+ - Uses the latest Python features

Prerequisites

  • Python 3.14 or higher

  • uv - Install with:

    curl -LsSf https://astral.sh/uv/install.sh | sh

    Or using Homebrew:

    brew install uv

    Or using pip:

    pip install uv

Getting Started

1. Clone or Use This Template

If you're using this as a template:

  1. Click "Use this template" on GitHub, or
  2. Clone this repository and update the project name in pyproject.toml

2. Update Project Information

Edit pyproject.toml to customize:

  • Project name
  • Version
  • Description
  • Dependencies

3. Install Dependencies

Install the project and development dependencies:

# Install project dependencies
uv sync

# Or install with dev dependencies (recommended)
uv sync --dev

4. Run the Project

# Run the main script
uv run python main.py

# Or activate the virtual environment and run directly
source .venv/bin/activate  # On macOS/Linux
python main.py

Development

Available Commands

Format code using ruff:

make format

Or directly with uv:

uv run ruff format .

Adding Dependencies

Add runtime dependencies:

uv add <package-name>

Add development dependencies:

uv add --dev <package-name>

Virtual Environment

uv automatically manages the virtual environment. It's located at .venv/ in your project root.

To activate it manually:

source .venv/bin/activate  # On macOS/Linux
.venv\Scripts\activate     # On Windows

Project Structure

.
├── main.py          # Main entry point
├── pyproject.toml   # Project configuration and dependencies
├── uv.lock          # Lock file for reproducible builds
├── Makefile         # Common development commands
└── README.md        # This file

Learn More

License

See LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages