Skip to main content

A wrapper around the Interrail 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.3.tar.gz (3.6 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.3-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: interrail-0.0.3.tar.gz
  • Upload date:
  • Size: 3.6 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.3.tar.gz
Algorithm Hash digest
SHA256 4d3cdb3de5e8b1cc2b53f2811e6c06adfaf1b831fadec75d6630b4f9a861f09b
MD5 92d7573954c127004375f8b330309020
BLAKE2b-256 1320e6c3698de9b458bb509c911e651ae1caca72cd099b7244bee49ef47bec5a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: interrail-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.2 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e75d7a247d627b6848911ab3629c615c2c6e95d3eaca89176016ea541cd2b20f
MD5 24a6d3ae90b88c723182a81cbaf14807
BLAKE2b-256 a20563298929aacfce37ae0924bde62fe389403dd6ee3c01d2b074c26b6e026b

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