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
Built Distribution
File details
Details for the file enturclient-0.1.3.tar.gz
.
File metadata
- Download URL: enturclient-0.1.3.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 808e1d120485267092c2a127e6a7141e04e801b15c5f895047e2e98166d55e39 |
|
MD5 | 4e935c44e90085ff32bbc3759e3cf926 |
|
BLAKE2b-256 | ea337fa0b976c231c004b78d9a737f92286e02ed5b6b6ed1d1a51160a4f9b01e |
File details
Details for the file enturclient-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: enturclient-0.1.3-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b99dedb15c00e4171772129d361b6d76c11cd214e9059c99825728f980cc3cfc |
|
MD5 | 8fa46cb8094fedae76975d0ea2012088 |
|
BLAKE2b-256 | 95090c8d5651e496a8543ba22bf932ae0d988339eda27af6cdef604870903cb2 |