跳转到主要内容

简单的MongoDB模型

项目描述

https://secure.travis-ci.org/dirn/Simon.png?branch=develop

关于发布的说明

Simon尚未被认为是生产就绪的。虽然我会尽最大努力在现在和版本1.0之间保持向后兼容性,但我无法保证它会发生。

原始的开发版本最终可能会从Read the Docs和PyPI中删除。我们鼓励您在1.0版本发布之前保持您的版本更新,以避免遇到问题。

入门

定义模型

from simon import Model

class User(Model):
    """A model to represent users"""

连接到数据库

from simon.connection import connect

connect('localhost', name='simon')

并开始使用它

User.create(name='Simon')

user = User.get(name='Simon')
user.email = 'simon@example.com'
user.save()

完整的文档可以在Read the Docs上找到。

安装

安装Simon很简单

pip install Simon

或者下载源代码并运行

python setup.py install

项目详情


下载文件

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

源代码发行版

Simon-0.7.0.tar.gz (66.7 kB 查看哈希值)

上传时间 源代码

构建分发版

Simon-0.7.0-py2.py3-none-any.whl (33.9 kB 查看哈希值)

上传时间 Python 2 Python 3

支持