Skip to main content

Bento Simple Terminology Server

Project description

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/)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bento_sts-0.1.21.tar.gz (50.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bento_sts-0.1.21-py3-none-any.whl (65.5 kB view details)

Uploaded Python 3

File details

Details for the file bento_sts-0.1.21.tar.gz.

File metadata

  • Download URL: bento_sts-0.1.21.tar.gz
  • Upload date:
  • Size: 50.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for bento_sts-0.1.21.tar.gz
Algorithm Hash digest
SHA256 8ca34c9153a1fa42b1cb17b6e4e53ae5c148172449db30e87d2f7e4a54801960
MD5 da067e10fc94252189b2a671fd1b5c5f
BLAKE2b-256 b3fd4b47378320433d09c8c5ddb3a402096f03342244b84ad135d300914d20cb

See more details on using hashes here.

File details

Details for the file bento_sts-0.1.21-py3-none-any.whl.

File metadata

  • Download URL: bento_sts-0.1.21-py3-none-any.whl
  • Upload date:
  • Size: 65.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for bento_sts-0.1.21-py3-none-any.whl
Algorithm Hash digest
SHA256 a103b8324f7f4796dd3f963104fc28e00af0d828db6e4189e06709f33367c6ec
MD5 98f2fbe20f36afd083b590ce407d5a90
BLAKE2b-256 ad678d8c8325a179ee72cad79fb36a9bb2e6d86000ef2506c86c06d2cba4321f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page