This repository has been archived on 2020-09-24. You can view files and clone it, but cannot push or open issues or pull requests.
consumer-api/consumer_api/app.py
marcsello 6f3ef28fb5
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
Implemented sync view
2020-03-29 18:12:16 +02:00

30 lines
696 B
Python

#!/usr/bin/env python3
import sentry_sdk
from flask import Flask
import os
from db import redis_client
from views import ConsumersView, LogView, SyncView
"""
Main Flask RESTful API
"""
__author__ = "@tormakris"
__copyright__ = "Copyright 2020, GoldenPogácsa Team"
__module_name__ = "app"
__version__text__ = "1"
sentry_sdk.init("https://0a106e104e114bc9a3fa47f9cb0db2f4@sentry.kmlabz.com/10")
app = Flask(__name__)
app.config['REDIS_URL'] = os.environ['REDIS_URL']
app.config['LOCAL_UUID'] = os.environ['LOCAL_UUID']
redis_client.init_app(app)
for view in [ConsumersView, LogView, SyncView]:
view.register(app, trailing_slash=False)
if __name__ == "__main__":
app.run(debug=True)