A Python template for personal use. The package itself doesn't do much, but I keep it up to date as my Python workflow and tooling preferences evolve.
To install this package via pip:
pip install git+https://github.com/bsweger/python-app-template.git
To run it:
hello_world
The instructions below outline how to set up a development environment based on uv tooling.
Prerequisites:
-
Clone this repository
-
Change to the repo's root directory:
cd python-app-template
-
Create a Python virtual environment and install dependencies. The command below creates a virtual environment in the
.venv
directory, installs Python if needed, installs project dependencies (including dev dependencies), and installs the package in editable mode:uv sync
-
Run the test suite to confirm that everything is working:
uv run pytest
Use uv add
to include a
new dependency in the project. This command will install the new dependency
into the virtual environment, add it to uv.lock
, and update the
dependencies
section of pyproject.toml
.
uv add <package-name>
To add a dependency to a specific group (adding a dev dependency, for example),
use the --group
flag:
uv add <package-name> --group dev