Layrz SDK for Python
It's a group of classes/SDK that can help you to implement scripts into Layrz modules, or incorporate them into your own projects.
Installation
To use this package, add layrz-sdk to your project:
pip install layrz-sdk
or, if you use uv:
uv add layrz-sdk
Requires Python >=3.13.
Requirements
Installing from PyPI
Nothing extra is needed on the platforms with a prebuilt wheel. The published wheels are platform-specific (py3-none-<platform>) and bundle the compiled LCL engine (layrz_sdk/_lib/liblayrz_lcl.so on Linux, layrz_sdk/_lib/liblayrz_lcl.dylib on macOS).
Prebuilt wheels:
- Linux x86_64 and aarch64 (
manylinux_2_28, glibc). - macOS arm64 and x86_64 (macOS 12+).
The LCL engine (LclCore) is not supported on musl-based systems such as Alpine Linux: the Go shared library cannot be loaded there. On musl, the sdist installs without Go or a C compiler (the library build is skipped), import layrz_sdk works and everything except LclCore.perform is available; LclCore.perform raises ImportError. Use a glibc-based image such as python:3.13-slim if you need LCL. The LAYRZ_SDK_LCL_LIB override does not lift this limitation.
On other platforms without a prebuilt wheel (for example Windows or older glibc), pip installs the source distribution (sdist) and compiles the library during installation. The sdist embeds the Go source it needs, so you need:
- Go matching the version declared in
go/go.mod(currently1.27.0). - A C compiler (
gccorclang) andCGO_ENABLED=1.
Building from source
Installing from a git checkout, running uv build, uv sync or the test suite compiles the LCL engine, so you need:
- The monorepo layout (
python/next togo/). - Go matching the version declared in
go/go.mod(currently1.27.0). - CGO enabled (
CGO_ENABLED=1) and a C compiler (gccorclang; on macOS, the Xcode Command Line Tools). - On macOS,
MACOSX_DEPLOYMENT_TARGETset to12.0or higher.
The library is built with make -C go cabi OUT=<path>, which runs go build -buildmode=c-shared on go/cabi. The Python build runs it automatically and writes the result to python/layrz_sdk/_lib/.
Layrz Compute Language (LCL)
layrz_sdk.lcl.LclCore is backed by a Go engine that is loaded with the standard library ctypes. The library is loaded lazily on first LCL use, so a missing library only breaks LCL and never import layrz_sdk.
LclCore.perform() keeps returning a JSON-encoded string. The additional_globals and additional_locals arguments are deprecated as of 4.35.0: LclCore.perform() still accepts them but ignores them (the Go engine cannot use Python callables or values from them) and emits a DeprecationWarning when they are passed. They will be removed in a future major version. Formulas support LCL function calls, literals, arithmetic, comparisons and and / or / not, but no arbitrary Python.
FAQ
Why is this package called layrz-sdk?
All packages developed by Layrz are prefixed with layrz, check out our other packages on PyPI and pub.dev.
What is this package for?
This is the Python side of the multi-language Layrz SDK monorepo, which also ships a Go SDK (github.com/layrz-software/layrz-sdk/go/v4) and a Dart/Flutter SDK (layrz_sdk on pub.dev).
What's inside: the shared entities (100+ Pydantic models for assets, devices, sensors, geofences, telemetry messages, charts, broadcasts, modbus, operations, reports and push notifications), the Layrz Compute Language (LCL) interpreter for telemetry scripting, and helpers (UUIDv7 composition/extraction, color conversion) — converting Layrz API and platform payloads into typed Python objects. More information about our SDKs can be found in our documentation.
I have a question, how can I contact you?
If you need more assistance, you can open an issue on the Repository and we're happy to help you :)
License
This project is licensed under the MIT License - see the LICENSE file for details.
Copyright © 2026 Layrz, Inc.
Who are we? / Want to work with us?
Layrz, Inc. is leading the next industrial revolution. We build Layrz, a modular, plug & play IoT platform that helps companies and industries monitor, automate and control their operations in real time, from sensors and alerts to decisions, across Latin America, the United States and Europe.
Want to build with us? Contact us at sales@layrz.com or via WhatsApp at +(507)-6979-3073.
Metadata
Release files for layrz-sdk 4.35.1
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 |
|---|---|---|---|---|
| layrz_sdk-4.35.1.tar.gz | 267.3 kB | With provenance | Details for layrz_sdk-4.35.1.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| layrz_sdk-4.35.1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl | Python 3 | none | Linux glibc 2.17+ ARM64, Linux glibc 2.28+ ARM64 | Details for layrz_sdk-4.35.1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl |
| layrz_sdk-4.35.1-py3-none-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl | Python 3 | none | Linux glibc 2.28+ x86-64, Linux glibc 2.5+ x86-64 | Details for layrz_sdk-4.35.1-py3-none-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl |
| layrz_sdk-4.35.1-py3-none-macosx_12_0_x86_64.whl | Python 3 | none | macOS 12.0+ x86-64 | Details for layrz_sdk-4.35.1-py3-none-macosx_12_0_x86_64.whl |
| layrz_sdk-4.35.1-py3-none-macosx_12_0_arm64.whl | Python 3 | none | macOS 12.0+ ARM64 | Details for layrz_sdk-4.35.1-py3-none-macosx_12_0_arm64.whl |
Total release size: 6.4 MB
Release files / layrz_sdk-4.35.1.tar.gz
| Download URL | layrz_sdk-4.35.1.tar.gz |
|---|---|
| Size | 267.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
707ad4a0036d9a1af318ac370782d0189e9366c194c57675be04af95f82421bd
|
|
BLAKE2b-256 checksum How to use checksums |
8b5797e4dfd5891a55b83f81cc727cc5237802e0c8658a7c53781b52ec400679
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 Dec 2, 2026.
Transparency logRelease files / layrz_sdk-4.35.1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
| Download URL | layrz_sdk-4.35.1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
cdcc7bf827d52a9d2259f17dec74ff4c160ff7d86fd207341f436435ad95cf7f
|
|
BLAKE2b-256 checksum How to use checksums |
fb91d4c5e93860b1aaea38242b4035fae5192874e3eb94c48be0adc2d1e7b57d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 Dec 2, 2026.
Transparency logRelease files / layrz_sdk-4.35.1-py3-none-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
| Download URL | layrz_sdk-4.35.1-py3-none-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
a8e705f06e1f0ab32da876d36c2802280b222a51fd14547984116482e742f3f0
|
|
BLAKE2b-256 checksum How to use checksums |
d6c92942a6555e8110f15fd0abf7822580dab5651e8fdfd54358b76d6815eb37
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 Dec 2, 2026.
Transparency logRelease files / layrz_sdk-4.35.1-py3-none-macosx_12_0_x86_64.whl
| Download URL | layrz_sdk-4.35.1-py3-none-macosx_12_0_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | Python 3 macOS 12.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
c19ecbd54d28603112ee429125bfbcebc637703ec26ea57a604dcfbecd4b00d9
|
|
BLAKE2b-256 checksum How to use checksums |
ce52d4c678614754f8690e7ed847d91480ba37403e1fb013b2486c6dde827fcc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 Dec 2, 2026.
Transparency logRelease files / layrz_sdk-4.35.1-py3-none-macosx_12_0_arm64.whl
| Download URL | layrz_sdk-4.35.1-py3-none-macosx_12_0_arm64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | Python 3 macOS 12.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
cb13227714f467c4b77a30013fa065d10664b4dc9a86181aa6d5bc9f92ea840b
|
|
BLAKE2b-256 checksum How to use checksums |
1efc7449f86c20c7bb8ac9b58085474a862f99e22782dc14fdc7fa2641e909a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 Dec 2, 2026.
Transparency logSecurity for layrz-sdk 4.35.1
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 5 files in this release have been uploaded with provenance metadata.
Attestation for layrz_sdk-4.35.1.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 Dec 2, 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.