That title covers a few things, now doesn’t it?
MongoDB locally:
http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/
PyMongo
http://api.mongodb.org/python/current/
http://api.mongodb.org/python/current/tutorial.html
Mongo for Flask apps
http://ryaneshea.com/mongodb-for-flask-apps/
Heroku
======
commands:
heroku logs
MongoHQ on Heroku
http://support.mongohq.com/partners/heroku.html
Git for Heroku and Github
https://devcenter.heroku.com/articles/git
Flask / MongoHQ connector for Heroku
https://gist.github.com/desaiashu/3491924