BioDM: A fast and RESTful Data Management framework
BioDM: A fast and RESTful Data Management framework
Introduction Presentation: https://www.overleaf.com/read/wxpdnptnkpsy
Source Code: https://github.com/bag-cnag/biodm
Documentation: https://bag-cnag.github.io/biodm/
BioDM is a fast, modular, stateless and asynchronous REST API framework with the following core features:
Provide standard HTTP REST-to-CRUD endpoints from developper provided entity definitions:
`SQLAlchemy <https://github.com/sqlalchemy/sqlalchemy/>`_ tables
`marshmallow <https://github.com/marshmallow-code/marshmallow>`_ schemas
Inter-operate services ecosystem:
Permissions leveraging Keycloak
Storage leveraging S3 protocol
Jobs & Visualization leveraging Kubernetes cluster
Also sets up essentials:
Liveness endpoint
Login and token retrieval system
OpenAPI schema generation through apispec
It sits on the F**indability and **A**ccessibility part of the **F.A.I.R principles, while remaining flexible for the remainder to be implemented.
Quickstart
Install
pip3 install git+https://github.com/bag-cnag/biodm
To run an API instance you will also need an ASGI server, e.g. uvicorn+uvloop:
pip3 install uvicorn uvloop
Run Example project
Provided within this repository.
Note: Prior to this step,
it is recommended to create and activate a new python3
(>=3.11) virtual environment.
pip3 install -r src/requirements/dev.txt
pip3 install .
you may use the following in order to deploy the development stack:
docker compose -f compose.yml up --build -d
It is recommended to give them hostnames. In particular keycloak does hard checks and login shall fail without this step.
sudo cat >> /etc/hosts <<EOF
# biodm-dev
10.10.0.2 postgres.local
10.10.0.3 keycloak.local host.minikube.internal
10.10.0.4 s3bucket.local
EOF
Then you may run example
:
cd src/example/
python3 src/example/app.py
This stack comes with an interactive swagger-ui
visitable at http://localhost:9080/
once the server is running.
To use kubernetes functionalities or tweak default configuration you should visit getting started section of the documentation.
About
Developed at CNAG
Contributing
No contributing policy yet. However, issues and pull requests are welcome.
Licence
GNU/AGPLv3