Skip to main content

Graph DB interface for Translator API

Project description

PLATER

PLATER is a service to stand up REST endpoint over a neo4j or redis graph database. There are some restrictions on the data structure of the Neo4j backend to be fully utilized through PLATER.

Data structure restrictions:

  • All nodes should have an id to be searchable (Used in querying single Nodes)
  • All edges should have an id to be searchable (Used in generating ReasonerAPI)
  • Data is recommended to comply to the Translator Reasoner API.

Installation

To run the web server directly:

Create a virtual Environment and activate.

cd <PLATER-ROOT>
python<version> -m venv venv
source venv/bin/activate

Install dependencies

pip install -r PLATER/requirements.txt

Configure PLATER settings

Populate .env-template file with settings and save as .env in repo root dir.

 WEB_HOST=0.0.0.0
 WEB_PORT=8080
 DB_HOST=<neo4j_or_redis_address>
 DB_USERNAME=<user name required for neo4j, empty for redis>
 DB_PASSWORD=''
 DB_PORT=<redis port or neo4j http port>
 DB_NAME=<db name for redis, uses default db for neo4j>
 DB_TYPE=<use values 'redis' or 'neo4j'>
 PLATER_TITLE='Plater'
 PLATER_VERSION='1.0.0'

Run Script

./main.sh

DOCKER

Or build an image and run it.

  cd PLATER
  docker build --tag <image_tag> .
  cd ../
 docker run --env-file .env\
  --name plater\
  -p 8080:8080\
  --network <network_where_neo4j_is_running>\
  plater-tst

Clustering with Automat Server [Optional]

You can also serve several instances of plater through a common gateway(Automat). On specific instructions please refer to AUTOMAT's readme

Miscellaneous

/about Endpoint

The /about endpoint can be used to present meta-data about the current PLATER instance. This meta-data is served from <repo-root>/PLATER/about.json file. One can edit the contents of this file to suite needs. In containerized environment we recommend mounting this file as a volume.

Eg:

docker run -p 0.0.0.0:8999:8080  \
              --env DB_HOST=<your_db_host> \
              --env DB_PORT=<your_db_port> \
              --env DB_USERNAME=<db_user_name required for neo4j, ignored for redis> \
              --env DB_PASSWORD=<db_password> \
              --env DB_NAME=<required for redis> \ 
              --env DB_TYPE=<redis or neo4j> \  
              --env WEB_HOST=0.0.0.0 \
              -v <your-custom-about>:/<path-to-plater-repo-home>/plater/about.json \
              --network=<docker_network_neo4j_is_running_at> \    
               <image_tag>   

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

PLATER-GRAPH-1.9.7.tar.gz (27.3 kB view details)

Uploaded Source

Built Distribution

PLATER_GRAPH-1.9.7-py2.py3-none-any.whl (31.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file PLATER-GRAPH-1.9.7.tar.gz.

File metadata

  • Download URL: PLATER-GRAPH-1.9.7.tar.gz
  • Upload date:
  • Size: 27.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for PLATER-GRAPH-1.9.7.tar.gz
Algorithm Hash digest
SHA256 e04dd481bd13b8e0be466ff7e71c3d9e04885c82c0339a4d96e6aa16b8ebbd1d
MD5 de3aa1604b93c3d3f4631672f55db4d3
BLAKE2b-256 4cbea3e8e90bdf865d46e8d0e5c57c4f0b93bf3852d70413cc64c29f46c9719c

See more details on using hashes here.

File details

Details for the file PLATER_GRAPH-1.9.7-py2.py3-none-any.whl.

File metadata

  • Download URL: PLATER_GRAPH-1.9.7-py2.py3-none-any.whl
  • Upload date:
  • Size: 31.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for PLATER_GRAPH-1.9.7-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 4e1af5730c563af6962bb3bff6dac054bfb7fb0b75be3b3bd208d17a6ce1d764
MD5 f2dfb7d03ec0eef02033af1b85a3d972
BLAKE2b-256 99ccc6271895262a7e525c2dafe2477a0ba9badc72fcb02a6816418facebadc0

See more details on using hashes here.

Supported by

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