Source code | https://github.com/DiamondLightSource/pato-backend |
Particle Analysis and Tomography Data API.
The API supports a configuration file, that follows the example set in config.json
, but most importantly, two environment variables need to be set:
SQL_DATABASE_URL
: The URL for the databaseCONFIG_PATH
: Path for the configuration file
Running development server on your machine:
- Install the package with
pip install .
orpip install -e .
- Set the SQL_DATABASE_URL environment variable according to your database's location
- Run
uvicorn
with uvicorn pato.main:app --reload --port 8000
- Build the database Docker image in database with
podman build . -t diamond-ispyb
- Run with
podman run -p 3306:3306 --detach --name diamond-ispyb localhost/diamond-ispyb
- You may change the port or where the container itself runs, just remember to update .test.env
- Run with
- Run
pytest tests