Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A simple modern Python project template with uv, Docker, Claude Code, Cursor, devcontainer, GitHub Actions, and pre-commit support.

Notifications You must be signed in to change notification settings

mjun0812/python-project-template

Repository files navigation

Python-Project-Template

CI

A simple modern Python project template.

This repository is created by mjun0812/python-copier-template using copier.

Article 日本語記事

Features

  • 🚀 Modern Python: Support for Python 3.10-3.13
  • 📦 uv Package Manager: Fast and reliable package management with uv
  • 🐳 Docker Support: Complete Docker development environment
  • 📦 Devcontainer Support: VS Code devcontainer for consistent development
  • AI Editor Support: Cursor rules and CLAUDE.md included for AI-powered development
  • 📝 Type Hints: Full type annotation support with modern Python features
  • 🔍 Code Quality: Pre-configured Ruff for linting and formatting
  • 🧪 Testing: pytest setup with example tests
  • 🔧 Pre-commit Hooks: Automated code quality checks
  • 🏗️ CI Ready: GitHub Actions workflows included

Quick Start

Pre-Requirements

  • uv: Fast Python package installer

Development Setup

# Install dependencies
uv sync
# Install pre-commit hooks
uv run pre-commit install
# Run tests
uv run pytest
# Run formatting and linting (automatically runs on commit)
uv run ruff format .
uv run ruff check .
# Auto Fix
uv run ruff check . --fix

Docker Development Setup

The template includes a complete Docker setup:

# create uv.lock file
uv sync
# use the provided scripts
./docker/build.sh
./docker/run.sh # or./docker/run.sh (Command)
# Build and run with Docker Compose
docker compose build
docker compose up

VS Code Devcontainer

Open the project in VS Code and use the "Reopen in Container" command for a fully configured development environment.

Update Template

Thit template is created by mjun0812/python-copier-template. You can apply update from it.

cd your-project-name
uvx copier update -A

Project Structure

your-project/
├── src/
│ └── your_project/ # Main package
├── tests/ # Test files
├── docker/ # Docker configuration
├── compose.yml # Docker Compose setup
├── pyproject.toml # Project configuration
└── README.md # Project documentation

Q&A

Why don't you use a type checker?

I'm waiting for stable release of ty. You can install and use your preferred type checker.

Support

About

A simple modern Python project template with uv, Docker, Claude Code, Cursor, devcontainer, GitHub Actions, and pre-commit support.

Resources

Stars

Watchers

Forks

Releases

No releases published

AltStyle によって変換されたページ (->オリジナル) /