Skip to main content

Journey Planner API client library

Project description

Journeyplanner

A client for accessing the Journey Planner (Rejseplanen) API.

Installation

The journeyplanner library can be installed using pip:

$ pip install journeyplanner

Examples

client = JourneyPlanner()
dt = datetime(2019, 1, 8, 12, 0, 0)
origin = Endpoint(latitude=55.68325233, longitude=12.57150292, name="noerreport")
destination = Endpoint(latitude=55.67271128, longitude=12.56635308, name="hovedbanen")
trip = client.trip(origin, destination, date=dt.date(), time=dt.time())
print(list(trip))

Authentication

client = JourneyPlanner()
client.authenticate('USERNAME', 'PASSWORD')

API reference

Trip objects

Trip instances have the following attributes:

Trip.legs

List of leg instances

Leg objects

Leg instances have the following attributes:

  • Leg.name
  • Leg.type
  • Leg.origin
  • Leg.destination
  • Leg.notes

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

journeyplanner-1.0.1.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

journeyplanner-1.0.1-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file journeyplanner-1.0.1.tar.gz.

File metadata

  • Download URL: journeyplanner-1.0.1.tar.gz
  • Upload date:
  • Size: 6.3 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.7.2

File hashes

Hashes for journeyplanner-1.0.1.tar.gz
Algorithm Hash digest
SHA256 86e23821c9cd39821545aedd14330afff8ccfc82b3c4acea21f9bfa1b986f124
MD5 2eebb6c602cf0726b8cc48620beb8855
BLAKE2b-256 278fed0f8e00470bfcc9bc4107a8b103fb7f958e5d8e460586e3b4752a9b8152

See more details on using hashes here.

File details

Details for the file journeyplanner-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: journeyplanner-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.4 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.7.2

File hashes

Hashes for journeyplanner-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4c674c00936b5297dc74f6fb19ef0b97ce0864e1b33be01f71a358b1b08a74e0
MD5 f28fdac7120b52816373349dc216d3ef
BLAKE2b-256 b4152585173f7b40c81ee9e4ba3658ca8d38ad13760d228e140553067a28a84e

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