Metadata-Version: 2.1
Name: bento-sts
Version: 0.1.8
Summary: Bento Simple Terminology Server
License: Apache 2.0
Author: Mark Benson
Author-email: mark.benson@nih.gov
Requires-Python: >=3.8,<4.0
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: Bootstrap-Flask (>=1.5.2)
Requires-Dist: Flask-Moment (>=0.5.2)
Requires-Dist: Flask-Paginate (>=2021.10.29)
Requires-Dist: Flask-WTF (>=0.14.3)
Requires-Dist: Jinja2 (>=2.11.3)
Requires-Dist: MarkupSafe (>=1.1.1)
Requires-Dist: PyYAML (>=5.4.1)
Requires-Dist: WTForms (>=2.1)
Requires-Dist: WTForms-Components (>=0.10.5)
Requires-Dist: Werkzeug (>=1.0.1)
Requires-Dist: bento-meta (>=0.2.10)
Requires-Dist: connexion (>=2.6.0)
Requires-Dist: flask-testing (>=0.8.1,<0.9.0)
Requires-Dist: guess-language-spirit (>=0.5.3)
Requires-Dist: gunicorn (>=20.1.0)
Requires-Dist: idna (>=2.6)
Requires-Dist: importlib_resources (>=5.4.0)
Requires-Dist: itsdangerous (>=0.24)
Requires-Dist: neo4j (>=4.1)
Requires-Dist: pytest (>=8.0.0)
Requires-Dist: pytest-docker (>=3.1.1)
Requires-Dist: python-dateutil (>=2.6.1)
Requires-Dist: python-dotenv (>=0.15.0)
Requires-Dist: python-editor (>=1.0.3)
Requires-Dist: pytz (>=2017.2)
Requires-Dist: requests (>=2.20.0)
Requires-Dist: six (>=1.15.0)
Requires-Dist: swagger-ui-bundle (>=0.0.9)
Requires-Dist: urllib3 (>=1.26.5)
Requires-Dist: visitor (>=0.1.3)
Description-Content-Type: text/markdown

# bento-sts

Simple Terminology Service for [Bento MDB](https://github.com/CBIIT/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/](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](./python/bento-sts.env.eg).

For testing:

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

For production, consider using
[gunicorn](https://docs.gunicorn.org/en/latest/index.html). [./src](./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](https://python-poetry.org/):

    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

[in progress]

