This is a small Quart application providing files for ingestion (through bento_web
,
for bento_wes
). By default, the file served are read on the existing filesystem, but
these can also be read from a minIO instance (or AWS S3 for that matter).
Requires: Python 3.10+ and Poetry 1.5+
Set SERVICE_URL
to the base URL of the service (e.g. https://bentov2.local/api/drop-box
).
This is used for file URI generation.
If using the current filesystem to serve file, you can use the SERVICE_DATA
environment variable to point to some location (./data by default).
Poetry is used to manage dependencies.
- Install
poetry
:pip install poetry
- Install project dependencies inside a Poetry-managed virtual environment:
poetry install
To run the service in development mode, use the following command:
poetry run python -m debugpy --listen "0.0.0.0:5678" -m uvicorn \
"bento_drop_box_service.app:application" \
--host 0.0.0.0 \
--port 5000 \
--reload
To run tests and linting, run Tox:
poetry run tox
The bento_drop_box_service
service can be deployed with an ASGI server like
Uvicorn, specifying bento_drop_box_service.app:application
as the
ASGI application.
It is best to then put an HTTP server software such as NGINX in front of Hypercorn.