Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 0d5b8cf93f
Fetching contributors…

Cannot retrieve contributors at this time

41 lines (22 sloc) 1.308 kb


This is the code to go along with the OpenShift blog piece on how to use Flask (python) with MongoDB to create a REST like web service with spatial data

Running on OpenShift

Create an account at

Create a python-2.6 application and add a MongoDB cartridge to the app

rhc app create -a pythonws -t python-2.6
rhc app cartridge add -a pythonws -c mongodb-2.2

Add this upstream flask repo

cd pythonws
git remote add upstream -m master git://
git pull -s recursive -X theirs upstream master

Then push the repo upstream

git push

To add the data to the MongoDB instance please follow the instructions on this blog: Mongo Spatial on OpenShift

Be sure to:

  • add the data to a collection called parkpoints
  • create the spatial index on the documents

Once the data is imported you can now checkout your application at:

Jump to Line
Something went wrong with that request. Please try again.