Skip to main content

python framework

Project description

### 基础开发命令



###### 启动命令
```
python manage.py runserver --host 0.0.0.0
```

###### 测试命令
```
python manage.py test
```

###### 覆盖报告
```
python manage.py test --coverage
```

---
### 数据库迁移

###### 初始化
```
python manage.py db init
```

###### 生成脚本
```
python manage.py db migrate -m "initial migration"
```

###### 更新数据库
```
python manage.py db upgrade
```

对第一个迁移来说, 其作用和调用db.create_all() 方法一样。但在后续的迁移中,
upgrade 命令能把改动应用到数据库中,且不影响其中保存的数据。

###### 代码性能分析
```
python manage.py profile 启动,浏览器请求
```

###### 服务器启动命令
```
gunicorn -b 0.0.0.0:8000 manage:app
```


UI框架

DOC http://spin.webkom.co/docs/docs.html



#### 打包
```
python3 setup.py sdist bdist_wheel

twine upload dist/*
```



#### 使用pip生成依赖文件:


```
pip freeze >requirements.txt
```



安装或升级包后,最好更新这个文件。

#### 根据依赖文件安装包:


```
pip install -r requirements.txt
```

### 移除所有包
```
pip freeze | xargs pip uninstall -y
```

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyfw-1.0.26.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

pyfw-1.0.26-py3-none-any.whl (19.7 kB view details)

Uploaded Python 3

File details

Details for the file pyfw-1.0.26.tar.gz.

File metadata

  • Download URL: pyfw-1.0.26.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.2

File hashes

Hashes for pyfw-1.0.26.tar.gz
Algorithm Hash digest
SHA256 54afbf0f5b4bacfc112e5e62c39ac79a1656847c16c059323dd389145c9d0b7c
MD5 84de7c67ff33e8db95c2a7030baee5c2
BLAKE2b-256 172f081b5851ac22cfb2b55117d137cdbf4f7805606ff54d893a5ea965eb1adf

See more details on using hashes here.

File details

Details for the file pyfw-1.0.26-py3-none-any.whl.

File metadata

  • Download URL: pyfw-1.0.26-py3-none-any.whl
  • Upload date:
  • Size: 19.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.2

File hashes

Hashes for pyfw-1.0.26-py3-none-any.whl
Algorithm Hash digest
SHA256 20a05673bfae861e686288318f72a85263a9e690a3939b1a2919a50bad35eb31
MD5 0b0d28f9c6638f730b26b46da1c1abba
BLAKE2b-256 7838a6474dc3f0e969627505970884cb9fcc33cb03865add9bbcb1d660cd865d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page