Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

dhilmathy/TfL-python-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

18 Commits

Repository files navigation

TfL-python-api

PyPi Version PyPI - Python Version License

This repository contains Python APIs for interacting with Transport for London (TfL).

Transport for London (TfL) Unified API is released here is for open data users to use in their own software and services.

Installation

pip install tflunifiedapi

Get Started

To use the TfL Unified API, developers should register for an Application ID (app_id) and Application Key (app_key).

from tfl.client import Client
from tfl.api_token import ApiToken
app_id = 'APPLICATION ID'
app_key = 'APPLICATION KEY'
token = ApiToken(app_id, app_key)
client = Client(token)
print (client.get_line_meta_modes())
print (client.get_lines(mode="bus")[0])
print (client.get_lines(line_id="victoria")[0])

API Documentation

This Python library provide a thin wrapper around the TfL Unified APIs. See the Transport for London Unified API for more details.

Releases

No releases published

Packages

No packages published

Languages

AltStyle によって変換されたページ (->オリジナル) /