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)¶
Bases:
LtaInteract with the active mobility-related endpoints.
References: https://datamall.lta.gov.sg/content/dam/datamall/datasets/LTA_DataMall_API_User_Guide.pdf
- Parameters:
account_key (str)
- bicycle_parking(latitude: float, longitude: float, distance: float = 0.5) list[BicycleParkingDict | dict]¶
Get bicycle parking locations within a radius.
- Parameters:
- Raises:
ValueError – distance is a negative float.
- Returns:
Available bicycle parking locations at the specified location.
- Return type: