bento-sts


Namebento-sts JSON
Version 0.1.18 PyPI version JSON
download
home_pageNone
SummaryBento Simple Terminology Server
upload_time2025-08-27 13:34:42
maintainerMark A. Jensen
docs_urlNone
authorMark Benson
requires_python>=3.10
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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

The API is documented in an [OpenAPI (Swagger) schema](/swagger/swagger.yaml). 

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/](https://swagger.io/docs/open-source-tools/swagger-ui/usage/installation/))


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "bento-sts",
    "maintainer": "Mark A. Jensen",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "mark.jensen@nih.gov",
    "keywords": null,
    "author": "Mark Benson",
    "author_email": "mark.benson@nih.gov",
    "download_url": "https://files.pythonhosted.org/packages/d0/75/e4545dcc5f9d325aa7dd8ccd43c0936e7db0f4b286295b23e4ce910e78d5/bento_sts-0.1.18.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 production.\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\nThe API is documented in an [OpenAPI (Swagger) schema](/swagger/swagger.yaml). \n\nDocker is probably the easiest way to run a local Swagger server. \nThis will bring up a Swagger server at port 6000:\n\n    # from the repo root, run...\n    docker run -p 6000:8080 -e SWAGGER_JSON=/work/swagger.json -v ${PWD}/swagger:/work docker.swagger.io/swaggerapi/swagger-ui\n\n(see [https://swagger.io/docs/open-source-tools/swagger-ui/usage/installation/](https://swagger.io/docs/open-source-tools/swagger-ui/usage/installation/))\n\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Bento Simple Terminology Server",
    "version": "0.1.18",
    "project_urls": {
        "Bug Tracker": "https:/github.com/CBIIT/bento-sts/issues",
        "Homepage": "https://github.com/CBIIT/bento-sts"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "590bd0f7ad92804024901e4d77020eadfc60b3f8b50f8f2f55d71ddcace27b14",
                "md5": "528f190818a701de1155d5fab4a1a14c",
                "sha256": "7b7a7938c8a71bf4deadaeca10ad119bcc7a66a430491dec92dd42f25ec8bf7d"
            },
            "downloads": -1,
            "filename": "bento_sts-0.1.18-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "528f190818a701de1155d5fab4a1a14c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 61418,
            "upload_time": "2025-08-27T13:34:41",
            "upload_time_iso_8601": "2025-08-27T13:34:41.868364Z",
            "url": "https://files.pythonhosted.org/packages/59/0b/d0f7ad92804024901e4d77020eadfc60b3f8b50f8f2f55d71ddcace27b14/bento_sts-0.1.18-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "d075e4545dcc5f9d325aa7dd8ccd43c0936e7db0f4b286295b23e4ce910e78d5",
                "md5": "23a50fffc913aa043a15261d1a58c8cd",
                "sha256": "ed75569cc3f535cb5d9b9b23df7bcdc44d693e3617e7d292463aee08905e3c73"
            },
            "downloads": -1,
            "filename": "bento_sts-0.1.18.tar.gz",
            "has_sig": false,
            "md5_digest": "23a50fffc913aa043a15261d1a58c8cd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 47245,
            "upload_time": "2025-08-27T13:34:42",
            "upload_time_iso_8601": "2025-08-27T13:34:42.843281Z",
            "url": "https://files.pythonhosted.org/packages/d0/75/e4545dcc5f9d325aa7dd8ccd43c0936e7db0f4b286295b23e4ce910e78d5/bento_sts-0.1.18.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-27 13:34:42",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "CBIIT",
    "github_project": "bento-sts",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "bento-sts"
}
        
Elapsed time: 1.22174s