# 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]
Raw data
{
"_id": null,
"home_page": "https://github.com/CBIIT/bento-sts",
"name": "bento-sts",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.8",
"maintainer_email": null,
"keywords": null,
"author": "Mark Benson",
"author_email": "mark.benson@nih.gov",
"download_url": "https://files.pythonhosted.org/packages/fc/38/2be8a956c89d909d42d6e5a3c290ab8c5c3d791e61d2f94ded2dabc04c4a/bento_sts-0.1.9.tar.gz",
"platform": null,
"description": "# bento-sts\n\nSimple Terminology Service for [Bento MDB](https://github.com/CBIIT/bento-mdb).\n\nThe STS provides a web-based UI and a RESTful API for\nbrowsing and accessing graph data models and associated controlled\nvocabulary. See [https://cbiit.github.io/bento-meta/](https://cbiit.github.io/bento-meta/)\nfor an overview of the backend Metamodel Database (MDB). \n\n## Install\n\n pip install bento-sts\n\n## Run\n\nIn the run directory, provide a `.env` file, with your appropriate\nvalues for the environment variables given the the example file\n[bento-sts.env.eg](./python/bento-sts.env.eg).\n\nFor testing:\n\n flask --app \"bento_sts.sts:create_app()\" run\n\nFor production, consider using\n[gunicorn](https://docs.gunicorn.org/en/latest/index.html). [./src](./src)\ncontains two gunicorn config file examples, for development and\nproduction.\n\n gunicorn -c gunicorn.conf.dev.py\n\nwill start STS on a gunicorn server at http://localhost:8000.\n\n\n## Dev Install\n\nTo work on bento-sts, make sure you have [Poetry](https://python-poetry.org/):\n\n pip install poetry\n\nThen use it from the python working directory to install dependencies into a virtualenv:\n\n cd bento-sts/python\n poetry install\n\n## Dev Model Database for Testing\n\nThe easiest way to provide a backend graph database for a local STS is to use Docker.\nThe following will get a workable model database running for STS development:\n\n docker pull maj1/test-mdb\n docker run -d -p7687:7687 --env NEO4J_AUTH=none --name test-mdb maj1/test-mdb\n\nThen set the following in your src/.env file:\n\n NEO4J_MDB_URI=bolt://localhost:7867\n NEO4J_MDB_USER=neo4j\n NEO4J_MDB_PASS=neo4j\n STS_LOGFILE=./sts.log\n\n## Run Local STS\n\nOnce the database is running and configured, start the local STS as follows:\n\n cd bento-sts/python/src\n poetry run flask --app \"bento_sts.sts:create_app()\" run\n\nYou should be able to see the frontend on your machine at http://localhost:5000.\n\n## API Docs\n\n[in progress]\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Bento Simple Terminology Server",
"version": "0.1.9",
"project_urls": {
"Homepage": "https://github.com/CBIIT/bento-sts",
"Repository": "https://github.com/CBIIT/bento-sts"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a31906978a20e0034f3f42cd92db88a6fcb043724fed31e8a4b13816d5a5322f",
"md5": "e3e9e182c1b0723ae4d5641ce179dd7a",
"sha256": "d7d98f7e655bd8f9aa0c74117a972b18afbecf1d10c38216229fb1763e9f73ce"
},
"downloads": -1,
"filename": "bento_sts-0.1.9-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e3e9e182c1b0723ae4d5641ce179dd7a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.8",
"size": 67221,
"upload_time": "2024-11-30T03:56:21",
"upload_time_iso_8601": "2024-11-30T03:56:21.706807Z",
"url": "https://files.pythonhosted.org/packages/a3/19/06978a20e0034f3f42cd92db88a6fcb043724fed31e8a4b13816d5a5322f/bento_sts-0.1.9-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "fc382be8a956c89d909d42d6e5a3c290ab8c5c3d791e61d2f94ded2dabc04c4a",
"md5": "9ba7dc1e6db1ed12ffcaa81e817c8f14",
"sha256": "b8f1bc083d1b1c75dfb5fb3ccb65e2c881ee2f8efc280dbbb50aea772671b354"
},
"downloads": -1,
"filename": "bento_sts-0.1.9.tar.gz",
"has_sig": false,
"md5_digest": "9ba7dc1e6db1ed12ffcaa81e817c8f14",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.8",
"size": 45665,
"upload_time": "2024-11-30T03:56:30",
"upload_time_iso_8601": "2024-11-30T03:56:30.676286Z",
"url": "https://files.pythonhosted.org/packages/fc/38/2be8a956c89d909d42d6e5a3c290ab8c5c3d791e61d2f94ded2dabc04c4a/bento_sts-0.1.9.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-30 03:56:30",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "CBIIT",
"github_project": "bento-sts",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "bento-sts"
}