AiiDA REST API for data queries and workflow management.
Uses pydantic
for models/validation and fastapi
for the ASGI application.
Serve e.g. using uvicorn
.
/users
(GET/POST) and/users/<id>
(GET) endpoints- Authentication via JSON web tokens (see
test_auth.py
for the flow; also works via interactive docs) User
pydantic
model for validation- Automatic documentation at
http://127.0.0.1:8000/docs
- Full specification at
http://127.0.0.1:8000/openapi.json
pip install aiida-restapi[auth]
# start rest api
uvicorn aiida_restapi:app
# start rest api and reload for changes (for development)
uvicorn aiida_restapi:app --reload
See the examples directory.
git clone https://github.com/aiidateam/aiida-restapi .
cd aiida-restapi
pip install -e .[pre-commit,testing] # install extra dependencies
pre-commit install # install pre-commit hooks
pytest -v # discover and run all tests
See the developer guide for more information.
MIT