Blogging for America

Three

Last summer, I created the Python Open311 API wrapper for Code for America (I was a Google Summer of Code intern then, I’m a fellow now), and now want to introduce its successor, Three: http://github.com/codeforamerica/three

If you’ve ever worked with the Open311 API before, you notice there’s a lot of subtle differences between GeoReport server implementations. For instance, some of the code that Michael Evans and Chris Barna wrote for the Open311 Dashboard last summer was San Francisco specific — meaning it takes some time to repurpose that project to other cities (even though they all follow the Open311 GeoReport V2 Specification).

Three hopes to change all that. In fact, it was built from the ground up to be as user-friendly and easy-to-use as possible — which was not the case for my first attempt at creating a Python API wrapper. A ton of great ideas were contributed by Michael and this year’s Chicago team, and both Kam, at SeeClickFix, and Dave, at Connected Bits, were awesome at quickly answering any emails I sent their way over the past month and a half.

Three, in its current state, allows you to interact with 29 different Open311 cities using some pretty simple code. For instance, if we were going to look at the services and requests for Macon, Ga.:

import three
three.city('macon')
three.services()
three.requests()

If interested, you should check out the code (and documentation) on GitHub, and feel free to submit any bug reports or pull requests. A special shout-out should also go, again, to Michael Evans — as he’s put up with daily emails and questions from me about Three’s functionality and future direction for the project.

Code for America Labs, Inc is a non-partisan, non-political 501(c)(3) organization. Content is licensed through Creative Commons.