This project serves as a simple Python client of the NS API. The reponses are stored in Pydantic models, enabling easy manipulation and validation of the data.
Get a (free) API key from NS (see the startersguide).
Create a file called .env
with the following content: (see sample.env
)
API_KEY="<api key>"
Run python3 main.py --help
to see a list of commands.
It is recommended to first run python3 main.py stations
to retrieve (and store) a list of all stations.