flask-common attempt

This commit is contained in:
2017-08-25 23:38:02 -04:00
parent 27a52db490
commit ee6f49381e
3 changed files with 99 additions and 5 deletions
+1
View File
@@ -15,3 +15,4 @@ bs4 = "*"
requests = "*"
simplejson = "*"
flask-cache = "*"
flask-common = "*"
+95
View File
@@ -0,0 +1,95 @@
alabaster==0.7.10
apipkg==1.4
Babel==2.5.0
beautifulsoup4==4.6.0
bleach==2.0.0
blinker==1.4
brotlipy==0.7.0
bs4==0.0.1
certifi==2017.7.27.1
cffi==1.10.0
chardet==3.0.4
click==6.7
codecov==2.0.9
colorama==0.3.9
contextlib2==0.5.5
coverage==4.4.1
crayons==0.1.2
cssselect==1.0.1
dateparser==0.6.0
decorator==4.1.2
detox==0.11
docopt==0.6.2
docutils==0.14
enum-compat==0.0.2
et-xmlfile==1.0.1
eventlet==0.21.0
execnet==1.4.1
flake8==3.4.1
Flask==0.12.2
Flask-Cache==0.13.1
Flask-Common==0.2.0
Flask-Limiter==0.9.5.1
Flask-SSLify==0.1.5
greenlet==0.4.12
gunicorn==19.7.1
html5lib==0.999999999
httpbin==0.6.0
humanize==0.5.1
idna==2.6
imagesize==0.7.1
itsdangerous==0.24
jdcal==1.3
Jinja2==2.9.6
limits==1.2.1
lxml==3.8.0
MarkupSafe==1.0
maya==0.3.2
mccabe==0.6.1
meinheld==0.6.1
numpy==1.13.1
odfpy==1.3.5
openpyxl==2.4.8
pandas==0.20.3
pendulum==1.2.4
pluggy==0.4.0
psycopg2==2.7.3
py==1.4.34
pycodestyle==2.3.1
pycparser==2.18
pyflakes==1.5.0
Pygments==2.2.0
pyquery==1.2.17
PySocks==1.6.7
pytest==3.2.1
pytest-cov==2.5.1
pytest-forked==0.2
pytest-httpbin==0.0.7
pytest-mock==1.6.2
pytest-xdist==1.20.0
python-dateutil==2.6.1
pytz==2017.2
pytzdata==2017.2
PyYAML==3.12
raven==6.1.0
readme-renderer==17.2
records==0.5.0
regex==2017.7.28
-e git+git@github.com:requests/requests.git@5dcbdb50fc9652cbeffeec22a21d1196e938bfca#egg=requests
ruamel.yaml==0.15.32
simplejson==3.11.1
six==1.10.0
snowballstemmer==1.2.1
Sphinx==1.5.5
SQLAlchemy==1.1.13
tablib==0.11.5
tox==2.7.0
tzlocal==1.4
unicodecsv==0.14.1
urllib3==1.22
virtualenv==15.1.0
webencodings==0.5.1
Werkzeug==0.12.2
whitenoise==3.3.0
xlrd==1.1.0
xlwt==1.3.0
+3 -5
View File
@@ -5,6 +5,7 @@ from wallets import wallets
from flask import Flask, jsonify, render_template, request
from flask_cache import Cache
from flask_common import Common
from flask_sslify import SSLify
import maya
@@ -16,15 +17,12 @@ API_KEYS = os.environ.get('API_KEYS', '').split(':')
db = records.Database()
pro_db = records.Database(os.environ['HEROKU_POSTGRESQL_TEAL_URL'])
app = Flask(__name__)
common = Common(app)
sslify = SSLify(app)
cache = Cache(app ,config={'CACHE_TYPE': 'simple'})
@app.route('/')
@cache.cached(timeout=60)
@common.cache.cached(timeout=60)
def hello():
lbc = get_coin('lbc')