# 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:
```python
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
Raw data
{
"_id": null,
"home_page": null,
"name": "siri-parser",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "Prince Merveil ONDONDA <pondonda@gmail.com>",
"keywords": "siri specification, siri specification parser, siri parser python, siri xml parser",
"author": null,
"author_email": "Prince Merveil ONDONDA <pondonda@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/fc/30/2f76b834a52a38ce31d9e7162d9ae0e8f74f4f8c0c708207cad23e8fd947/siri_parser-0.1.8.tar.gz",
"platform": null,
"description": "# SIRI Profile France Parser \n\nA Python library for parsing SIRI (Service Interface for Real-time Information) messages according to the French national profile specification (SIRI Profile France).\n\n## Overview\nThis 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.\n\n\n## Key Features\n\nFull support for SIRI Profile France v2.0\nXML parsing\nType-safe data structures\nSupport for all SIRI France service types:\n\n- Stop Monitoring\n- Estimated Timetable\n- General Message\n- Situation Exchange\n- Production Timetable\n- Facility Monitoring\n- Connection Monitoring\n- Vehicle Monitoring\n\n## Siri interpretation notice et folders structures.\nSIRI (Service Interface for Real-time Information) defines \n- Services (services available)\n- Structures (data class/ structures for every object found in the specficication)\n- Enums \n\n\nSometimes you will find ``:::`` in the specification, ex: \n\n| LEADER | ::: | 1:1 | xxx-Delivery | voir xxxDelivery |\n|--------|--------|---------|------------------|-------------------|\n| | | | | |\n\n\nFor us, it means single or multiples members of xxx-Delivery/LEADER can be found flattened into the structures where xxx-Delivery/LEADER is implemented.\n\nWe 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.\nWe have done so everytime we found that a data structure needed to be flattened\n\n\n\n## Installation\n\nThe parser can be installed using pypi, it requires python to be at version >=3.7\n\n```\npip install siri-parser\n```\n\n\nan then it can be used like this:\n\n```python\n\nimport siri_parser as siri\n\nsiri_parser = siri.SIRI()\n\n\ndata = \"\"\"SIRI XML\"\"\"\n\nparsed_data = siri_parser.parse(data)\nprint(str(parsed_data))\n\nif parsed_data.body().notify_production_timetable():\n print(\"production_timetable\")\nelif parsed_data.body().notify_estimated_timetable():\n print(\"estimated_timetable\")\nelse:\n print(\"other services\")\n```\n\n\n\n## License\nMIT license\n",
"bugtrack_url": null,
"license": null,
"summary": "A Python library for parsing SIRI (Service Interface for Real-time Information) messages according to the French national profile specification (SIRI Profile France)",
"version": "0.1.8",
"project_urls": null,
"split_keywords": [
"siri specification",
" siri specification parser",
" siri parser python",
" siri xml parser"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "aac760a1722cbbf616fb3addfbab2203b5bdb941a75a0e2549b1c88ce6808e74",
"md5": "1eef094e1bfb34026ec2cf51dd9d6944",
"sha256": "6ba5a8140b02f77913c4bf3bca031805c9d5321d3bc7889dcf31ca67e4f62e6e"
},
"downloads": -1,
"filename": "siri_parser-0.1.8-cp37-abi3-macosx_10_12_x86_64.whl",
"has_sig": false,
"md5_digest": "1eef094e1bfb34026ec2cf51dd9d6944",
"packagetype": "bdist_wheel",
"python_version": "cp37",
"requires_python": ">=3.7",
"size": 779705,
"upload_time": "2024-11-25T09:33:36",
"upload_time_iso_8601": "2024-11-25T09:33:36.796072Z",
"url": "https://files.pythonhosted.org/packages/aa/c7/60a1722cbbf616fb3addfbab2203b5bdb941a75a0e2549b1c88ce6808e74/siri_parser-0.1.8-cp37-abi3-macosx_10_12_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "1052c841523a7bb315983baae287d5108589dfa4489e1e59f4325814aa2d1956",
"md5": "ff41dc06dc35562d76db6909af5b716d",
"sha256": "67f07b65e104a1269c264c7b3046922b15b203954618a858871a646804e2311e"
},
"downloads": -1,
"filename": "siri_parser-0.1.8-cp37-abi3-macosx_11_0_arm64.whl",
"has_sig": false,
"md5_digest": "ff41dc06dc35562d76db6909af5b716d",
"packagetype": "bdist_wheel",
"python_version": "cp37",
"requires_python": ">=3.7",
"size": 759604,
"upload_time": "2024-11-25T09:33:34",
"upload_time_iso_8601": "2024-11-25T09:33:34.021154Z",
"url": "https://files.pythonhosted.org/packages/10/52/c841523a7bb315983baae287d5108589dfa4489e1e59f4325814aa2d1956/siri_parser-0.1.8-cp37-abi3-macosx_11_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "eff769b29ada6f622eb7093c31c8e40ce8bc1b4114a4e454fe8bce704a7dc947",
"md5": "5b87e8fc52c2eb711564acdab246680b",
"sha256": "84f4ab3ca918505f43e3df264f22a922d9e36904685435fd0f7573410c10d95f"
},
"downloads": -1,
"filename": "siri_parser-0.1.8-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
"has_sig": false,
"md5_digest": "5b87e8fc52c2eb711564acdab246680b",
"packagetype": "bdist_wheel",
"python_version": "cp37",
"requires_python": ">=3.7",
"size": 846346,
"upload_time": "2024-11-25T09:33:22",
"upload_time_iso_8601": "2024-11-25T09:33:22.253805Z",
"url": "https://files.pythonhosted.org/packages/ef/f7/69b29ada6f622eb7093c31c8e40ce8bc1b4114a4e454fe8bce704a7dc947/siri_parser-0.1.8-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "3874cabdf01912bac0b4c9995e036700a5ff43dd1a9498f22ed3731b4cc2a05f",
"md5": "50fa61682a6a68c92d120744dbdd3333",
"sha256": "a04e64edd1bb63c09cbdefbd1217f5eb88cfe9bbe98c1ff80e983bc94dad01a0"
},
"downloads": -1,
"filename": "siri_parser-0.1.8-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl",
"has_sig": false,
"md5_digest": "50fa61682a6a68c92d120744dbdd3333",
"packagetype": "bdist_wheel",
"python_version": "cp37",
"requires_python": ">=3.7",
"size": 834174,
"upload_time": "2024-11-25T09:33:24",
"upload_time_iso_8601": "2024-11-25T09:33:24.518793Z",
"url": "https://files.pythonhosted.org/packages/38/74/cabdf01912bac0b4c9995e036700a5ff43dd1a9498f22ed3731b4cc2a05f/siri_parser-0.1.8-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "ab43ad6ff9c2c5090bca85196ea6de4b20fa05b55fd38f29c6fc81e975a565c3",
"md5": "3c881cd9d5d5ef6c64da2a9dc2c0501a",
"sha256": "ccddba482ddb3ee97d0b7b50d25a5e433a34163144ced5f912f3f55bdde6eb3b"
},
"downloads": -1,
"filename": "siri_parser-0.1.8-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl",
"has_sig": false,
"md5_digest": "3c881cd9d5d5ef6c64da2a9dc2c0501a",
"packagetype": "bdist_wheel",
"python_version": "cp37",
"requires_python": ">=3.7",
"size": 899739,
"upload_time": "2024-11-25T09:33:26",
"upload_time_iso_8601": "2024-11-25T09:33:26.659247Z",
"url": "https://files.pythonhosted.org/packages/ab/43/ad6ff9c2c5090bca85196ea6de4b20fa05b55fd38f29c6fc81e975a565c3/siri_parser-0.1.8-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "cec5a75336bffa5b2002c7b1840ca22149c1873482479f1a07d8f9b73d53b28f",
"md5": "c39198a31629a826c80325fdf68fbbe5",
"sha256": "5a7f16c1a32e4aed352da638889df53764942620617be7edb2e5b56816eea532"
},
"downloads": -1,
"filename": "siri_parser-0.1.8-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl",
"has_sig": false,
"md5_digest": "c39198a31629a826c80325fdf68fbbe5",
"packagetype": "bdist_wheel",
"python_version": "cp37",
"requires_python": ">=3.7",
"size": 966402,
"upload_time": "2024-11-25T09:33:28",
"upload_time_iso_8601": "2024-11-25T09:33:28.717156Z",
"url": "https://files.pythonhosted.org/packages/ce/c5/a75336bffa5b2002c7b1840ca22149c1873482479f1a07d8f9b73d53b28f/siri_parser-0.1.8-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "89ac5f0555fd5da9b2514928685b38e3ec2463fa2b297b4614fa3f8ca8c70095",
"md5": "e3bfb6554ad120dc612bc7bd5cc4f876",
"sha256": "5ff41c8a30adcf491f4c2ab28a45d528cf8eb3efe7daa007c63940c7e945f03f"
},
"downloads": -1,
"filename": "siri_parser-0.1.8-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"has_sig": false,
"md5_digest": "e3bfb6554ad120dc612bc7bd5cc4f876",
"packagetype": "bdist_wheel",
"python_version": "cp37",
"requires_python": ">=3.7",
"size": 851859,
"upload_time": "2024-11-25T09:33:32",
"upload_time_iso_8601": "2024-11-25T09:33:32.741026Z",
"url": "https://files.pythonhosted.org/packages/89/ac/5f0555fd5da9b2514928685b38e3ec2463fa2b297b4614fa3f8ca8c70095/siri_parser-0.1.8-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "58ad64626ea39044247aa83bbdbe22630e920ae8dc3a4cc4668e0123ec3bc418",
"md5": "6fb2056a23e18ded9d76df9e36ee85f4",
"sha256": "816ee94292c0480b23d8f9665c5605fb8fdb0e5df21f5055632fb0faa8393856"
},
"downloads": -1,
"filename": "siri_parser-0.1.8-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl",
"has_sig": false,
"md5_digest": "6fb2056a23e18ded9d76df9e36ee85f4",
"packagetype": "bdist_wheel",
"python_version": "cp37",
"requires_python": ">=3.7",
"size": 899088,
"upload_time": "2024-11-25T09:33:30",
"upload_time_iso_8601": "2024-11-25T09:33:30.722238Z",
"url": "https://files.pythonhosted.org/packages/58/ad/64626ea39044247aa83bbdbe22630e920ae8dc3a4cc4668e0123ec3bc418/siri_parser-0.1.8-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "b9e9168e87d892f7475c47c55d54b1dc69e362fcc40a5f9ec9c189407f623c36",
"md5": "7cbfad10f9b71f182c8d3d7485ad89fc",
"sha256": "b31a164c3a31b18d204033af38f3804245dab32f54bda3e4947b79a4d75ab608"
},
"downloads": -1,
"filename": "siri_parser-0.1.8-cp37-abi3-musllinux_1_2_aarch64.whl",
"has_sig": false,
"md5_digest": "7cbfad10f9b71f182c8d3d7485ad89fc",
"packagetype": "bdist_wheel",
"python_version": "cp37",
"requires_python": ">=3.7",
"size": 1024868,
"upload_time": "2024-11-25T09:33:38",
"upload_time_iso_8601": "2024-11-25T09:33:38.147679Z",
"url": "https://files.pythonhosted.org/packages/b9/e9/168e87d892f7475c47c55d54b1dc69e362fcc40a5f9ec9c189407f623c36/siri_parser-0.1.8-cp37-abi3-musllinux_1_2_aarch64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "20993d274c4cb3314e78435d4b1072a02294613b7d877f8d29324630210da20b",
"md5": "5698f914f78f69e7de304695a41110f3",
"sha256": "2a9dc37275819cc2f12321fc7759533fbf74b7f1a96b40f33c363c2bfa9e98a9"
},
"downloads": -1,
"filename": "siri_parser-0.1.8-cp37-abi3-musllinux_1_2_armv7l.whl",
"has_sig": false,
"md5_digest": "5698f914f78f69e7de304695a41110f3",
"packagetype": "bdist_wheel",
"python_version": "cp37",
"requires_python": ">=3.7",
"size": 1095189,
"upload_time": "2024-11-25T09:33:39",
"upload_time_iso_8601": "2024-11-25T09:33:39.447480Z",
"url": "https://files.pythonhosted.org/packages/20/99/3d274c4cb3314e78435d4b1072a02294613b7d877f8d29324630210da20b/siri_parser-0.1.8-cp37-abi3-musllinux_1_2_armv7l.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "fc3dedfde0b764bc00e86e71dd7ac96225205c6abbd7047c1051fc8071e6160d",
"md5": "be4d1197e116328485d284fa3b8c2990",
"sha256": "cfa32e1bbe865717ae4d68ade083cb2c1c7d853110fdab36b8a001fe44ed6d2e"
},
"downloads": -1,
"filename": "siri_parser-0.1.8-cp37-abi3-musllinux_1_2_i686.whl",
"has_sig": false,
"md5_digest": "be4d1197e116328485d284fa3b8c2990",
"packagetype": "bdist_wheel",
"python_version": "cp37",
"requires_python": ">=3.7",
"size": 1040108,
"upload_time": "2024-11-25T09:33:40",
"upload_time_iso_8601": "2024-11-25T09:33:40.776219Z",
"url": "https://files.pythonhosted.org/packages/fc/3d/edfde0b764bc00e86e71dd7ac96225205c6abbd7047c1051fc8071e6160d/siri_parser-0.1.8-cp37-abi3-musllinux_1_2_i686.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "2366de356a71ea7653ca086fbd23d355ae8135727713152f09ab8213422eb831",
"md5": "d1d34639402ec3b962c21c81ddcc8c69",
"sha256": "773ee042a2c9110d821df0c0cc9a0237783a694ebb34cd8eca575a4f30d22ade"
},
"downloads": -1,
"filename": "siri_parser-0.1.8-cp37-abi3-musllinux_1_2_x86_64.whl",
"has_sig": false,
"md5_digest": "d1d34639402ec3b962c21c81ddcc8c69",
"packagetype": "bdist_wheel",
"python_version": "cp37",
"requires_python": ">=3.7",
"size": 1020003,
"upload_time": "2024-11-25T09:33:42",
"upload_time_iso_8601": "2024-11-25T09:33:42.881709Z",
"url": "https://files.pythonhosted.org/packages/23/66/de356a71ea7653ca086fbd23d355ae8135727713152f09ab8213422eb831/siri_parser-0.1.8-cp37-abi3-musllinux_1_2_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "9f199dc640b2f2b2b903e5df1897fadd336da72c357b785b5d75150f39bc9c35",
"md5": "8d839b752291cde501cbecd79d11d87b",
"sha256": "47e036028ed714c6dc2a43e114a292616ded72cf5abe9c8f6a684b8f93bac39a"
},
"downloads": -1,
"filename": "siri_parser-0.1.8-cp37-abi3-win32.whl",
"has_sig": false,
"md5_digest": "8d839b752291cde501cbecd79d11d87b",
"packagetype": "bdist_wheel",
"python_version": "cp37",
"requires_python": ">=3.7",
"size": 556686,
"upload_time": "2024-11-25T09:33:48",
"upload_time_iso_8601": "2024-11-25T09:33:48.842999Z",
"url": "https://files.pythonhosted.org/packages/9f/19/9dc640b2f2b2b903e5df1897fadd336da72c357b785b5d75150f39bc9c35/siri_parser-0.1.8-cp37-abi3-win32.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "d324b82ddc681422bf6266df1f47acc53518a93274f480e5ab93039fb6fe7310",
"md5": "a7b300cd3ccb6c6c04df324f08cbfc47",
"sha256": "2779302f73eb957add247503982499cc0ceb0909bb552a57c75232a764796987"
},
"downloads": -1,
"filename": "siri_parser-0.1.8-cp37-abi3-win_amd64.whl",
"has_sig": false,
"md5_digest": "a7b300cd3ccb6c6c04df324f08cbfc47",
"packagetype": "bdist_wheel",
"python_version": "cp37",
"requires_python": ">=3.7",
"size": 612876,
"upload_time": "2024-11-25T09:33:47",
"upload_time_iso_8601": "2024-11-25T09:33:47.439579Z",
"url": "https://files.pythonhosted.org/packages/d3/24/b82ddc681422bf6266df1f47acc53518a93274f480e5ab93039fb6fe7310/siri_parser-0.1.8-cp37-abi3-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "fc302f76b834a52a38ce31d9e7162d9ae0e8f74f4f8c0c708207cad23e8fd947",
"md5": "16340455c51791638ffd5508f295cf1d",
"sha256": "978d31e046ee2e92966587e5501e09f7e175e82dd1ec1f4a704e8eaa48d29f30"
},
"downloads": -1,
"filename": "siri_parser-0.1.8.tar.gz",
"has_sig": false,
"md5_digest": "16340455c51791638ffd5508f295cf1d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 40776,
"upload_time": "2024-11-25T09:33:44",
"upload_time_iso_8601": "2024-11-25T09:33:44.790425Z",
"url": "https://files.pythonhosted.org/packages/fc/30/2f76b834a52a38ce31d9e7162d9ae0e8f74f4f8c0c708207cad23e8fd947/siri_parser-0.1.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-25 09:33:44",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "siri-parser"
}