August 8, 2011

Pymongo to connect with Mongolab

Mongolab provides hosting of Mongodb databases including a free plan with upto 240 MB usage. It took a little searching around to find how to use pymongo to interact with a database on mongolab. So here is some demo code for future reference. Tested with Python 2.6 and pymongo 1.7 on Ubuntu 10.10.


1 comment:

Naoko said...

I was getting authentication error because I was including username and password as server URL. Thank you very much for your example!