Skip to main content

bento-sts

Simple Terminology Service for Bento MDB.

The STS provides a web-based UI and a RESTful API for browsing and accessing graph data models and associated controlled vocabulary. See https://cbiit.github.io/bento-meta/ for an overview of the backend Metamodel Database (MDB).

Install

pip install bento-sts

Run

In the run directory, provide a .env file, with your appropriate values for the environment variables given the the example file bento-sts.env.eg.

For testing:

flask --app "bento_sts.sts:create_app()" run

For production, consider using gunicorn. ./src contains two gunicorn config file examples, for development and production.

gunicorn -c gunicorn.conf.dev.py

will start STS on a gunicorn server at http://localhost:8000.

Dev Install

To work on bento-sts, make sure you have Poetry:

pip install poetry

Then use it from the python working directory to install dependencies into a virtualenv:

cd bento-sts/python
poetry install

Dev Model Database for Testing

The easiest way to provide a backend graph database for a local STS is to use Docker. The following will get a workable model database running for STS development:

docker pull maj1/test-mdb
docker run -d -p7687:7687 --env NEO4J_AUTH=none --name test-mdb maj1/test-mdb

Then set the following in your src/.env file:

NEO4J_MDB_URI=bolt://localhost:7867
NEO4J_MDB_USER=neo4j
NEO4J_MDB_PASS=neo4j
STS_LOGFILE=./sts.log

Run Local STS

Once the database is running and configured, start the local STS as follows:

cd bento-sts/python/src
poetry run flask --app "bento_sts.sts:create_app()" run

You should be able to see the frontend on your machine at http://localhost:5000.

API Docs

The API is documented in an OpenAPI (Swagger) schema.

Docker is probably the easiest way to run a local Swagger server. This will bring up a Swagger server at port 6000:

# from the repo root, run...
docker run -p 6000:8080 -e SWAGGER_JSON=/work/swagger.json -v ${PWD}/swagger:/work docker.swagger.io/swaggerapi/swagger-ui

(see https://swagger.io/docs/open-source-tools/swagger-ui/usage/installation/)

Metadata

Release files for bento-sts 0.1.21

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bento-sts 0.1.21
File Size Uploaded
bento_sts-0.1.21.tar.gz 50.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bento-sts 0.1.21
File Interpreter ABI Platform
bento_sts-0.1.21-py3-none-any.whl Python 3 none any Details

Total release size: 116.3 kB

Release files / bento_sts-0.1.21.tar.gz

Download URL bento_sts-0.1.21.tar.gz
Size 50.8 kB
Tags Source
SHA-256 checksum
How to use checksums
8ca34c9153a1fa42b1cb17b6e4e53ae5c148172449db30e87d2f7e4a54801960
BLAKE2b-256 checksum
How to use checksums
b3fd4b47378320433d09c8c5ddb3a402096f03342244b84ad135d300914d20cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / bento_sts-0.1.21-py3-none-any.whl

Download URL bento_sts-0.1.21-py3-none-any.whl
Size 65.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a103b8324f7f4796dd3f963104fc28e00af0d828db6e4189e06709f33367c6ec
BLAKE2b-256 checksum
How to use checksums
ad678d8c8325a179ee72cad79fb36a9bb2e6d86000ef2506c86c06d2cba4321f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release history Release notifications | RSS feed

This release

0.1.21 This release

2 release files

0.1.20

2 release files

0.1.19

2 release files

0.1.18

2 release files

0.1.15

2 release files

0.1.14

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page