The documentation only talks about how to do it from ruby.
This is Will from MongoLab. We have a generic example of how to connect in Python using the official python driver (pymongo). This example is not for connecting from Heroku per say but it should be similar. The difference is that you will need to pluck your driver config from your Heroku ENV environment to supply to the driver.
https://github.com/mongolab/mongodb-driver-examples/blob/master/python/pymongo_simple_example.py
If you still have trouble feel free to contact us directly at support@mongolab.com
-will