Skip to content

Latest commit

 

History

History
60 lines (51 loc) · 1.04 KB

README.md

File metadata and controls

60 lines (51 loc) · 1.04 KB

LTA Datamall API Wrapper (Python)

This is an Unoffical Wrapper and this repo has no relation nor endorsement with/from LTA ####v0.0.7 Library Features:

  • Sync/Async
  • Lightweight
  • Easy to Use
  • Open Source

Setup


Windows
>>> pip install LTADatamall
MacOS
>>> pip3 install LTADatamall

Services/Information Provided


  1. Bus Related

    • Bus Arrival
    • Bus Stop
    • Bus Route
  2. Passenger Volume

    • Train Station
    • Bus Stop
  3. Taxi

    • Taxi Stop/Stand
    • Avaliable Taxis
  4. Train Service Alert

    • Train Service Alert Messages

Simple Usage


  1. Asynchronous
from LTADatamall import BusManager
import asyncio
async def main():
    client = BusManager('APIKEY')
    fav = await client.async_get_services([3,68])
    print(fav)
asyncio.run(main())
  1. Synchronous (Normal)
from LTADatamall import BusManager
client = BusManager('APIKEY')
fav_timings = client.get_bus_arrival(12345,[3,68])
print(fav_timings)