Skip to content

applauncher-team/mongoengine_bundle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mongo engine bundle

Support for Mongo engine in applauncher

Install: pip install mongoengine_bundle

Simple configuration example

mongoengine:
  db: "my_database"
  host: "loalhost"
  port: 27017
  username: "my_username"
  password: "123456"

Full configuration example

mongoengine:
  db: "my_database"
  host: "my.shard1.com,my.shard2.com"
  port: 27017
  username: "my_username"
  password: "123456"
  ssl: True
  replica_set: "my_shard"
  authentication_source: "admin"

Usage

Once the bundle is loaded, just use mongoengine as normal. The bundle just manage the connections (its ready for multi thread applications so you can use it with celery for example)

class BlogPost(Document):
    title = StringField(required=True, max_length=200)
    body = Stringfield(required=True)
    
post = BlogPost(title="My title", body="My wonderful content")
post.save()

#More Check the mongoengine documentation to get details about how to use it https://github.com/MongoEngine/mongoengine

About

Mongo engine wrapper for applauncher

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages