PyMongoLab

PyMongoLab is a Python client library that contains tools for accessing to MongoLab databases via MongoLab REST API using a similar sintax to PyMongo.

Packages

MongoLabClient

This package is a HTTP requests implementation for MongoLab REST API.

>>> from mongolabclient import MongoLabClient
>>> client = MongoLabClient("MongoLabAPIKey")
>>> client.list_documents("database", "collection")
[{u'_id': ObjectId('50243d38e4b00c3b3e75fc94'), u'foo': u'bar', u'tld': u'com'},
{u'_id': ObjectId('50004d646cf431171ed53846'), u'foo': u'bar', u'tld': u'org'}]
PyMongoLab

PyMongo-flavored package for accessing to MongoLab databases via MongoLabClient.

>>> from pymongolab import Connection
>>> connection = Connection("MongoLabAPIKey")
>>> db = connection.database
>>> col = db.collection.find()
>>> list(col)
[{u'_id': ObjectId('50243d38e4b00c3b3e75fc94'), u'foo': u'bar', u'tld': u'com'},
{u'_id': ObjectId('50004d646cf431171ed53846'), u'foo': u'bar', u'tld': u'org'}]

View more usage examples here.

Installation

You can to use pip to install PyMongoLab:

$ pip install git+git://github.com/puentesarrin/pymongolab.git

Or:

$ git clone git://github.com/puentesarrin/pymongolab.git
$ cd pymongolab
$ python setup.py install

Issues

Please, help us to report issues on GitHub issues page.

About this documentation

Sphinx must be installed to generate the documentation. Documentation can be generated by running python setup.py doc.

Indices and tables