UV Project Generator - Create Python monorepos with workspaces.
Project description
uvpg - UV Project Generator
A CLI tool to scaffold Python monorepo projects using uv workspaces.
Features
- ๐ Creates monorepo structure with uv workspaces
- ๐ฆ Adds internal packages with automatic dependency registration
- ๐ Configurable Python version
- ๐ค Configurable author name and email
- ๐ MIT License auto-generated
- ๐ง Pre-configured tools: Ruff, Ty, pytest, coverage
- ๐ป VSCode settings with recommended extensions
- ๐ฅ๏ธ Auto-detects OS for correct Python interpreter path
- ๐ณ Docker support with multi-stage build and compose
- โก FastAPI + Uvicorn basic example included
Installation
# Install from PyPI
pip install uvpg
# Or install from PyPI with uv
uv tool install uvpg
# Or clone the repository
git clone https://github.com/lucasmaziero/uvpg.git
cd uvpg
# Install with uv
uv sync
uv build
uv tool install dist/uvpg-*.whl
# Or install with pip
pip install dist/uvpg-*.whl
Uninstall
# Via uv
uv tool uninstall uvpg
# Via pip
pip uninstall uvpg
Upgrade
# Via pip
pip install --upgrade uvpg
# Via uv
uv tool upgrade uvpg
Usage
Create a new project
# Basic project
uvpg my-project
# With specific Python version
uvpg my-project --python 3.14
# With author information
uvpg my-project --author "John Doe" --email "john@example.com"
# With initial packages
uvpg my-project -p core -p utils -p api
# Combining options
uvpg my-project --python 3.14 --author "John Doe" --email "john@example.com" -p core
Add packages to existing project
cd my-project
uvpg . -p new-package
Show version
uvpg --version
Show help
uvpg --help
Generated Structure
my-project/
โโโ .vscode/
โ โโโ settings.json # VSCode settings (Ruff, Ty, Action Buttons)
โ โโโ extensions.json # Recommended extensions
โโโ packages/
โ โโโ core/
โ โโโ pyproject.toml
โ โโโ src/
โ โ โโโ core/
โ โ โโโ __init__.py
โ โ โโโ main.py
โ โโโ tests/
โโโ src/
โ โโโ app/
โ โโโ __init__.py
โ โโโ main.py # FastAPI application
โโโ tests/
โโโ .dockerignore
โโโ .gitignore
โโโ .python-version
โโโ compose.yaml # Docker Compose config
โโโ Dockerfile # Multi-stage Docker build
โโโ LICENSE # MIT License
โโโ Makefile # Build automation
โโโ pyproject.toml # Root config with workspace
โโโ README.md
โโโ uv.lock
Configuration
The generated pyproject.toml includes:
- FastAPI + Uvicorn - Web framework and ASGI server
- Ruff - Linting with
select = ["ALL"] - Ty - Type checking
- pytest - Testing (commented, ready to enable)
- coverage - Code coverage (commented, ready to enable)
- uv workspaces - Monorepo package management
- hatchling - Build system
Docker
Run with Docker Compose:
# Build and run
docker compose up --build
# Run with watch mode (auto-reload)
docker compose up --watch
Requirements
- Python >= 3.12
- uv package manager
Windows (for Makefile support)
# Install Make
winget install --id=GnuWin32.Make -e
# Use Git Bash terminal for make commands. Launch from batch/command line:
start "" "%ProgramFiles%\Git\bin\bash.exe"
Development
# Clone
git clone https://github.com/lucasmaziero/uvpg.git
cd uvpg
# Install dependencies
uv sync
# Run locally
uv run uvpg --help
# Build
uv build
License
MIT License - See LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file uvpg-1.1.4.tar.gz.
File metadata
- Download URL: uvpg-1.1.4.tar.gz
- Upload date:
- Size: 17.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ca61e6f7f6352707135734062de657f0356e196d943c99a76be878aa4c3eac5
|
|
| MD5 |
c5f669eb31adfb0ccfcee01c4197fad2
|
|
| BLAKE2b-256 |
150f0a2db764ec87477511f54d807cd7761703b5acc773067e80812a68649c4e
|
Provenance
The following attestation bundles were made for uvpg-1.1.4.tar.gz:
Publisher:
release.yml on lucasmaziero/uvpg
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
uvpg-1.1.4.tar.gz -
Subject digest:
0ca61e6f7f6352707135734062de657f0356e196d943c99a76be878aa4c3eac5 - Sigstore transparency entry: 856855532
- Sigstore integration time:
-
Permalink:
lucasmaziero/uvpg@c6e7af962b9c6f75d3e81d5d993c8acc2b494382 -
Branch / Tag:
refs/tags/v1.1.4 - Owner: https://github.com/lucasmaziero
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c6e7af962b9c6f75d3e81d5d993c8acc2b494382 -
Trigger Event:
push
-
Statement type:
File details
Details for the file uvpg-1.1.4-py3-none-any.whl.
File metadata
- Download URL: uvpg-1.1.4-py3-none-any.whl
- Upload date:
- Size: 13.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e638073de9424c3a0b51e7a3276e84b76e84151803438ed51657dcaa04789ae
|
|
| MD5 |
c3da1fe965d86d968572323169f80254
|
|
| BLAKE2b-256 |
88d032483fe2a71647e01bea7dc9bef724e3808d880147593d904c611cd4fe0b
|
Provenance
The following attestation bundles were made for uvpg-1.1.4-py3-none-any.whl:
Publisher:
release.yml on lucasmaziero/uvpg
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
uvpg-1.1.4-py3-none-any.whl -
Subject digest:
3e638073de9424c3a0b51e7a3276e84b76e84151803438ed51657dcaa04789ae - Sigstore transparency entry: 856855595
- Sigstore integration time:
-
Permalink:
lucasmaziero/uvpg@c6e7af962b9c6f75d3e81d5d993c8acc2b494382 -
Branch / Tag:
refs/tags/v1.1.4 - Owner: https://github.com/lucasmaziero
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c6e7af962b9c6f75d3e81d5d993c8acc2b494382 -
Trigger Event:
push
-
Statement type: