Connect PG to the app
This commit is contained in:
parent
707a5c41cd
commit
039855db6f
7
app.py
7
app.py
@ -1,6 +1,13 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import connexion
|
||||
import sqlalchemy
|
||||
|
||||
from sqlalchemy import create_engine, Column, Integer, String
|
||||
from sqlalchemy.ext.declarative import declarative_base
|
||||
|
||||
engine = create_engine( os.environ.get( 'DATABASE_URL', 'sqlite:///:memory:' ), echo=True )
|
||||
|
||||
app = connexion.App(__name__, specification_dir='./swagger/')
|
||||
app.add_api('swagger.yaml',
|
||||
|
@ -2,3 +2,5 @@ Flask==0.11.1
|
||||
Flask-RESTful==0.3.5
|
||||
connexion==1.0.129
|
||||
gunicorn
|
||||
sqlalchemy
|
||||
psycopg2
|
||||
|
Loading…
Reference in New Issue
Block a user