跳转到主要内容

未提供项目描述

项目描述

Bottle Peewee – 为Bottle框架提供Peewee ORM集成。

Build Status Coverals http://img.shields.io/pypi/v/bottle-peewee.svg?style=flat-square http://img.shields.io/pypi/dm/bottle-peewee.svg?style=flat-square Donate

要求

  • python >= 2.6

安装

Bottle Peewee 应使用pip安装

pip install bottle-peewee

使用

from bottle import Bottle
from bottle_peewee import PeeweePlugin
from peewee import Model, CharField

app = Bottle()
db = PeeweePlugin('sqlite:///:memory:')

class User(Model):
    name = CharField()

    class Meta(object):
        database = db.proxy

app.install(db)

db.database.create_table(User)
User.create(name='test')
assert [user for user in User.select()]

配置

PEEWEE_CONNECTION – 数据库连接字符串

错误跟踪器

如果您有任何建议、错误报告或烦恼,请向https://github.com/klen/bottle-peewee/issues的issue tracker报告

贡献

Bottle Peewee的开发发生在: https://github.com/klen/bottle-peewee

贡献者

  • klen (Kirill Klenov)

许可证

BSD许可证下授权。

项目详情


下载文件

为您的平台下载文件。如果您不确定选择哪个,请了解更多关于安装包的信息。

源代码发行版

bottle-peewee-0.1.5.tar.gz (4.1 kB 查看哈希值)

上传时间: 源代码

构建版本

bottle_peewee-0.1.5-py2.py3-none-any.whl (4.9 kB 查看哈希值)

上传时间: Python 2 Python 3

支持