Skip to content
/ python-starter Public template

A project template with UV package manager and CI integration.

License

Notifications You must be signed in to change notification settings

rjoydip/python-starter

Python Starter

uv image Checked with pyright CI

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

  1. Clone the repository:

Install project dependencies:

uv sync

Development

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 pytest

Docker 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

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

About

A project template with UV package manager and CI integration.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published