Skip to content

Particle analysis and tomography data display application (backend)

License

Notifications You must be signed in to change notification settings

DiamondLightSource/pato-backend

Repository files navigation

PATo API

Apache License

Source code https://github.com/DiamondLightSource/pato-backend

Particle Analysis and Tomography Data API.

Configuration

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 database
  • CONFIG_PATH: Path for the configuration file

Deployment

Running development server on your machine:

  1. Install the package with pip install . or pip install -e .
  2. Set the SQL_DATABASE_URL environment variable according to your database's location
  3. Run uvicorn with uvicorn pato.main:app --reload --port 8000

Testing

  • 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 pytest tests

About

Particle analysis and tomography data display application (backend)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages