Python demo app for 'Cloud Craft for Spatial Cadets' presentation
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Map of Public Conveniences in Wellington

powered by Flask, Python, MongoDB, and Leaflet.js

To deploy a clone of this application using the rhc command line tool:

rhc app create conveniences python-2.7 mongodb-2.4 --from-code= -s

To use Python 3.3 or 2.6, replace the Python cartridge version in the command.

Alternatively, link to a web-based clone+deploy on OpenShift Online or on your own OpenShift cloud:

A demo is available at:

Local Development

To run the application locally, install Python, MongoDB 2.4 or higher, and the required Python modules in (these can be installed using Pip, eg: sudo pip install Flask && sudo pip install pymongo).

If you do not want to install MongoDB locally, you could instead use rhc port-forward and set the database connection parameters in conveniences.cfg to point to your instance of MongoDB hosted on OpenShift (or elsewhere).

Make sure MongoDB is running, and add the data and index with commands such as the following:

mongoimport -d conveniences -c toilets --type json --file wellington-city-public-conveniences.json
mongo conveniences --eval 'db.toilets.ensureIndex( { "geometry.coordinates" : "2dsphere" } )'

Check that the default DB connection parameters in conveniences.cfg match your MongoDB instance.

Run the app on localhost with the following command:


License and Credits

This code is dedicated to the public domain to the maximum extent permitted by applicable law, pursuant to CC0 (

App based on code by TheSteve0 and ryanj.

Toilet icons and banner contributed by Ben Hoad.