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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file python-ottawa-transit-0.2.0.tar.gz.

File metadata

File hashes

Hashes for python-ottawa-transit-0.2.0.tar.gz
Algorithm Hash digest
SHA256 355967f202c8d23a4f86a2bc40c7acfbf921d136f5bb0103ab983036221ba185
MD5 053978685eef2508f9a6aab640487c52
BLAKE2b-256 9d9b1f0a241a0cd37af4cf5e246d47ec7ea57aa69c64a0c3a81b5e2ea145bb62

See more details on using hashes here.

File details

Details for the file python_ottawa_transit-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for python_ottawa_transit-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cecbfd90ffd5a4914c6ea8f6f2ab560648af4b0a02f67e3f23f66d1b5bd42c87
MD5 abde06cb41a644b0d4223ec7279de6d2
BLAKE2b-256 58ec9d22dd608ca91e00d8bedbd5d2a753fc47c40ed97a8ea1d18402112b87af

See more details on using hashes here.

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