Skip to content

o2ba/deutschebahn.py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deutsche Bahn Python API(s) wrapper

Documentation

This module's documentation is hosted on Gitbook

Getting your API token

The first step that you must complete before using the module. To generate an API token, you must first create an account on the API Portal website.

Then, create an API. The same is non-significant and so is the Callback URL and Description.

My Applications page

You can then go to My Subscriptions, select your application, and generate keys.

My Subscriptions page

Now, you should have an Access Token, which you will use in Python to authenticate yourself.

In order for the module to work, you need to subscribe to modules you intend to use. To be safe, subscribe to the following modules:

  • Betriebsstellen
  • StaDa Station Data
  • FaSta Station Facilities
  • Timetable
  • Fahrplan
  • Reisezentren

Now in your Python file, you can initialize the module by using the client.Auth function

import deutschebahn as db

db.client.Auth("Your token")

Releases

No releases published

Packages

No packages published

Languages