https://github.com/caomeiyouren/python-flask-template
基于 Python 的 Flask 应用模板
https://github.com/caomeiyouren/python-flask-template
flask python template
Last synced: 2 months ago
JSON representation
基于 Python 的 Flask 应用模板
- Host: GitHub
- URL: https://github.com/caomeiyouren/python-flask-template
- Owner: CaoMeiYouRen
- License: mit
- Created: 2023-10-03T11:59:57.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-11-13T21:31:29.000Z (over 1 year ago)
- Last Synced: 2025-01-04T22:45:33.042Z (over 1 year ago)
- Topics: flask, python, template
- Language: Python
- Homepage:
- Size: 25.4 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# python-flask-template
基于 Python 的 Flask 项目模板
## 依赖要求
- python >=3.6
## 安装依赖
```sh
pip install -r requirements.txt
```
## 开发环境运行
```sh
# 默认为开发环境
python app.py
```
## 生产环境运行
```sh
# 设置环境变量
export PYTHON_ENV='production' # Linux
gunicorn app:app -p app.pid -b 0.0.0.0:80 -w 2
```
## 测试
```sh
pytest
```
## 作者
👤 **CaoMeiYouRen**
* Website: [https://blog.cmyr.ltd/](https://blog.cmyr.ltd/)
* GitHub: [@CaoMeiYouRen](https://github.com/CaoMeiYouRen)