Python Starter
A project template with UV package manager and CI integration.
๐ Features
- UV package manager for dependency management
- Docker support
- Ruff for code formatting and linting
- Pytest for testing
- Logging configuration
๐ Prerequisites
- Python 3.13+
- Docker Desktop
- UV package manager
๐ Installation
- Clone the repository:
Install project dependencies:
uv syncDevelopment
Local Development
- Run UV application locally:
uv run uvstarter main:app --port 8000 --reload- Run code formatting and linting:
uv run ruff format .
# or
uv run ruff check --fix- Run typechecking:
uv run pyright- Run tests:
uv run pytestDocker Development
Build and run the application in Docker:
docker build -t app .
docker run -p 8000:8000 appโ๏ธ Configuration
- Project dependencies and settings are managed in
pyproject.toml - Ruff is configured for code formatting and linting
- Pytest is set up for testing
- Logging configuration is available for different environments
๐ API Endpoints
GET /: Returns a "Hello from UV!" message
๐งช Testing
Tests are located in the tests/ directory. Run the test suite using:
uv run pytest๐ Project Structure
uv-ci-template/
|โโ main.py # UV application
โโโ tests/
โ โโโ tests.py # Test suite
โโโ Dockerfile # Docker configuration
โโโ pyproject.toml # Project configuration
โโโ uv.lock # Libs and dependencies
โโโ README.md๐ฅ Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
On this page
Languages
Python62.4%Dockerfile37.6%
Contributors
MIT License
Created April 19, 2025
Updated April 26, 2025