Library that interacts with TMB API
Project description
tmb - Library for TMB API
Use this library to interact with the TMB (Transports Metropolitans de Barcelona) API.
Functionality
It supports the following services
- iBus (get remain minutes for a given stop and line)
Generate API keys
- Go to developer.tmb.cat.
- Login using your personal account.
- Create a new application, call it as you want.
- Once created, you will see two variables:
APP_ID
andAPP_KEY
.
Example
iBus
Create the iBus object using the API keys generated from TMB portal.
from tmb import IBus
ibus = IBus(APP_ID, APP_KEY)
forecast = ibus.get_stop_forecast('1265','V19')
print(f"{forecast} mins")
Projects Depending on tmb
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tmb-0.0.4.tar.gz
(2.0 kB
view hashes)
Built Distribution
tmb-0.0.4-py3-none-any.whl
(3.0 kB
view hashes)