This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

MongoMonkey is a simple ODM for mongo.
The key idea was to use standard pymongo api, without overriding it.

Example of usage:

from pymongo import Connection
from mongomonkey import Model, Field, list_of

class Book(Model):
title = Field(unicode)
page_count = Field(int)

class Author(Model):
name = Field(unicode)
books = Field(list_of(Book))

connection = Connection()
db = connection.test_database
collection = db.test_collection

book1 = Book(title=u"Alice's Adventures in Wonderland", page_count=191)
author = Author(name=u"Lewis Carroll")
# Accessing by field attribute
author.books = [book1]
# Accessing like dict item
author['books'].append({u"title": u"A Tangled Tale", u"page_count": 152})

# Saving object # By default pymongo would attach '_id' to this document.

# Retrieving object
author = collection.find_one(as_class=Author)

Recursive embedding:

from mongomonkey import Model, Field, list_of

class Node(Model):
title = Field(unicode)
# You can use 'self' to point on currently creating Model
child1 = Field('self')
# Also you can use a name of a model to point on it
child2 = Field('Node')

# Printing instance of Node
print Node(title=u"root", child1=Node(title=u"Child1"), child2=Node(title=u"Child2"))

Developing and Contributing

If you have any question, ideas or improvements feel free to fork or add an issue
on github
Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
mongomonkey-0.1.tar.gz (6.5 kB) Copy SHA256 Checksum SHA256 Source Dec 23, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting