Skip to main content
Linux Built Status Windows Built Status Code coverage

The German railways system at your fingertips.

Install

pip3 install jim

Quick Start

To get all currently running trains:

>>> from jim.trains import RailGrid
>>> bahn = RailGrid()
>>> bahn
<2195 trains>

You can filter for specific trains:

>>> regs = bahn.filter(regional=True)
>>> nats = bahn.filter(national=True)
>>> ices = bahn.filter('ICE')

Let’s pick an ICE:

>>> an_ice = ices[-1]
>>> an_ice
<ICE 1086 to Berlin Südkreuz>

Each train is a Train class. You can retrieve its next station like:

>>> an_ice.next_station
<20:26 -> Hamburg Dammtor [+0]>

Similarly goes the previous station:

>>> an_ice.previous_station
<20:24 -> Berlin-Spandau>

If delay data is available, it will be stored here:

>>> an_ice.delay
0

Advanced

You can refresh a jim.trains.RailGrid class:

>>> bahn.refresh()
>>> bahn
<2260 trains>

Credits

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

jim-0.0.2-py2.py3-none-any.whl (9.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file jim-0.0.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for jim-0.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 5486b23876832e6d66b00e0fcd8f82e91a2e7a0e1dac3818a1d40ee8aa2b2d1a
MD5 f1e4b036155aa0f73b2b08557aca7464
BLAKE2b-256 28b97fe7778eb46e140ed053f41aa27298dd868575c3e7f4bf3cff236f3b87d3

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.2 This release

1 file

0.0.1

0.0.0

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