Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython

bongo is unavailable in PyPM, because there aren't any builds for it in the package repositories. Click the linked icons to find out why.

 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
0.2.1Never BuiltWhy not?
0.2 Failed View build log
0.1 Failed View build log
Windows (64-bit)
0.2.1Never BuiltWhy not?
0.2 Failed View build log
0.1 Failed View build log
Mac OS X (10.5+)
0.2.1Never BuiltWhy not?
0.2 Failed View build log
0.1 Failed View build log
Linux (32-bit)
0.2.1 Failed View build log
0.2 Failed View build log
0.1 Failed View build log
Linux (64-bit)
0.2.1 Failed View build log
0.2 Failed View build log
0.1 Failed View build log
 
Links
Author
License
MIT
Dependencies
Lastest release
version 0.2.1 on Nov 26th, 2012

A simple API wrapper for the [Iowa City bus data API](http://www.ebongo.org/api/) -- mainly to use as an example for an upcoming blog post.

Installation

You can install the API wrapper using [pip](http://pypi.python.org/pypi/pip).

pip install bongo

Usage

There are two ways of interacting with the Bongo API.

The first way is just interacting with the bongo module.

```python >>> import bongo

System Message: WARNING/2 (<string>, line 24); backlink

Inline literal start-string without end-string.

System Message: WARNING/2 (<string>, line 24); backlink

Inline interpreted text or phrase reference start-string without end-string.
>>> bongo.routes()
{"routes": [1234, 5678, 9999]}
>>> bongo.route('lantern', 'coralville')
{"coralville's": {"lantern": "route"}}
>>> bongo.stops()
{"stops": [1234, 5678, 9999]}
>>> bongo.stop(8350)
{"stop": {"8350": "information"}}
>>> bongo.predict(8350)
{"stop": {"8350": "predictions"}}
```

The second way is interacting with the Bongo class.

```python >>> from bongo import Bongo >>> b = Bongo()

System Message: WARNING/2 (<string>, line 45); backlink

Inline literal start-string without end-string.

System Message: WARNING/2 (<string>, line 45); backlink

Inline interpreted text or phrase reference start-string without end-string.
>>> # List of all Bongo routes.
>>> b.routes()
{"routes": [1234, 5678, 9999]}
>>> # Info for a specific route and agency.
>>> b.route('lantern', 'coralville')
{"coralville's": {"lantern": "route"}}
>>> # List of all stops.
>>> b.stops()
{"stops": [1234, 5678, 9999]}
>>> # Information for a specific stop.
>>> b.stop(8350)
{"stop": {"8350": "information"}}
>>> # Predict the arrival times at a specific stop.
>>> b.predict(8350)
{"stop": {"8350": "predictions"}}
>>> # Bongo can also be used to return XML data.
>>> Bongo('xml').routes()
<ohai><xml><data></data></xml></ohai>
```

Subscribe to package updates

Last updated Nov 26th, 2012

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.