I recently had some spare time, so I decided to implement a Python wrapper to match the new release of Västtrafik's API. The goal is to provide wrappers for all endpoints in the journey planner API to make it easier to work with it.
The wrapper uses the following libraries:
This package is published to PyPi and can be installed using
pip install pytrafik
Documentation for this package will be added to the wiki.
First make sure you have virtualenv installed.
Clone the repo
git clone https://github.com/axelniklasson/PyTrafik.git
Create virtualenv and activate it
cd PyTrafik
virtualenv env
source env/bin/activate
Install the required libraries
pip install -r etc/reqs.txt
Done!
The new API uses OAuth2 as authorization and in order to acquire CONSUMER_KEY and CONSUMER_SECRET from the API, one needs to subscribe to it. Please refer to Västtrafik in to get your API credentials.
Pull Requests are always welcome and should be submitted to the dev
branch.
- persandstrom - Support for Python 3, pip install and improved Client constructor
- erikkinding - Code for livemap endpoint and all stops
- platisd - Python 3/3.6 compatibility.
- oscarbodell - Replaces tabs with spaces