Skip to main content

A wrapper around the Intrerrail api

Project description

Interrail

This python library is an unofficial wrapper around the api of Interrail which can be used to plan train trips through europe.

Installation

pip install interrail

Usage

from interrail.api import *

# To search for a station use get_stop_location
amsterdam = get_stop_location("Amsterdam Centraal")
paris = get_stop_location("Paris")


# To plan a trip between two stations use get_trip
trip = get_trip(origin=amsterdam, dest=paris, departure_time=datetime.now())

To see what fields StopLocation and Trip provide, reference data.py.

Note that get_stop_location /get_trip only return the first entry that the api provides. To view all entries use get_stop_locations/get_trips.

Contributing

Currently, this wrapper is far from complete and probably contains bugs. Feel free to contribute using issues/prs.

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

interrail-0.0.1.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

interrail-0.0.1-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

Details for the file interrail-0.0.1.tar.gz.

File metadata

  • Download URL: interrail-0.0.1.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7

File hashes

Hashes for interrail-0.0.1.tar.gz
Algorithm Hash digest
SHA256 7d50f57f49400eb46d053681ac6552053bd060dd7b6370fd95b6b4d13b22dc59
MD5 15e871df58bc4a170088acec25da6e4c
BLAKE2b-256 d0c96cd1262756b8c01d2f4c4f6bc4e0353acbbc0e6020e1bca499adf2ebec5f

See more details on using hashes here.

File details

Details for the file interrail-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: interrail-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7

File hashes

Hashes for interrail-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 81fe3f77bca828048cda57c0ba25d76b89a2a381adb6f7f1287b1fd783a2afc2
MD5 9c6d916aad4c4e5ddc2c3b34a9266807
BLAKE2b-256 474d1904fa8dbc67820389e7405e755829647e13c2e3a4de3da4ec262c98b2bd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page