
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
A Python library for parsing SIRI (Service Interface for Real-time Information) messages according to the French national profile specification (SIRI Profile France)
A Python library for parsing SIRI (Service Interface for Real-time Information) messages according to the French national profile specification (SIRI Profile France).
This library implements the French national adaptation of the SIRI standard, which is used for real-time public transport information exchange in France. It provides tools for parsing and working with SIRI messages that conform to the French profile specifications.
Full support for SIRI Profile France v2.0 XML parsing Type-safe data structures Support for all SIRI France service types:
SIRI (Service Interface for Real-time Information) defines
Sometimes you will find :::
in the specification, ex:
LEADER | ::: | 1:1 | xxx-Delivery | voir xxxDelivery |
---|---|---|---|---|
For us, it means single or multiples members of xxx-Delivery/LEADER can be found flattened into the structures where xxx-Delivery/LEADER is implemented.
We have therefore decide to flatten XxxDelivery rust struct each time we found :::
or LEADER
defined into a response data structure and we build a custom deserializer for it.
We have done so everytime we found that a data structure needed to be flattened
The parser can be installed using pypi, it requires python to be at version >=3.7
pip install siri-parser
an then it can be used like this:
import siri_parser as siri
siri_parser = siri.SIRI()
data = """SIRI XML"""
parsed_data = siri_parser.parse(data)
print(str(parsed_data))
if parsed_data.body().notify_production_timetable():
print("production_timetable")
elif parsed_data.body().notify_estimated_timetable():
print("estimated_timetable")
else:
print("other services")
MIT license
FAQs
A Python library for parsing SIRI (Service Interface for Real-time Information) messages according to the French national profile specification (SIRI Profile France)
We found that siri-parser demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.