Skip to content

Version 2027.1.0

Choose a tag to compare

@anonymous44401 anonymous44401 released this 03 Jun 19:07
0b66d8d

Release Notes

Version 2027.1.0 (Launched on 03/06/2026 for all modes).

This release introduces full support for the Next Generation Realtime Trains API, replacing the legacy API implementation.

We've implemented a lot of new features in this update to improve performance and make realtime-trains-py easier to use. The introduction of data classes has meant we've had to remove support for Python 3.8 and Python 3.9. If you're still using either of these versions, upgrade to Python 3.10 or newer to use the latest version of realtime-trains-py.

Warning

Multiple Breaking Changes

Unfortunately, due to the API data requirements changing, we've had to make a number of internal code changes to support these. We've also made a number of changes to improve performance.

These include:

  • Advanced mode has been removed since the data provided by the API is too basic to warrant a different mode for it.

  • Complexity modes are now literals. Their names have also been changed - for example, s.n is now simple_normal.

  • Some data within objects has been changed to better reflect the data of the API.

  • The date format has changed from YYYY/MM/DD to YYYY-MM-DD. Time format has remained unchanged.

  • The get_arrivals and get_station methods have been removed since the API doesn't support a separate arrivals request. The get_departures method now features a similar functionality to the previous get_station method.

  • The get_departures method now has filter_from and filter_to fields.

  • The username and password parameters have been replaced with request_token.

  • Updated supported python versions (Python 3.8 and 3.9 no longer supported).

We apologise for any inconvenience these changes have made.

Check out the source code for this release.

A Quick Message...

We've noticed a lot of new downloads recently, which means realtime-trains-py is getting used in a lot more projects! We'd love to hear your suggestions for the future of realtime-trains-py, whatever your use case is. We've got some ideas of where to go from here, but your feedback will be invaluable in helping shape the future of this API wrapper.

If you have any suggestions, please create an issue or email us at anonymous4401.ad@gmail.com.

Code Changes:

  • New features

    • Added new error handlers
    • Added support for the next generation RTT API
    • Added three customisation options for Live Boards:
      • LCD (Liquid Crystal Display) - default
      • DMI (Yellow) (Display Machine Interface - Yellow)
      • DMI (White) (Display Machine Interface - White)
    • Implemented data classes
    • Implemented literals
  • Code Enhancements

    • Added a link to the wiki inside method information
    • Added a new access token generator
    • Added filter_from and filter_to parameters
    • Complexity modes are now literals
    • Moved error handling for validation into utilities.py
    • Modes for get_live are literals
    • Moved setting up complex mode to a separate method
  • Error Handling

  • Performance Improvements

    • Implemented data classes for faster access
    • Removed some duplicated code
  • Refactoring

    • Minor code + formatting updates
    • Removed some dormant code
    • Removed status codes from return data
    • Updated display order in details.py
    • Updated example code and example data
    • Updated file names for complex mode
    • Updated return types
    • Updated some code that could return errors
    • Updated some comments
    • Updated type notation

Wiki Changes:

  • Added contents pages to some pages
  • Added new documentation for error handling
  • Removed documentation for get_arrivals and get_station
  • Updated complexity documentation
  • Updated documentation for get_departures, get_service & get_live
  • Various QOL updates to the Wiki
  • Various readability updates to documentation
  • Various spelling & grammar changes

Other Changes:

  • Added quicklinks to README
  • Beta releases will now be published to the realtime-trains-py Test PyPi. Check it out here
  • realtime-trains-py now requires Python 3.10 or newer to run
  • Updated example code
  • Updated pyproject
    • Added keywords
    • Now requires Python 3.10+
    • Updated project links
  • Updated supported versions

Bugs

Fixes:

  • Fixed a bug causing get_live to stop after the request token expired
  • Fixed a bug causing methods to crash in example code snippets
  • Fixed a bug causing Service UIDs, dates and times to be validated incorrectly
  • Fixed a bug preventing departure data from saving when a date was provided in complex mode
  • Fixed a bug preventing service data from outputting

Awaiting Allocation:

  • None

What's Changed

Full Changelog: v2025.3.3...v2027.1.0

Other associated releases

Version 2026.1.0 was cancelled, so beta versions of version 2026.1.0 are included as associated releases.

How to Solve Problems from Breaking Changes

Advanced mode removed

rtt = RealtimeTrainsPy(
    request_token="YOUR_REQUEST_TOKEN", # 
    complexity="a"
    #           ^ change the "a" to "simple"
)

Date format has changed

"2026/05/2026"
#    ^  ^ 
#    Change to "-" instead

Complexity Modes: Literals

complexity="s"    ->  complexity="simple"
complexity="s.n"  ->  complexity="simple_normal"
complexity="c"    ->  complexity="complex"

Data Within Objects Changed

Check individual documentation for each method for changes.

The get_arrivals and get_station methods removed

rtt.get_arrivals()
#   ^^^^^^^^^^^^ 
#   Change to get_departures instead

rtt.get_station()
#   ^^^^^^^^^^^
#   Change to get_departures instead

The get_departures method now has filter_from and filter_to fields.

...filter="SVG"...
#  ^^^^^^
#  Change any current filters to filter_to

username and password parameters have been replaced

rtt = RealtimeTrainsPy(
    username="YOUR_USERNAME", #  Remove
    password="YOUR_PASSWORD", #  Remove
    request_token="YOUR_TOKEN"
#   ^^^^^^^^^^^^^
#   Replace old password and username fields
    complexity="simple"
)