Skip to main content

A Python library for parsing SIRI (Service Interface for Real-time Information) messages according to the French national profile specification (SIRI Profile France)

Project description

SIRI Profile France Parser

A Python library for parsing SIRI (Service Interface for Real-time Information) messages according to the French national profile specification (SIRI Profile France).

Overview

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.

Key Features

Full support for SIRI Profile France v2.0 XML parsing Type-safe data structures Support for all SIRI France service types:

  • Stop Monitoring
  • Estimated Timetable
  • General Message
  • Situation Exchange
  • Production Timetable
  • Facility Monitoring
  • Connection Monitoring
  • Vehicle Monitoring

Siri interpretation notice et folders structures.

SIRI (Service Interface for Real-time Information) defines

  • Services (services available)
  • Structures (data class/ structures for every object found in the specficication)
  • Enums

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

Installation

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")

License

MIT license

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

siri_parser-0.1.8.tar.gz (40.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

siri_parser-0.1.8-cp37-abi3-win_amd64.whl (612.9 kB view details)

Uploaded CPython 3.7+Windows x86-64

siri_parser-0.1.8-cp37-abi3-win32.whl (556.7 kB view details)

Uploaded CPython 3.7+Windows x86

siri_parser-0.1.8-cp37-abi3-musllinux_1_2_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.7+musllinux: musl 1.2+ x86-64

siri_parser-0.1.8-cp37-abi3-musllinux_1_2_i686.whl (1.0 MB view details)

Uploaded CPython 3.7+musllinux: musl 1.2+ i686

siri_parser-0.1.8-cp37-abi3-musllinux_1_2_armv7l.whl (1.1 MB view details)

Uploaded CPython 3.7+musllinux: musl 1.2+ ARMv7l

siri_parser-0.1.8-cp37-abi3-musllinux_1_2_aarch64.whl (1.0 MB view details)

Uploaded CPython 3.7+musllinux: musl 1.2+ ARM64

siri_parser-0.1.8-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (851.9 kB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ x86-64

siri_parser-0.1.8-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (966.4 kB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ s390x

siri_parser-0.1.8-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (899.7 kB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ ppc64le

siri_parser-0.1.8-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (834.2 kB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ ARMv7l

siri_parser-0.1.8-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (846.3 kB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ ARM64

siri_parser-0.1.8-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl (899.1 kB view details)

Uploaded CPython 3.7+manylinux: glibc 2.5+ i686

siri_parser-0.1.8-cp37-abi3-macosx_11_0_arm64.whl (759.6 kB view details)

Uploaded CPython 3.7+macOS 11.0+ ARM64

siri_parser-0.1.8-cp37-abi3-macosx_10_12_x86_64.whl (779.7 kB view details)

Uploaded CPython 3.7+macOS 10.12+ x86-64

File details

Details for the file siri_parser-0.1.8.tar.gz.

File metadata

  • Download URL: siri_parser-0.1.8.tar.gz
  • Upload date:
  • Size: 40.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.7.4

File hashes

Hashes for siri_parser-0.1.8.tar.gz
Algorithm Hash digest
SHA256 978d31e046ee2e92966587e5501e09f7e175e82dd1ec1f4a704e8eaa48d29f30
MD5 16340455c51791638ffd5508f295cf1d
BLAKE2b-256 fc302f76b834a52a38ce31d9e7162d9ae0e8f74f4f8c0c708207cad23e8fd947

See more details on using hashes here.

File details

Details for the file siri_parser-0.1.8-cp37-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for siri_parser-0.1.8-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 2779302f73eb957add247503982499cc0ceb0909bb552a57c75232a764796987
MD5 a7b300cd3ccb6c6c04df324f08cbfc47
BLAKE2b-256 d324b82ddc681422bf6266df1f47acc53518a93274f480e5ab93039fb6fe7310

See more details on using hashes here.

File details

Details for the file siri_parser-0.1.8-cp37-abi3-win32.whl.

File metadata

  • Download URL: siri_parser-0.1.8-cp37-abi3-win32.whl
  • Upload date:
  • Size: 556.7 kB
  • Tags: CPython 3.7+, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.7.4

File hashes

Hashes for siri_parser-0.1.8-cp37-abi3-win32.whl
Algorithm Hash digest
SHA256 47e036028ed714c6dc2a43e114a292616ded72cf5abe9c8f6a684b8f93bac39a
MD5 8d839b752291cde501cbecd79d11d87b
BLAKE2b-256 9f199dc640b2f2b2b903e5df1897fadd336da72c357b785b5d75150f39bc9c35

See more details on using hashes here.

File details

Details for the file siri_parser-0.1.8-cp37-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for siri_parser-0.1.8-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 773ee042a2c9110d821df0c0cc9a0237783a694ebb34cd8eca575a4f30d22ade
MD5 d1d34639402ec3b962c21c81ddcc8c69
BLAKE2b-256 2366de356a71ea7653ca086fbd23d355ae8135727713152f09ab8213422eb831

See more details on using hashes here.

File details

Details for the file siri_parser-0.1.8-cp37-abi3-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for siri_parser-0.1.8-cp37-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 cfa32e1bbe865717ae4d68ade083cb2c1c7d853110fdab36b8a001fe44ed6d2e
MD5 be4d1197e116328485d284fa3b8c2990
BLAKE2b-256 fc3dedfde0b764bc00e86e71dd7ac96225205c6abbd7047c1051fc8071e6160d

See more details on using hashes here.

File details

Details for the file siri_parser-0.1.8-cp37-abi3-musllinux_1_2_armv7l.whl.

File metadata

File hashes

Hashes for siri_parser-0.1.8-cp37-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 2a9dc37275819cc2f12321fc7759533fbf74b7f1a96b40f33c363c2bfa9e98a9
MD5 5698f914f78f69e7de304695a41110f3
BLAKE2b-256 20993d274c4cb3314e78435d4b1072a02294613b7d877f8d29324630210da20b

See more details on using hashes here.

File details

Details for the file siri_parser-0.1.8-cp37-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for siri_parser-0.1.8-cp37-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 b31a164c3a31b18d204033af38f3804245dab32f54bda3e4947b79a4d75ab608
MD5 7cbfad10f9b71f182c8d3d7485ad89fc
BLAKE2b-256 b9e9168e87d892f7475c47c55d54b1dc69e362fcc40a5f9ec9c189407f623c36

See more details on using hashes here.

File details

Details for the file siri_parser-0.1.8-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for siri_parser-0.1.8-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5ff41c8a30adcf491f4c2ab28a45d528cf8eb3efe7daa007c63940c7e945f03f
MD5 e3bfb6554ad120dc612bc7bd5cc4f876
BLAKE2b-256 89ac5f0555fd5da9b2514928685b38e3ec2463fa2b297b4614fa3f8ca8c70095

See more details on using hashes here.

File details

Details for the file siri_parser-0.1.8-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl.

File metadata

File hashes

Hashes for siri_parser-0.1.8-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 5a7f16c1a32e4aed352da638889df53764942620617be7edb2e5b56816eea532
MD5 c39198a31629a826c80325fdf68fbbe5
BLAKE2b-256 cec5a75336bffa5b2002c7b1840ca22149c1873482479f1a07d8f9b73d53b28f

See more details on using hashes here.

File details

Details for the file siri_parser-0.1.8-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.

File metadata

File hashes

Hashes for siri_parser-0.1.8-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 ccddba482ddb3ee97d0b7b50d25a5e433a34163144ced5f912f3f55bdde6eb3b
MD5 3c881cd9d5d5ef6c64da2a9dc2c0501a
BLAKE2b-256 ab43ad6ff9c2c5090bca85196ea6de4b20fa05b55fd38f29c6fc81e975a565c3

See more details on using hashes here.

File details

Details for the file siri_parser-0.1.8-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for siri_parser-0.1.8-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 a04e64edd1bb63c09cbdefbd1217f5eb88cfe9bbe98c1ff80e983bc94dad01a0
MD5 50fa61682a6a68c92d120744dbdd3333
BLAKE2b-256 3874cabdf01912bac0b4c9995e036700a5ff43dd1a9498f22ed3731b4cc2a05f

See more details on using hashes here.

File details

Details for the file siri_parser-0.1.8-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for siri_parser-0.1.8-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 84f4ab3ca918505f43e3df264f22a922d9e36904685435fd0f7573410c10d95f
MD5 5b87e8fc52c2eb711564acdab246680b
BLAKE2b-256 eff769b29ada6f622eb7093c31c8e40ce8bc1b4114a4e454fe8bce704a7dc947

See more details on using hashes here.

File details

Details for the file siri_parser-0.1.8-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for siri_parser-0.1.8-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 816ee94292c0480b23d8f9665c5605fb8fdb0e5df21f5055632fb0faa8393856
MD5 6fb2056a23e18ded9d76df9e36ee85f4
BLAKE2b-256 58ad64626ea39044247aa83bbdbe22630e920ae8dc3a4cc4668e0123ec3bc418

See more details on using hashes here.

File details

Details for the file siri_parser-0.1.8-cp37-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for siri_parser-0.1.8-cp37-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 67f07b65e104a1269c264c7b3046922b15b203954618a858871a646804e2311e
MD5 ff41dc06dc35562d76db6909af5b716d
BLAKE2b-256 1052c841523a7bb315983baae287d5108589dfa4489e1e59f4325814aa2d1956

See more details on using hashes here.

File details

Details for the file siri_parser-0.1.8-cp37-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for siri_parser-0.1.8-cp37-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 6ba5a8140b02f77913c4bf3bca031805c9d5321d3bc7889dcf31ca67e4f62e6e
MD5 1eef094e1bfb34026ec2cf51dd9d6944
BLAKE2b-256 aac760a1722cbbf616fb3addfbab2203b5bdb941a75a0e2549b1c88ce6808e74

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page