Development setup and tooling for contributors.
For contribution guidelines (reporting bugs, suggesting features, code of conduct), see CONTRIBUTING.md.
The tower-runtime crate is the Rust runtime used to execute Tower apps. The main crate defines the interfaces; the local package implements running Tower packages locally.
See the tower-package crate for how Tower packages are built and run.
Make sure you have uv installed.
To interactively test your changes, start a REPL with the project installed in development mode:
uv run python>>> import tower
>>> table = tower.tables("my_table").load()uv run tower --helpCopy pytest.ini.template to pytest.ini:
cp pytest.ini.template pytest.iniSet the required environment variables (e.g. TOWER_INFERENCE_ROUTER_API_KEY) to your own or test values.
Then install dependencies and run the tests:
uv sync --locked --all-extras --dev
uv run pytest testsTypical development loop:
- Make changes
- Run
uv run pytest tests - Run
uv run tower --helpor other CLI commands to verify behavior
If you need to get the latest OpenAPI SDK, you can run:
./scripts/generate-python-api-client.shWe use Black for Python code formatting. The pre-commit hooks will automatically format your code, but you can also run it manually:
# Format all Python files in the project
uv run --group dev black .
# Check formatting without making changes
uv run --group dev black --check .Contributions must follow our Code of Conduct.