Python module for interacting with Dublin Luas real-time API

luas, commute, dublin, dublin-ireland, python, travel
pip install



Build Status Coverage Status PyPI version is a python module providing an interface to the the Luas Forecasting API from is licensed under the MIT license.

Getting started

This module permits you to request:

  • details for all trams at a stop
  • trams in a particular direction at a stop

It validates that the stop names exist in data set available at Note that the stop abbreviation or name can used when querying the Luas API, e.g.:

'BAL' or 'Balally'
'RAN' or 'Ranelagh'
'MYS' or 'Mayor Square - NCI'

Requirements requires:

  • requests>=2.0


pip install


import luas.api
from luas.api import LuasLine, LuasDirection

luas_client = luas.api.LuasClient()

# This will return the status text for the Green Line
green_line_status = luas_client.line_status(LuasLine.Green)

# This will return the next tram from Balally, in the default direction (inbound)
next_bal = luas_client.next_tram('BAL')

# This will return the next outbound tram from Ranelagh
next_ran = luas_client.next_tram('RAN', LuasDirection.Outbound)

# Return raw JSON for a stop
stop_details = luas_client.stop_details('Balally')

Developer is hosted by Github at

Code has been tested with the following before commit:

flake8 luas
pylint luas
coverage run --source luas -m unittest discover tests

Copyright (c) 2018 Ronan Murray.