29 |
Hana data in a Python web application
30 |
This application uses common python/web frameworks. Gathering sales informations...
31 |
32 |
33 |
34 | Region Name |
35 | Product Name |
36 | Sales Amount |
37 |
38 |
39 |
40 |
41 |
Try also or .
42 |
43 |
44 |
--------------------------------------------------------------------------------
/config.py:
--------------------------------------------------------------------------------
1 | class DevelopmentConfig(object):
2 | DEBUG = True
3 | TESTING = False
4 |
5 |
6 | class Hana(object):
7 | HOST = "localhost"
8 | PORT = "00000"
9 | USER = "SYSTEM"
10 | PASS = "XXXXXX"
11 |
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | click==6.7
2 | flask>=0.12.3
3 | itsdangerous==0.24
4 | Jinja2>=2.10.1
5 | MarkupSafe==1.0
6 | pyhdb==0.3.3
7 | werkzeug>=0.15.3
8 |
--------------------------------------------------------------------------------
/run.py:
--------------------------------------------------------------------------------
1 | from flask import Flask, render_template
2 | from app.modules.Controller import controller
3 |
4 | app = Flask("HanaToPython", template_folder='app/templates', instance_relative_config=True)
5 | app.register_blueprint(controller)
6 | app.config.from_object('config.DevelopmentConfig')
7 |
8 |
9 | @app.route("/")
10 | def home():
11 | return render_template('index.html')
12 |
13 | if __name__ == '__main__':
14 | app.run(use_reloader=True)
15 |
--------------------------------------------------------------------------------