Skip to main content

Python interface for OCTranspo API

Project description

python-ottawa-transit

Python interface to the OC Transpo API and utilities for working with the returned data.

Installation

The package is available on PyPi

pip install python-ottawa-transit

Alternativly it can be installed from source using Poetry

git clone https://github.com/buckley-w-david/python-ottawa-transit.git
cd python-ottawa-transit
poetry install

Usage

>>> from python_ottawa_transit import OCTransportApi
>>> api = OCTransportApi(app_id = 'APPLICATION_ID', app_key = 'APPLICATION_KEY')
>>> api.get_route_summary_for_stop(stop_no=8435)
{"GetRouteSummaryForStopResult":{"StopNo":"8435","StopDescription":"BANK \\/ COLLINS","Error":"","Routes":{"Route":{"RouteNo":6,"DirectionID":1,"Direction":"Northbound","RouteHeading":"Rockcliffe"}}}}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-ottawa-transit-0.2.0.tar.gz (2.6 kB view hashes)

Uploaded Source

Built Distribution

python_ottawa_transit-0.2.0-py3-none-any.whl (5.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page