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.
producer-endpoint/app.py

32 lines
698 B
Python
Raw Normal View History

2020-04-17 16:51:26 +02:00
import sentry_sdk
from sentry_sdk.integrations.flask import FlaskIntegration
from flask import Flask
import os
2020-04-22 00:50:40 +02:00
from redisclient import redis_client
2020-04-17 16:51:26 +02:00
from endpoints import IPEndpoint
"""
Main Flask RESTful API
"""
__author__ = "@tormakris"
__copyright__ = "Copyright 2020, GoldenPogácsa Team"
__module_name__ = "app"
__version__text__ = "1"
sentry_sdk.init(
dsn="https://f0eed44d403045468aad035e93986f62@sentry.kmlabz.com/14",
integrations=[FlaskIntegration()]
)
app = Flask(__name__)
app.config['REDIS_URL'] = os.environ['REDIS_URL']
redis_client.init_app(app)
for view in [IPEndpoint]:
view.register(app, trailing_slash=False)
if __name__ == "__main__":
app.run(debug=True)