Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Pyramid Mongoengine

pyramid-mongoengine package based in flask-mongoengine

README In Progress

Install

pip install pyramid-mongoengine

Config

Basic setup

if __name__ == "__main__":
    config = Configurator()

    config.include("pyramid_mongoengine")
    config.add_connection_database()

pyramid-mongoengine provides add_connection_database(), he makes a connection with database using data coming from .ini file.

mongo_url = mongodb://my_ip_location_to_mongodb
mongodb_name = "my_db_application"

If theses data not exists in .ini, pyramid-mongoengine use default values

# Default values
mongo_url = mongodb://localhost
mongodb_name = "test"

Creating models

from pyramid_mongoengine import MongoEngine

db = MongoEngine()

class User(db.Document):
    email = db.StringField(required=True)
    username = db.StringField(required=True)

See demo application to examples

Support on Beerpay

Hey dude! Help me out for a couple of 🍻!

Beerpay Beerpay

About

Mongoengine Pyramid extension

Topics

Resources

License

Releases

No releases published

Packages

No packages published

Languages