Browse Source

引入flask

tanlie 6 days ago
parent
commit
4ea7b17de9
6 changed files with 56 additions and 0 deletions
  1. 23 0
      .gitignore
  2. 5 0
      app/__init__.py
  3. 11 0
      app/app.py
  4. 5 0
      app/config/setting.py
  5. 11 0
      ginger.py
  6. 1 0
      requirements.txt

+ 23 - 0
.gitignore

@@ -0,0 +1,23 @@
+.venv/
+__pycache__/
+*.py[cod]
+*.pyo
+*.pyd
+.pytest_cache/
+.mypy_cache/
+.ruff_cache/
+.coverage
+.coverage.*
+htmlcov/
+.pytest_cache/
+.mypy_cache/
+.ruff_cache/
+*.egg-info/
+dist/
+build/
+.env
+.env.*
+.idea/
+.vscode/
+.DS_Store
+Thumbs.db

+ 5 - 0
app/__init__.py

@@ -0,0 +1,5 @@
+"""
+__init__.py -
+auther: tanlie
+date: 2026/8/23
+"""

+ 11 - 0
app/app.py

@@ -0,0 +1,11 @@
+"""
+app -
+auther: tanlie
+date: 2026/8/23
+"""
+from flask import Flask
+
+def create_app():
+    app = Flask(__name__)
+    app.config.from_object('app.config.setting')
+    return app

+ 5 - 0
app/config/setting.py

@@ -0,0 +1,5 @@
+"""
+setting -
+auther: tanlie
+date: 2026/8/23
+"""

+ 11 - 0
ginger.py

@@ -0,0 +1,11 @@
+"""
+ginger -
+auther: tanlie
+date: 2026/8/23
+"""
+from app.app import create_app
+
+app = create_app()
+
+if __name__ == '__main__':
+    app.run(debug=True)

+ 1 - 0
requirements.txt

@@ -0,0 +1 @@
+Flask==3.1.3