Developer setup¶
Prerequisites¶
- Python 3.12+
uv— fast Python package managerrsyncandopenssh-clienton your PATH (for functional tests only)
Clone and install¶
This installs the application dependencies plus the dev extras: pytest, pytest-cov, mypy, and ruff.
To work on the documentation, install the docs extra instead (or alongside dev):
Environment¶
.env
APP_ENV=development # disables login checks
SECRET_KEY=change-me-locally
ADMIN_USER=admin
ADMIN_PASSWORD=dev-password
GMAIL_ADDRESS=your.account@gmail.com
GMAIL_PASSWORD=your-app-password
DATA_ROOT=dev-data # created automatically
In development mode:
- All routes are accessible without logging in
DATA_ROOTdefaults todev-data/in the project root- Debug mode is on (auto-reload on code changes)
Run the dev server¶
Or use the VS Code launch configuration in .vscode/launch.json.
Code style¶
uv run ruff check src/ tests/ # lint
uv run ruff format src/ tests/ # format
uv run mypy src/ # type check
Ruff is configured in pyproject.toml with line-length = 100 and the E, F, I, UP rule sets.
Project dependencies¶
Core runtime dependencies (from pyproject.toml):
| Package | Purpose |
|---|---|
flask |
Web framework |
gunicorn |
Production WSGI server |
APScheduler |
Cron-style background job scheduler |
PyYAML |
Parsing backup_config.yml |
jinja2 |
Email and HTML templating |
python-dotenv |
Loading .env in development |
python-json-logger |
Structured JSON logging |