Skip to main content

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.

Buy me a coffee

Usage

from enturclient import EnturPublicTransportData

API_CLIENT_ID = 'awesome_company-my_application' 

stops = ['NSR:StopPlace:548']
quays = ['NSR:Quay:48550']
data = EnturPublicTransportData(
        client_name=API_CLIENT_ID,
        stops=stops,
        quays=quays,
        expand_quays=False,
        omit_non_boarding=True,
        number_of_departures=5)
data.update()

bergen_train = data.get_stop_info('NSR:StopPlace:548')
bergen_train_delay = bergen_train.estimated_calls[0].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


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.2.0b2.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

enturclient-0.2.0b2-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file enturclient-0.2.0b2.tar.gz.

File metadata

  • Download URL: enturclient-0.2.0b2.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

File hashes

Hashes for enturclient-0.2.0b2.tar.gz
Algorithm Hash digest
SHA256 c5d01ffc680ca3256df13eaeee5a210aff1caf8ceebf4a1d657e26d09ae3ff96
MD5 f99d7213f81a2ee3c22dc9ec916ab195
BLAKE2b-256 87b1752104f1268e097e71edc00cb8c545131266cad1d009a2256641acf3f878

See more details on using hashes here.

File details

Details for the file enturclient-0.2.0b2-py3-none-any.whl.

File metadata

  • Download URL: enturclient-0.2.0b2-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

File hashes

Hashes for enturclient-0.2.0b2-py3-none-any.whl
Algorithm Hash digest
SHA256 f7b1b7de40628f9030eef6b159c38347696a4f2af312d9d40dd8fbff715745f2
MD5 15402edf49d336d31423304bc9534a95
BLAKE2b-256 58a3d5cf78dc2c5ec35c9c1a5e0770fb9e8014de02248fff40ed8d692350df13

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