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.

Files for pymongorm, version 0.0.3
Filename, size File type Python version Upload date Hashes
Filename, size pymongorm-0.0.3.tar.gz (6.2 kB) File type Source Python version None Upload date Hashes View

Supported by

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