SUNCAT-Center / CatalysisHubBackend

Backend for the Catalysis-hub database build with Flask, GraphQL and SQLAlchemy

Home Page:http://api.catalysis-hub.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status Coverage Status

Flask GraphQL ASE DB Demo

To run this demo, first clone this repository to a local directory

git clone ....

Change into the created directory and create a virtualenv inside and activate it

virtualenv -p python3.6 .
. bin/activate

You can always deactivate it by typing deactivate.

While you are at it you could ensure that you are using the latest pip version

pip install --upgrade pip

Then install required python libraries

pip install -r requirements.txt

Copy a SQLite database file into the directory and set the path in models.py

engine = sqlalchemy.create_engine('sqlite:///<PATH_TO_SQLITE_DB>')

Possibly extend the database DB schema in models.py according to SQAlchemy Types

Run App from command line

./app.py

And open a browser in http://localhost:5000/graphql

Have fun!

About

Backend for the Catalysis-hub database build with Flask, GraphQL and SQLAlchemy

http://api.catalysis-hub.org

License:GNU General Public License v3.0


Languages

Language:Python 99.6%Language:Shell 0.4%Language:Procfile 0.0%