ISPyB backend server based on FastAPI.
You need to have python >= 3.10
.
Install requirements with
pip install -r requirements.txt
Define required environment variables
export SQLALCHEMY_DATABASE_URI="mysql+mysqlconnector://<user>:<password>@<hostname>/<db_name>"
export SECRET_KEY="changeme"
Start the server with
sh uvicorn.sh
You can start using the server through the OpenAPI documenation
Documentation can be found in the /docs
directory.
A web documentation is available for the latest version at https://ispyb.github.io/py-ispyb/.
To serve it locally, follow these steps:
pip install mkdocs
mkdocs serve