Skip to main content

a package use orm to operate mongo

Project description

### mongorm

### 使用示例

from mongorm import MongoModel
from field import CharField, IntField
class User(MongoModel):

class Meta:
# 设置mongo的数据库名称
dbname = "mongoorm"
# 设置集合名词
collection = "test"
user = CharField(is_must=True, default="xxx")
age = IntField(is_must=True)

if __name__ == "__main__":
# 下面两种方法均可以插入一条记录
User.objects.create(user="wupengxin", age=10)
print User(user="usertest", age=12).create()

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

pymongorm-0.0.3.tar.gz (6.2 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page