This is a template project for a Python application using uv
for dependency management and pytest
for testing.
- Python 3.12 or higher
- uv
To install uv
, run the following command:
pip install uv -U
-
Clone the repository:
git clone https://github.com/rodneyxr/python-uv-template.git cd python-uv-template rm -rf .git
-
Install the dependencies:
uv sync
uv run myapp
uv run pytest --cov
myapp/__main__.py
: Entry point for the command-line interface.myapp/settings.py
: Application settings and configuration (automatically loads from.env
usingpydantic-settings
).myapp/utils/logger.py
: Custom logger configuration with source code info.test/hello_test.py
: Example test file.
pyproject.toml
: Project configuration file foruv
.poetry.lock
: Lock file foruv
dependencies..python-version
: Defines which Python version to use when creating the project's virtual environment..vscode/launch.json
: VS Code launch configuration..vscode/settings.json
: VS Code settings.
This project is licensed under the MIT License.