My personal Python application template for my work. π
It helps me to remember how to bootstrap a common Python project such as a Python library, a Command Line Interface (CLI), or a REST API using FastAPI framework.
Clue left.
Unintended evidence.
-
This project uses
mise
as tool manager. Make sure to install the binary in your Linux/MacOS system.mise install
-
This project uses
uv
as Python project manager.uv sync
-
Configure your IDE and/or your shell prompt to use the dedicated Python virtual environement.
source .venv/bin/activate
-
Install developer tools.
uv tool install ruff uv tool install mkdocs --with mkdocs-material
-
Consider to install Docker.
-
This project uses
make
to improve developer experience.make help
This project uses mypy
and ruff
to check type consitency, format and lint Python files.
uv run mypy .
uvx ruff format
uvx ruff check --fix .
This project uses pytest
, and all test scripts are located in the tests
folder.
uv run pytest .
docker build -t clue:local .
docker run clue:local
Or alternatively using make
:
make image
uv run cli_runner_writer.py -t text!
uv run api_runner_printer.py
Or alternatively using Docker after you built the image.
docker run -p 80:5000 clue:local
This project use mkdocs
for its documentation.
uvx mkdocs serve
Static files are generated in /docs-dist
folder using the following command.
uvx mkdocs build
Your contribution would be (obviously) welcomed!
- Please, read the dedicated CONTRIBUTING.md page.
- Consider to follow Conventional Commits specification and angular convention in order to write your commit messages correctly.