tp-lib Python Bindings
Python bindings for the Train Positioning Library (TP-Lib), providing GNSS track axis projection and train path calculation.
Installation
pip install tp-lib
Usage
Timestamps
Input timestamps may be RFC3339 with an explicit offset (e.g.
2025-12-09T14:30:00+01:00 or 2025-12-09T14:30:00Z) or naive ISO 8601
(e.g. 2025-12-09T14:30:00, 2025-12-09 14:30:00). Naive values are
interpreted in the host's local timezone. All timestamps returned by
the library are RFC3339 strings carrying an explicit timezone offset.
from tp_lib import project_gnss, ProjectionConfig
config = ProjectionConfig(max_search_radius_meters=1000.0)
result = project_gnss(gnss_positions, network, config)
Automatic RINF Topology Retrieval
If you omit network (or pass None), the library downloads a bounding-box
subset of the ERA RINF topology on demand:
from tp_lib import project_gnss, RinfRetrievalOptions
result = project_gnss(
gnss_positions=gnss_positions,
network=None,
rinf_options=RinfRetrievalOptions(
endpoint_url="https://graph.data.era.europa.eu/repositories/rinf-plus",
buffer_meters=1000.0,
),
)
Errors are raised as built-in exceptions (ValueError, RuntimeError) when
retrieval cannot satisfy the request. The same overload exists for
calculate_train_path.
The library may raise:
ValueErrorfor invalid input (e.g., malformed GNSS data or invalid coordinates)RuntimeErrorfor operational failures (e.g., RINF topology retrieval errors)
Metadata
Release files for tp-lib 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tp_lib-0.0.6.tar.gz | 236.7 kB | With provenance | Details for tp_lib-0.0.6.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tp_lib-0.0.6-cp312-cp312-win_amd64.whl | CPython 3.12 | CPython 3.12 | Windows x86-64 | Details for tp_lib-0.0.6-cp312-cp312-win_amd64.whl |
| tp_lib-0.0.6-cp312-cp312-manylinux_2_35_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.35+ x86-64 | Details for tp_lib-0.0.6-cp312-cp312-manylinux_2_35_x86_64.whl |
| tp_lib-0.0.6-cp312-cp312-macosx_11_0_arm64.whl | CPython 3.12 | CPython 3.12 | macOS 11.0+ ARM64 | Details for tp_lib-0.0.6-cp312-cp312-macosx_11_0_arm64.whl |
Total release size: 19.6 MB
Release files / tp_lib-0.0.6.tar.gz
| Download URL | tp_lib-0.0.6.tar.gz |
|---|---|
| Size | 236.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7e11830551b5ac77cc64c64c8b3a8f298dc559d68f3be0e14cbb24851c3a7e38
|
|
BLAKE2b-256 checksum How to use checksums |
7f68297ae3541d4415665d97c1473edbb6c3f85f46d4a4a72d4af42330fea1ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 25, 2026.
Transparency logRelease files / tp_lib-0.0.6-cp312-cp312-win_amd64.whl
| Download URL | tp_lib-0.0.6-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 6.2 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
c740d02b34508d53ee848d75870be6b7932a35b534467deb9fdf457c24acc466
|
|
BLAKE2b-256 checksum How to use checksums |
508229d3172c24e4942875f68d5f61286afd41df01c1c178e4e8c3f43752d250
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 25, 2026.
Transparency logRelease files / tp_lib-0.0.6-cp312-cp312-manylinux_2_35_x86_64.whl
| Download URL | tp_lib-0.0.6-cp312-cp312-manylinux_2_35_x86_64.whl |
|---|---|
| Size | 7.0 MB |
| Tags | CPython 3.12 Linux glibc 2.35+ x86-64 |
|
SHA-256 checksum How to use checksums |
09b968c276e31ffb55cb8d48e29c39b78375f072fa2820a4e711861f5d0d2964
|
|
BLAKE2b-256 checksum How to use checksums |
2cffd06431f49cfbc7813d48abbcb43963edb0d772cb40404b01c33bdfba1d9c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 25, 2026.
Transparency logRelease files / tp_lib-0.0.6-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | tp_lib-0.0.6-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 6.2 MB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
367a6f799fd74e508167f7a255faf700db157ea42f9016a740ee71c7c37c98b4
|
|
BLAKE2b-256 checksum How to use checksums |
f1896cccdc2efd752ad9877aa81d20fa40bd20331326cb1ac10a7ed333f91f57
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 25, 2026.
Transparency logSecurity for tp-lib 0.0.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 4 files in this release have been uploaded with provenance metadata.
Attestation for tp_lib-0.0.6.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 25, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.