Skip to content

ecoslado/PyMongoODM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyMongoODM

Mongo ODM wroten in Python and based in pymongo client.

  • Installation TODO

  • Configuration TODO

  • Define your model

from pymongodm import Model, fields
class Post(Model):
         author = fields.StringField()
         body = fields.StringField()
         comments = fields.ListField(cls=Comment)
         tags = fields.ListField(cls=str)
class Comment(Model):
        author = fields.StringField()
        body = fields.StringField()
  • Create some objects
post = Post(author = "Enrique Coslado")
post.setattr("body", "Lorem Ipsum ...")
post.getbody
> "Lorem Ipsum ..."
post.save()

About

Mongo ODM wroten in Python based in pymongo client.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages