Fork Me on GitHub


An easy-to-use Python wrapper for the Open311 API.

Download this project as a .zip file Download this project as a tar.gz file

At A Glance

Three was made to make the differences in Open311 GeoReport server implementations completely unknown to the end user. Interacting with service requests should be easy.

>>> import three

>>> three.cities()
['boston', 'macon', 'new haven', 'sf', ... ]

# Let's start off with Macon.

>>> three.key('my_macon_api_key')

>>> three.discovery()
{'service': {'discovery': 'data'}}

{'macon': {'service': 'data'}}

{'033': {'service_code': 'info'}}

>>> three.requests()
{'macon': {'request': 'data'}}

>>> three.requests('123')
{'123': {'request': 'data'}}

# Now, let's switch it up to San Francisco.

>>> three.key('my_sf_api_key')

{'SF': {'service': 'data'}}

>>> three.requests()
{'SF': {'request': 'data'}}

# And, finally Baltimore.

>>> three.key('baltimore_api_key')

{'baltimore': {'service': 'data'}}

>>> three.requests()
{'baltimore': {'request': 'data'}}

For casual users, working with the three module should feel effortless. Any pain points (such as dealing with XML, required parameters, etc.) should be abstracted away.

>>> import three


# Let's grab requests between certain dates.
>>> three.requests(start='03-10-2012', end='03-17-2012')

# But, let's use the between parameter.
>>> three.requests(between=['03-10-2012', '03-17-2012'])

# All the requests! (Currently 83...)
>>> three.requests(between=['03-10-2012', '03-17-2012'], count=100)


This is still a work in progress, but you can git clone this repo and run python install to check out the current progress.

Alternatively, you can install via pip.

pip install three