Skip to main content

a package use orm to operate mongo

Project description

### mongorm
一个简单的基于pymongo的orm

### 使用示例


```python
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 details)

Uploaded Source

File details

Details for the file pymongorm-0.0.3.tar.gz.

File metadata

  • Download URL: pymongorm-0.0.3.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pymongorm-0.0.3.tar.gz
Algorithm Hash digest
SHA256 76e7d817e4b7e7d206ffba8e2800f191177c165ba91ad5f1f06a62123979efcc
MD5 190b988db5d278ecb49cbbee49f2a769
BLAKE2b-256 cccd4d2fa580b9fc5fbf90e0c74d6a37cdc540e858821498a1c68843640eb96a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page