Python bindings for liblrs: a library to work with linear referencing systems
Project description
LibLRS Python
Usage
Simply add liblrs-python
to your dependencies.
import liblrs_python as lrs
plm = lrs.Lrs(open("path_to_your_lrs_file", "rb").read())
# We build a dict mapping for each LRM id to its handle
lrms = {plm.get_lrm_scale_id(i): i for i in range(plm.lrm_len())}
# We find the handle for the Via Aurelia (https://en.wikipedia.org/wiki/Via_Aurelia)
via_aurelia_handle = [v for k,v in lrms.items() if k.startswith("Via Aurelia")][0]
# We define two measures meaning “100 passus after milestone 50”
# (passus = step in latin, could be any measurement unit)
a = lrs.LrmScaleMeasure("50", 100)
b = lrs.LrmScaleMeasure("60", 200)
# Get the coordinates between those two measures
coordinates = [[p.x, p.y] for p in plm.resolve_range(via_aurelia_handle, a, b)]
Developpment
Create your virtualenv and install maturin:
python -m venv venv-liblrs
source venv-liblrs/bin/activate
pip install
maturin develop
Bindings with PyO3 to liblrs
Publishing
We publish the library to PYPI running:
docker run --rm -e MATURIN_PYPI_TOKEN=PYPI_key -w /io/python -v $(pwd)/..:/io ghcr.io/pyo3/maturin publish
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
File details
Details for the file liblrs_python-0.2.3-cp38-abi3-win_amd64.whl
.
File metadata
- Download URL: liblrs_python-0.2.3-cp38-abi3-win_amd64.whl
- Upload date:
- Size: 661.5 kB
- Tags: CPython 3.8+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 168674d5940551ce186b7f2c896f3fac9babb4f792530e871059153a76f38178 |
|
MD5 | 582ad3c45b3799b6a42997422cb9f536 |
|
BLAKE2b-256 | 48888c22da07c25f67fd1cfe14aaf8b5fdb5824501ce6d1e7ebb0fcfc869a9f7 |
File details
Details for the file liblrs_python-0.2.3-cp38-abi3-win32.whl
.
File metadata
- Download URL: liblrs_python-0.2.3-cp38-abi3-win32.whl
- Upload date:
- Size: 622.6 kB
- Tags: CPython 3.8+, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc2b57fa057eac6a6e8b7292eef83077137b00dd3ccb2e1a072bd7ce4f9e5020 |
|
MD5 | 29dea8ab17324b29723a9bb749703bfb |
|
BLAKE2b-256 | 204217088e236b2474732c3b0d88a23d87a7a0386fc01ced5ab1b32b20f76302 |
File details
Details for the file liblrs_python-0.2.3-cp38-abi3-musllinux_1_2_x86_64.whl
.
File metadata
- Download URL: liblrs_python-0.2.3-cp38-abi3-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.8+, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00660499a86501ef6ddc54e34e2a00945d70665bcfe1c7d2c7d92ba46eca8ccb |
|
MD5 | 1cd356b193512e62b08035d13a64d5e1 |
|
BLAKE2b-256 | 1af71bcfeb21f7ecb58670502546a88a385280af86ce58b73774be0f9e79bcdc |
File details
Details for the file liblrs_python-0.2.3-cp38-abi3-musllinux_1_2_i686.whl
.
File metadata
- Download URL: liblrs_python-0.2.3-cp38-abi3-musllinux_1_2_i686.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.8+, musllinux: musl 1.2+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 388338f1a655a06041ea5472f743adcd9b30c960256825bf61dfb771d230e7ce |
|
MD5 | 1b5a54e2b14b14f69f5464cc0c6e22f8 |
|
BLAKE2b-256 | 1a8b8b541e17d0c85898022f69fe9939bac387080c0a2184409d4b8ac0428376 |
File details
Details for the file liblrs_python-0.2.3-cp38-abi3-musllinux_1_2_armv7l.whl
.
File metadata
- Download URL: liblrs_python-0.2.3-cp38-abi3-musllinux_1_2_armv7l.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.8+, musllinux: musl 1.2+ ARMv7l
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37ec09fbe7f27b292f44033400fe8abb5163b87f5182ca0b944879b3b090f755 |
|
MD5 | 3292c4f32bc33f5bbd0434fa49b36464 |
|
BLAKE2b-256 | 640be3b1eb69115c77de205cae3c56b28e4e08b78b407ff3778d3705fedc8cb1 |
File details
Details for the file liblrs_python-0.2.3-cp38-abi3-musllinux_1_2_aarch64.whl
.
File metadata
- Download URL: liblrs_python-0.2.3-cp38-abi3-musllinux_1_2_aarch64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.8+, musllinux: musl 1.2+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d9dec9405f0406e2ee91885700948bd96e97126ba642df2f762101f9fb798e5 |
|
MD5 | 97d2a0aaef0a83a5310427131d8012a4 |
|
BLAKE2b-256 | b3e688b9d109387c4d9b40435696baec2861083263d83ee0a32c93df2d85b348 |
File details
Details for the file liblrs_python-0.2.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: liblrs_python-0.2.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.0 MB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed3af242aabdb0cd6250148d391ac46f9f31c79aca06a7b6a8d42b2c6f514e39 |
|
MD5 | 432f59f0d7fc6de0290b75ab529962aa |
|
BLAKE2b-256 | c16eaa9785151b06f244ca108c7fa1667da99c8eb6029054d14c890e82ecf237 |
File details
Details for the file liblrs_python-0.2.3-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
.
File metadata
- Download URL: liblrs_python-0.2.3-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ s390x
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d596cb7e723b24423e5d348872b378c2708bd93cbca9f142aa3e114b9b4fa332 |
|
MD5 | 7f0852f5ce0e256fde2da8f3c9b2c1b8 |
|
BLAKE2b-256 | 41f2925606228758c54eefa7a1e577f5f1821d80ca67b0e48f19d6dd3466ec38 |
File details
Details for the file liblrs_python-0.2.3-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
.
File metadata
- Download URL: liblrs_python-0.2.3-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ ppc64le
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57a27c28ba2881e79cf3da1762a7ecd0912c3c9f893d8ced35fcd4549d75df70 |
|
MD5 | 3a1443173899eec1f0b1c09e93a9227b |
|
BLAKE2b-256 | 79b7997ba3b96bd743ed01f76fdafbf2eeb8570415701fbde8d599895c8df337 |
File details
Details for the file liblrs_python-0.2.3-cp38-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
.
File metadata
- Download URL: liblrs_python-0.2.3-cp38-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5d96e5fb478783d653cf84c5121e4f828fc6a9fe9a3159bcfb3c798740873f4 |
|
MD5 | 6b51f49bf951645c076a8989b0c3ea83 |
|
BLAKE2b-256 | 752224a210377c43e1df11dc1d372ae6d6f4141ccb24f6b9ff2d67d0cb792ace |
File details
Details for the file liblrs_python-0.2.3-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
.
File metadata
- Download URL: liblrs_python-0.2.3-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
- Upload date:
- Size: 964.1 kB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ ARMv7l
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2b3ba4ec1ec429c5e2fb578d7e3bc69296583ee52ce594aab29b3d63fd466f2 |
|
MD5 | 83b331cee71b9f15902967e745ae68e1 |
|
BLAKE2b-256 | c860e083e6fffea3934de1b6cfd6d11e9bea71bf7ac92d397e4d9565ca7603c2 |
File details
Details for the file liblrs_python-0.2.3-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: liblrs_python-0.2.3-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 981.8 kB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93b6c6217d11ca780728cdfea3c2e5cb04052a267228254e8419018b12691d2d |
|
MD5 | 371df5e8746a4e5fe74d876a9df0cbb9 |
|
BLAKE2b-256 | 5421eac55844af9ad6e6252c75e0a9e0cc743449af1a7099919cb8ced3cbcfc9 |
File details
Details for the file liblrs_python-0.2.3-cp38-abi3-macosx_11_0_arm64.whl
.
File metadata
- Download URL: liblrs_python-0.2.3-cp38-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 852.5 kB
- Tags: CPython 3.8+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ed049d1838f5b0c6697d038c7b7ac340aa195f81307e0719084b95c47f5c583 |
|
MD5 | a704244c7416b0dc7328dbafbe676da0 |
|
BLAKE2b-256 | cd48c71636b938b52ab67da121e8ae63a6184669fb33cce01205b7cc743aee4a |
File details
Details for the file liblrs_python-0.2.3-cp38-abi3-macosx_10_12_x86_64.whl
.
File metadata
- Download URL: liblrs_python-0.2.3-cp38-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 855.9 kB
- Tags: CPython 3.8+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ef2a6b7f532d40d51952b426cb9246b290dcd14310ca2f5bf06369048715744 |
|
MD5 | 8262be3d4cf2cf676e9bc4c24c6e68db |
|
BLAKE2b-256 | 0542c9de96ba691dda7124a8879bc685f6b37e05f845d0c368e4d238731fc854 |