Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

library to retrieve data from German railways

Project Description

The German railways system at your fingertips.


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


Be aware many trains have a delay setting of None. Then, no data is available. Further, the delay of the next station next_station.delay is distinct from the general delay (as shown before).


You can refresh a jim.trains.RailGrid class:

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

Release History

This version
History Node


History Node


History Node


Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
jim-0.0.2-py2.py3-none-any.whl (9.1 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Jul 9, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting