From da8ab512a91b95a18c54918174ef7af49d1ce317 Mon Sep 17 00:00:00 2001
From: Patrick Jentsch
Date: Wed, 3 Jul 2019 10:31:23 +0200
Subject: [PATCH] Create project skeleton.
---
.flaskenv | 2 ++
.gitignore | 2 ++
app/__init__.py | 7 +++++++
config.py | 5 +++++
opaque.py | 4 ++++
requirements.txt | 2 ++
6 files changed, 22 insertions(+)
create mode 100644 .flaskenv
create mode 100644 .gitignore
create mode 100644 app/__init__.py
create mode 100644 config.py
create mode 100644 opaque.py
create mode 100644 requirements.txt
diff --git a/.flaskenv b/.flaskenv
new file mode 100644
index 00000000..f88b6e5b
--- /dev/null
+++ b/.flaskenv
@@ -0,0 +1,2 @@
+FLASK_APP=opaque.py
+FLASK_ENV=development
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000..82adb58b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+__pycache__
+venv
diff --git a/app/__init__.py b/app/__init__.py
new file mode 100644
index 00000000..37ffe28b
--- /dev/null
+++ b/app/__init__.py
@@ -0,0 +1,7 @@
+from flask import Flask
+
+
+def create_app():
+ app = Flask(__name__)
+
+ return app
diff --git a/config.py b/config.py
new file mode 100644
index 00000000..a97948ee
--- /dev/null
+++ b/config.py
@@ -0,0 +1,5 @@
+import os
+
+
+class Config:
+ SECRET_KEY = os.environ.get('SECRET_KEY') or 'hard to guess string'
diff --git a/opaque.py b/opaque.py
new file mode 100644
index 00000000..5ee9c43e
--- /dev/null
+++ b/opaque.py
@@ -0,0 +1,4 @@
+from app import create_app
+
+
+app = create_app
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 00000000..0bfbaf13
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,2 @@
+Flask==1.0.3
+python-dotenv==0.10.3