├── .gitignore ├── app.ini ├── app ├── __init__.py ├── templates │ └── public │ │ └── index.html └── views.py ├── config.py ├── dev.ini ├── readme.md ├── requirements.txt └── run.py /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | share/python-wheels/ 24 | *.egg-info/ 25 | .installed.cfg 26 | *.egg 27 | MANIFEST 28 | 29 | # PyInstaller 30 | # Usually these files are written by a python script from a template 31 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 32 | *.manifest 33 | *.spec 34 | 35 | # Installer logs 36 | pip-log.txt 37 | pip-delete-this-directory.txt 38 | 39 | # Unit test / coverage reports 40 | htmlcov/ 41 | .tox/ 42 | .nox/ 43 | .coverage 44 | .coverage.* 45 | .cache 46 | nosetests.xml 47 | coverage.xml 48 | *.cover 49 | .hypothesis/ 50 | .pytest_cache/ 51 | 52 | # Translations 53 | *.mo 54 | *.pot 55 | 56 | # Django stuff: 57 | *.log 58 | local_settings.py 59 | db.sqlite3 60 | 61 | # Flask stuff: 62 | instance/ 63 | .webassets-cache 64 | 65 | # Scrapy stuff: 66 | .scrapy 67 | 68 | # Sphinx documentation 69 | docs/_build/ 70 | 71 | # PyBuilder 72 | target/ 73 | 74 | # Jupyter Notebook 75 | .ipynb_checkpoints 76 | 77 | # IPython 78 | profile_default/ 79 | ipython_config.py 80 | 81 | # pyenv 82 | .python-version 83 | 84 | # celery beat schedule file 85 | celerybeat-schedule 86 | 87 | # SageMath parsed files 88 | *.sage.py 89 | 90 | # Environments 91 | .env 92 | .venv 93 | env/ 94 | venv/ 95 | ENV/ 96 | env.bak/ 97 | venv.bak/ 98 | 99 | # Spyder project settings 100 | .spyderproject 101 | .spyproject 102 | 103 | # Rope project settings 104 | .ropeproject 105 | 106 | # mkdocs documentation 107 | /site 108 | 109 | # mypy 110 | .mypy_cache/ 111 | .dmypy.json 112 | dmypy.json 113 | 114 | # Pyre type checker 115 | .pyre/ 116 | 117 | .vscode 118 | dump.rdb 119 | guide.md 120 | 121 | # Uncomment the line below if using in production 122 | # You shouldn't keep your config file in version control 123 | # config.py -------------------------------------------------------------------------------- /app.ini: -------------------------------------------------------------------------------- 1 | [uwsgi] 2 | ; Production .ini file 3 | module = run:app 4 | master = true 5 | 6 | ; There is no magic rule for setting the number of processes or threads to use. 7 | ; It is very much application and system dependent so you'll need to experiment. 8 | processes = 2 9 | threads = 2 10 | 11 | socket = app.sock 12 | chmod-socket = 660 13 | vacuum = true 14 | die-on-term = true -------------------------------------------------------------------------------- /app/__init__.py: -------------------------------------------------------------------------------- 1 | from flask import Flask 2 | 3 | 4 | app = Flask(__name__) 5 | 6 | 7 | if app.config["ENV"] == "production": 8 | 9 | app.config.from_object("config.ProductionConfig") 10 | 11 | elif app.config["ENV"] == "development": 12 | 13 | app.config.from_object("config.DevelopmentConfig") 14 | 15 | else: 16 | 17 | app.config.from_object("config.ProductionConfig") 18 | 19 | 20 | from app import views -------------------------------------------------------------------------------- /app/templates/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |Try sending a query string in the URL
22 | 23 | {% if args %} 24 |# | 28 |Key | 29 |Value | 30 |
---|---|---|
{{ loop.index }} | 36 |{{ k }} | 37 |{{ v }} | 38 |