sanic框架的peewee orm集成
sanic-pw的Python项目详细描述
#sanic pw
[flask pw]的一个端口(https://github.com/klen/flask-pw)用于[sanic framework]的包(https://github.com/channelcat/sanic)。
等)通过:
-使用命令作为sanic脚本的一部分
-单击cli
-前后信号支持保存和删除
请使用sanic pw==0.1.0 `.
————————————————————————————————————————————————————————————————————————连接URI‘SQLite:///PeeWee.SQLite’'BR/> PeeWeiLnCalnsixPARAMS连接参数为PeeWee Orm '{}' < BR/> pEWeWeiAdvaseDiffi路径到具有迁移的目录“迁移”< BR/>peewee_migrate_u table带有迁移的数据库表的名称`'migratehistory`
peewee_models_u module包含应用程序模型的模块路径`|
peewee_models_u class base models class `<;sanic_pw.model>;`
peewee_manual请求启动时不连接到数据库,请求自动结束时关闭` false`
peewee使用读从数据库读取数据如果使用sanic脚本包,那么当出现“select…`querys `true`
peewee u read u slaves可用于读取`[]`
迁移的节点列表时,然后将一个新命令附加到您的管理器中:
``python
来自sanic pw import peewee
app.db.manager)
```
对于您更喜欢使用的情况,请单击它几乎相同的命令:
``python
from sanic_pw import peewee
``br/>app.db=peewee(app)
app.db.cli()
```
[flask pw]的一个端口(https://github.com/klen/flask-pw)用于[sanic framework]的包(https://github.com/channelcat/sanic)。
等)通过:
-使用命令作为sanic脚本的一部分
-单击cli
-前后信号支持保存和删除
请使用sanic pw==0.1.0 `.
————————————————————————————————————————————————————————————————————————连接URI‘SQLite:///PeeWee.SQLite’'BR/> PeeWeiLnCalnsixPARAMS连接参数为PeeWee Orm '{}' < BR/> pEWeWeiAdvaseDiffi路径到具有迁移的目录“迁移”< BR/>peewee_migrate_u table带有迁移的数据库表的名称`'migratehistory`
peewee_models_u module包含应用程序模型的模块路径`|
peewee_models_u class base models class `<;sanic_pw.model>;`
peewee_manual请求启动时不连接到数据库,请求自动结束时关闭` false`
peewee使用读从数据库读取数据如果使用sanic脚本包,那么当出现“select…`querys `true`
peewee u read u slaves可用于读取`[]`
迁移的节点列表时,然后将一个新命令附加到您的管理器中:
``python
来自sanic pw import peewee
app.db.manager)
```
对于您更喜欢使用的情况,请单击它几乎相同的命令:
``python
from sanic_pw import peewee
``br/>app.db=peewee(app)
app.db.cli()
```