PyMongoLab
==========

PyMongoLab is a Python_ client library that contains tools for accessing to
MongoLab databases via `MongoLab REST API`_ using a similar syntax to PyMongo_.


Packages
--------

:doc:`mongolabclient/index`
  This package is a HTTP requests implementation for `MongoLab REST API`_.

  .. code-block:: python

     >>> 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'}]

:doc:`pymongolab/index`
  PyMongo_-flavored package for accessing to MongoLab databases via `MongoLabClient`.

  .. code-block:: python

     >>> from pymongolab import MongoClient
     >>> connection = MongoClient("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 :doc:`here </examples>`.


Installation
------------

You can to use pip_ to install PyMongoLab:

.. code-block:: bash

   $ pip install pymongolab

Or using last source:

.. code-block:: bash

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


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``.


.. toctree::
   :hidden:

   examples
   modules


Indices and tables
------------------

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

.. _Python: http:www.python.org
.. _MongoLab REST API: http://support.mongolab.com/entries/20433053-rest-api-for-mongodb
.. _PyMongo: http://api.mongodb.org/python/current/
.. _pip: http://pypi.python.org/pypi/pip
.. _Sphinx: http://sphinx.pocoo.org/
.. _GitHub issues page: https://github.com/puentesarrin/pymongolab/issues/
