Tutorialwork / deutsche_bahn_api

This is a package to interact with the Deutsche Bahn timetables api
https://pypi.org/project/deutsche-bahn-api
GNU General Public License v3.0
9 stars 9 forks source link

feat: auto load stations on StationHelper init #4

Closed 2mal3 closed 8 months ago

2mal3 commented 8 months ago

As the name suggests. With this PR, the stations are loaded automatically when the StationHelper class is initialised, allowing you to omit the annoying station_helper.load_stations() in your code. To use the class, you need to call this method right after initialisation, so it makes sense to move it to the constructor.

With these changes, the library should still be backwards compatible without any performance loss.

Tutorialwork commented 8 months ago

Hey, thanks for your contribution to my library. I will deploy your changes with a new version.