This module's documentation is hosted on Gitbook
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.
You can then go to My Subscriptions, select your application, and generate keys.
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")