Overview
Quick Start
Install uv – see getting started with uv
Run:
uv sync --all-groups --all-extras cp .env.template .env nano .env # update POSTGRES_HOST to your needs (try POSTGRES_HOST=localhost) docker compose up postgres -d uv run fastapi run app/main.py --port 8000
Open localhost:8000 to verify the backend is running
Setup for Development
The instructions below are a more detailed version of the Quick Start instructions.
1. Install Dependencies
This project uses the uv package manager.
After installing uv, use the following command to install the dependencies:
uv sync --all-groups --all-extras
2. Set up Environment
You will need a .env file. Copy the .env.template:
cp .env.template .env
Edit the file to set POSTGRES_HOST according to your environment. In most cases:
POSTGRES_HOST=localhost
For more detailed options have a look at Configuration
3. Start Postgres
Start the postgres database via docker:
docker compose up postgres -d
4. Run the Backend
Now you can start with backend with:
uv run fastapi run app/main.py --port 8000
You can verify it working by opening the fastapi docs.
Dependencies
The dependencies of this project are configured in pyproject.toml and locked via uv.lock by uv.
For a license summary have a look at Dependencies.
Code Formatting
We use ruff as our code formatter.
Format the code with:
uv run ruff format
Further Information
Architecture overview: Architecture
How to run the tests: Testing
How to write docs: Documentation
Some parts of the openqasm3 python package documentation important for us: Openqasm3
Automated code documentation from embedded docs: API Reference