Skip to main content

TfL-python-api

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

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.

Metadata

Release files for tflunifiedapi 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tflunifiedapi 0.2.1
File Size Uploaded
tflunifiedapi-0.2.1.tar.gz 9.3 kB Details

Release files / tflunifiedapi-0.2.1.tar.gz

Download URL tflunifiedapi-0.2.1.tar.gz
Size 9.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ad602d90c9861a55d8893d8012b6d0d02b351a66a0388c127b9524bc4f4a4659
BLAKE2b-256 checksum
How to use checksums
8c55e2dd27dd30ce06883f710063cdfbecafd3980074fef1fe3d12f9108931d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/3.7.0

Release history Release notifications | RSS feed

This release

0.2.1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page