An API client for public transport data from Entur.
Project description
Entur API client
Python client for fetching estimated departures from stop places in Norway from Entur.org's API. Information about stop places, platforms and real-time departures.
Usage
from enturclient import EnturPublicTransportData
import enturclient.consts
API_CLIENT_ID = 'awesome-company-application'
stops = ['NSR:StopPlace:548']
quays = ['NSR:Quay:48550']
data = EnturPublicTransportData(
API_CLIENT_ID,
stops,
quays,
False)
data.update()
bergen_train = data.get_stop_info('NSR:StopPlace:548')
bergen_train_delay = bergen[consts.ATTR][consts.ATTR_DELAY]
Obtaining a stop id
Entur's travel planer has a map of all stops used in Norway. Use the map to find the stops you're interested in. When you have found one of your stops, click on it.
Now the web browser should contain an URL with the id in it. Such as this:
https://en-tur.no/nearby-stop-place-detail?id=NSR:StopPlace:32376
The stop id is the content after id= parameter in the url. Copy paste this into the configuration.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
enturclient-0.1.2.tar.gz
(4.0 kB
view hashes)
Built Distribution
Close
Hashes for enturclient-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ddd1bec989b95dc4f527742b9fd62e7f36e761ac1a8de512f0d0dedb7a6f662 |
|
MD5 | 3870180d02c1483311144ace632e2374 |
|
BLAKE2b-256 | ff8e6849d7acc2fb579528255152106cf6d9f09319d882eb209d6fdde9ae9f75 |