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
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file interrail-0.0.2.tar.gz.
File metadata
- Download URL: interrail-0.0.2.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7878b9f7d880f7572bfeb08b0787689aea39199537f565bb5479f6323bef1b42
|
|
| MD5 |
ae3e7221bda91a4448db3a799e23ff05
|
|
| BLAKE2b-256 |
03b0cdbf1cbb1585ea418d89bd09613e35ad28a429df5242614bda34e5f9524b
|
File details
Details for the file interrail-0.0.2-py3-none-any.whl.
File metadata
- Download URL: interrail-0.0.2-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0df27bc75cc77b0ae2fc5d52776b53f336264247d94582e94c1f95bdd798843c
|
|
| MD5 |
b5130cec238304a9f150a0d9d71e1fe8
|
|
| BLAKE2b-256 |
c4e374eee091633f5e788e191acf320eea5f6cd6e3f5af5b47e352808e1538f9
|