Skip to content

TFL Handlers

Handlers for the TFL API.

The TFLHandlers class is used to store all handlers. Using the TFLHandlers class, you can access all the TFL API when using the TFLClient class.

TFLHandlers

A class to store all handlers.

Parameters:

Name Type Description Default
client httpx.AsyncClient

The TFL client to use when sending requests.

required
Source code in tfl/clients/handlers/_client_handlers.py
class TFLHandlers:
    """A class to store all handlers.

    Args:
        client: The TFL client to use when sending requests.
    """

    def __init__(self, client: httpx.AsyncClient) -> None:
        self.lift_disruptions_v2_handler = LiftDisruptionsV2Handler(client)
        self.crowding_handler = CrowdingHandler(client)
        self.air_quality_handler = AirQualityHandler(client)
        self.accident_stats_handler = AccidentStatsHandler(client)