forked from SUNCAT-Center/CatalysisHubBackend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.template
38 lines (20 loc) · 1.2 KB
/
README.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
[![Build Status](https://travis-ci.org/{GITHUB_USER}/{REPO}.svg?branch={BRANCH})](https://travis-ci.org/{GITHUB_USER}/{REPO})
[![Coverage Status](https://coveralls.io/repos/github/{GITHUB_USER}/{REPO}/badge.svg?branch={BRANCH})](https://coveralls.io/github/{GITHUB_USER}/{REPO}?branch={BRANCH})
## 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](http://docs.sqlalchemy.org/en/latest/core/type_basics.html)
Run App from command line
./app.py
And open a browser in [http://localhost:5000/graphql](http://localhost:5000/graphql)
Have fun!