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
Mongo Descriptors
=================

Some really basic descriptor-based utils for interacting with Mongo. Specifically, It's made for model classes, that represent documents or types of documents.

Example:
```python
import bson
from mongo_descriptors import MongoI, Db

class Doc(object):
db=Db("test") # Sorry for the confusion, but when I say Db, I
# really mean Collection. The actuall db can be
# referenced like this.
db=Db("test", root="local")
# Root defaults to local.

some_prop=MongoI("some_prop") # Note that if you try to get this before assigning
# to it, you'll get an error. (Unless of course the
# document already exists in the database)

an_int_prop=MongoI("an_int_prop", typ=int) # Applies int() before returning and submitting.

another_prop=MongoI("another_prop", default=0) # If the property isn't in the database, it returns
# value provided by default. This doesn't affect
# the value stored in the database in any way.

oi=bson.ObjectId() # The instance is required to have a attribute oi
# which stores the _id of the document reffered to.

raw=MongoI() # This gets and stores a raw dict that represents
# the object. You can't overwrite the _id like this.

# I mentioned earlier that it returned a dict.
# This isn't strictly true. It actually returns a
# CatDict, which supports concatination.
# This leads itself to examples like the following.

x=Doc()
x.raw+={"foo":"bar"} # Note that foo does not actually get added as a
# property to the object. Just to the database.
```
Release History

Release History

0.2.2

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

0.2.1

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

0.2.0

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

0.1.0

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
MongoDescriptors-0.2.2.tar.gz (4.0 kB) Copy SHA256 Checksum SHA256 Source Oct 29, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS 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