landtransportsg.active_mobility¶
Active Mobility module.
Example usage:
# get the bicycle parking locations
from landtransportsg import ActiveMobility
client = ActiveMobility(API_KEY)
bicycle_parking_locations = client.bicycle_parking(1.364897, 103.766094)
Methods¶
- class landtransportsg.active_mobility.Client(account_key: str, cache_backend: str | BaseCache = 'sqlite')¶
Bases:
LandTransportSgInteract with the active mobility-related endpoints.
References: https://datamall.lta.gov.sg/content/dam/datamall/datasets/LTA_DataMall_API_User_Guide.pdf
- bicycle_parking(**kwargs: Unpack[BicycleParkingArgsDict]) list[BicycleParkingDict]¶
Get bicycle parking locations within a radius.
- Parameters:
kwargs (BicycleParkingArgsDict) – Key-value arguments to be passed as parameters to the endpoint URL.
- Raises:
ValueError – distance is a negative float.
- Returns:
Available bicycle parking locations at the specified location.
- Return type:
Argument Types¶
- class landtransportsg.active_mobility.BicycleParkingArgsDict¶
Bases:
TypedDictType definition for bicycle_parking() input arguments
- distance: NotRequired[float]¶
Radius in kilometre.
- Example:
0.5
- Default:
0.5