Skip to main content

iceportal_apis


No longer actively developed in favor of the onboardAPIs (PyPI) project which includes APIs for different providers.


PyPI version PyPI-Versions GitHub

Description

This module interacts with the onboard APIs of the Deutsche Bahn ICE trains.
It can do various things from reading the trains' velocity to telling you the distance to and the delay at the next station.
This is an unofficial project and not supported by Deutsche Bahn AG.

Note, that this module will only work correctly while you are on a train and connected to its WiFi-Hotspot.

Installation

  • Available on PyPI
    $ python -m pip install iceportal_apis
    

Usage

import iceportal_apis as ipa

train = ipa.Train()

while True:
    # Request new data from the api
    # train.refresh()  # obsolete, because onboardapis handles refreshing
    
    # Process data  (uses onboardapis under the hood)
    print(train.get_train_type().name)
    next_station = train.get_next_station()

    . . .

License

This software is distributed under the MIT License, please see LICENSE for detailed information.

API documentation

1. Status API

The Status API is available at https://iceportal.de/api1/rs/status

2. Trip API

The Trip API is available at https://iceportal.de/api1/rs/tripInfo/trip

3. Connections API

The Connecting trains API can be found at https://iceportal.de/api1/rs/tripInfo/connection/{eva_number}

4. Other APIs

These are other APIs I discovered but didn't investigate in:

4.1. https://iceportal.de/api1/rs/pois/map/{lat_s}/{lon_s}/{lat_e}/{lon_e}

4.2. https://iceportal.de/api1/rs/configs

4.3. https://iceportal.de/api1/rs/configs/cities

4.4. https://iceportal.de/bap/api/availabilities

4.5. https://iceportal.de/bap/api/bap-service-status

Metadata

Release files for iceportal-apis 2.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for iceportal-apis 2.0.3
File Size Uploaded
iceportal_apis-2.0.3.tar.gz 7.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for iceportal-apis 2.0.3
File Interpreter ABI Platform
iceportal_apis-2.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 14.6 kB

Release files / iceportal_apis-2.0.3.tar.gz

Download URL iceportal_apis-2.0.3.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
e9f6a12218d9a97604ef9587371de92018cf00dafed4c108376a949db168dd7f
BLAKE2b-256 checksum
How to use checksums
b0f9b9d296310e11eeaee168c518ebb9e09ab1f2cbcd3034d3b0fb50a6d9f90c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.4

Release files / iceportal_apis-2.0.3-py3-none-any.whl

Download URL iceportal_apis-2.0.3-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3c1a1fe96568849b5b481c631ddf6a63c9f7c0a1681d08368bf7fae3ddb5a7c0
BLAKE2b-256 checksum
How to use checksums
f97494346f05468b2bef093c15c69d794620e7515038a36682c1ef925c16b9e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.4

Release history Release notifications | RSS feed

This release

2.0.3 This release

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page