{"id":16137711,"url":"https://github.com/ce11an/tfl","last_synced_at":"2025-11-09T03:03:50.435Z","repository":{"id":161081793,"uuid":"634883308","full_name":"Ce11an/tfl","owner":"Ce11an","description":"A Python package for the Transport for London (TFL) API.","archived":false,"fork":false,"pushed_at":"2023-09-25T14:58:11.000Z","size":973,"stargazers_count":2,"open_issues_count":6,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-21T04:08:38.581Z","etag":null,"topics":["cli","client","python","tfl","transport-for-london"],"latest_commit_sha":null,"homepage":"https://ce11an.github.io/tfl/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ce11an.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-01T13:08:01.000Z","updated_at":"2023-05-12T14:55:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"ea2acb61-00b8-4cb4-a217-54c2d1026221","html_url":"https://github.com/Ce11an/tfl","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/Ce11an/tfl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ce11an%2Ftfl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ce11an%2Ftfl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ce11an%2Ftfl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ce11an%2Ftfl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ce11an","download_url":"https://codeload.github.com/Ce11an/tfl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ce11an%2Ftfl/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261060154,"owners_count":23103985,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","client","python","tfl","transport-for-london"],"created_at":"2024-10-09T23:29:01.846Z","updated_at":"2025-11-09T03:03:50.399Z","avatar_url":"https://github.com/Ce11an.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![TFL-Image.jpg](https://github.com/Ce11an/tfl/raw/main/assets/TFL-Image.jpg)\n\n[![Python](https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-blue)](https://pypi.org/project/py-tfl/)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v1.json)](https://github.com/charliermarsh/ruff)\n[![Pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit\u0026logoColor=white)](https://github.com/Ce11an/tfl/blob/main/.pre-commit-config.yaml)\n[![Semantic Versions](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--versions-e10079.svg)](https://github.com/Ce11an/tfl/releases)\n![Code Stability](https://github.com/Ce11an/tfl/actions/workflows/stability.yml/badge.svg)\n![Unit Tests](https://github.com/Ce11an/tfl/actions/workflows/unit-tests.yml/badge.svg)\n[![codecov](https://codecov.io/gh/Ce11an/tfl/branch/main/graph/badge.svg?token=ZR23YMRZVV)](https://codecov.io/gh/Ce11an/tfl)\n[![CodeFactor](https://www.codefactor.io/repository/github/ce11an/tfl/badge)](https://www.codefactor.io/repository/github/ce11an/tfl)\n\nA Python package for the [Transport for London (TFL) API](https://api-portal.tfl.gov.uk).\n\nThe TFL API is a RESTful API that provides data related to all modes of transport in London, including cycle hire,\nbuses, roads, and the underground. Anonymous access to the TFL API is limited to 50 requests a minute. If you want to\ncall the API more than that, you'll need to subscribe to a \"Product\" which lets you bypass this limit with a\nsubscription-key that you append to your requests.\n\nCurrently, we support the following APIs:\n\n- [Accident Stats API](https://api-portal.tfl.gov.uk/api-details#api=AccidentStats\u0026operation=AccidentStats_Get)\n- [Air Quality API](https://api-portal.tfl.gov.uk/api-details#api=AirQuality\u0026operation=AirQuality_Get)\n- [Crowding API](https://api-portal.tfl.gov.uk/api-details#api=crowding\u0026operation=dayofweek)\n- [Lift Disruptions API](https://api-portal.tfl.gov.uk/api-details#api=Disruptions-Lifts-v2\u0026operation=get)\n\nThe plan is to add support for all the TFL APIs. Contributions are welcome!\n\n## 🫶 Installation\n\n```bash\npip install py-tfl\n```\n\nor install with [Poetry](https://python-poetry.org/):\n\n```bash\npoetry add py-tfl\n```\n\n## ⚡️Quickstart\n\n### ⌨️ CLI\nThe TFL CLI provides a command line interface to the TFL API. It is built on top of\n[Typer](https://typer.tiangolo.com/), which provides easy way to build command line interfaces.\n\n```bash\ntfl --help\n```\n\n### 🦋 Client\nThe TFL client provides a Python interface to the TFL API. It provides a Pythonic interface to the API, and handles\nauthentication and rate limiting for you. The client is built on top of [HTTPX](https://www.python-httpx.org/), which\nprovides a fast, async HTTP client.\n\n```python\nfrom tfl import clients\n\n\nasync with clients.TFLClient(auth=clients.Auth(key=\"\u003cyour-tfl-api-key\u003e\")) as client:\n    response = await client.handlers.lift_disruptions_v2_handler.get_lift_disruptions()\n\nprint(response.json())\n```\n\n## 📈 Releases\n\nYou can see the list of available releases on the [GitHub Releases](https://github.com/Ce11an/tfl/releases)\npage.\n\nWe follow [Semantic Versions](https://semver.org/) specification.\n\nWe use [`Release Drafter`](https://github.com/marketplace/actions/release-drafter). As pull requests are merged, a draft\nrelease is kept up-to-date listing the changes, ready to publish when you’re ready. With the categories option, you can\ncategorize pull requests in release notes using labels.\n\n## 🛡 License\n\n[![License](https://img.shields.io/github/license/Ce11an/tfl)](https://github.com/Ce11an/tfl/blob/main/LICENSE)\n\nThis project is licensed under the terms of the `MIT` license. See [LICENSE](https://github.com/Ce11an/tfl/blob/main/LICENSE)\nfor more details.\n\n## 🚀 Credits\n\nA special thanks to HTTPX, Typer, and the TFL API team for making this project possible.\n\nThis project was built using [IntelliJ IDEA](https://www.jetbrains.com/community/opensource/?utm_campaign=opensource\u0026utm_content=approved\u0026utm_medium=email\u0026utm_source=newsletter\u0026utm_term=jblogo#support).\n\n![JetBrains Black Box Logo logo](https://resources.jetbrains.com/storage/products/company/brand/logos/jb_square.svg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fce11an%2Ftfl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fce11an%2Ftfl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fce11an%2Ftfl/lists"}