skeleton done
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Torma Kristóf 2020-04-17 16:51:26 +02:00
parent a3a3823304
commit 2a1b0ac653
Signed by: tormakris
GPG Key ID: DC83C4F2C41B1047
4 changed files with 47 additions and 0 deletions

31
app.py
View File

@ -0,0 +1,31 @@
import sentry_sdk
from sentry_sdk.integrations.flask import FlaskIntegration
from flask import Flask
import os
from rediscleint import redis_client
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)

View File

@ -0,0 +1,10 @@
from redisclient import redis_client
from flask import jsonify
from flask_classful import FlaskView
class IPEndpoint(FlaskView):
def post(self):
"""Ez kell neked"""
pass

3
redisclient.py Normal file
View File

@ -0,0 +1,3 @@
from flask_redis import FlaskRedis
redis_client = FlaskRedis()

View File

@ -1,2 +1,5 @@
flask
flask-classful
flask-redis
gunicorn
sentry-sdk[flask]