Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

retp (Python)

An ETP v1.2 client for Python, over the Rust retp stack: open a session with an ETP server, list its dataspaces and resources, read and write EnergyML objects, read data arrays into numpy.

import retp

with retp.connect("wss://etp.example.org/", token=token) as session:
    for space in session.dataspaces():
        print(space["path"], space["uri"])

    listed = session.resources("demo")
    objects, errors = session.get_objects([r["uri"] for r in listed["resources"]])

    values, dimensions = session.read_array(uri, "/RESQML/.../points")
    points = values.reshape(dimensions)

It is only a bridge. Every operation is a call into the Rust library (retp-client, energyml-etp-store); the Python layer converts arguments and results and carries no feature the Rust library does not have. What Python needs and Rust lacks is added in Rust first.

Objects are dictionaries, in the EnergyML JSON encoding: every node carries its $type. No generated classes. This is the same convention as energyml-rust's Python bridge (energyml.rust), so an object read here can be put there, and the other way round.

Arrays are numpy arrays, copied out of the Rust buffer, flat and row-major, with the dimensions beside them.

A failure is named. Exceptions derive from retp.RetpError and tell apart what a caller does differently: reconnect (ConnectionLost), log in again (AuthorizationNeeded), check before retrying a write (OutcomeUnknown), give up on a feature (Unsupported). A call never returns an empty result to mean "not supported".

The token is never stored: it is handed to the Rust client and is in no repr, no attribute and no error message.

Status: first draft, alpha. See DESIGN.md for the scope, the decisions still open, and what the Rust API must grow before the bridge can offer more. See ARCHITECTURE.md for why the code is shaped as it is, and docs/python.md (at the root of the repository) for the user guide.

Install

pip install retp

TODO(verify): not published to PyPI yet. From a checkout of the repository (needs the HDF5 C library, or add hdf5-static to the features for CMake and a C compiler instead):

pip install maturin
cd crates/retp-python
maturin develop

License

Apache-2.0.

Metadata

Release files for retp 0.4.0a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for retp 0.4.0a1
File Size Uploaded Provenance
retp-0.4.0a1.tar.gz 395.6 kB With provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for retp 0.4.0a1
File
retp-0.4.0a1-cp39-abi3-win_arm64.whl CPython 3.9 abi3 Windows ARM64 Details
retp-0.4.0a1-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details
retp-0.4.0a1-cp39-abi3-musllinux_1_2_x86_64.whl CPython 3.9 abi3 Linux musl 1.2+ x86-64 Details
retp-0.4.0a1-cp39-abi3-musllinux_1_2_aarch64.whl CPython 3.9 abi3 Linux musl 1.2+ ARM64 Details
retp-0.4.0a1-cp39-abi3-manylinux_2_28_x86_64.whl CPython 3.9 abi3 Linux glibc 2.28+ x86-64 Details
retp-0.4.0a1-cp39-abi3-manylinux_2_28_aarch64.whl CPython 3.9 abi3 Linux glibc 2.28+ ARM64 Details
retp-0.4.0a1-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details
retp-0.4.0a1-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details

Total release size: 378.2 MB

Release files / retp-0.4.0a1.tar.gz

Download URL retp-0.4.0a1.tar.gz
Size 395.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b53512780722de174c455e05b6df21b77b5a93edbac27bf6502eafe4244d5b98
BLAKE2b-256 checksum
How to use checksums
be2c98fea955fd9bf27b28034b98b3817329a908e2a0ce049b26b5e663d04e1d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 22, 2026.

Transparency log

Release files / retp-0.4.0a1-cp39-abi3-win_arm64.whl

Download URL retp-0.4.0a1-cp39-abi3-win_arm64.whl
Size 41.3 MB
Tags CPython 3.9 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
7cf21cb2b946264d4a3353b8c65693c4facb9e23cf380bc738f8ace3e8d67fcf
BLAKE2b-256 checksum
How to use checksums
aafde54522c61fb77b0eee66afaac0637e8bbb20d58a6e6a9bb3cd9b015e19b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 22, 2026.

Transparency log

Release files / retp-0.4.0a1-cp39-abi3-win_amd64.whl

Download URL retp-0.4.0a1-cp39-abi3-win_amd64.whl
Size 44.1 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
98aef24dd31bc5b1cfc600971f106175489da7f7c58b63f4b4435b94d7e45644
BLAKE2b-256 checksum
How to use checksums
fbd371c986d6e9c4e513122a874dcbb3fe5f46148972a8fb969f56cb9775ffb5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 22, 2026.

Transparency log

Release files / retp-0.4.0a1-cp39-abi3-musllinux_1_2_x86_64.whl

Download URL retp-0.4.0a1-cp39-abi3-musllinux_1_2_x86_64.whl
Size 53.0 MB
Tags CPython 3.9 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
bfc49ff7b151948dedc41815e7cd309184c4314a484b4e2cd72887cc48d684ad
BLAKE2b-256 checksum
How to use checksums
1c16a016163d16b31d061cde16603fdfff2efd5a5cab0bd391839a9a95e03307
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 22, 2026.

Transparency log

Release files / retp-0.4.0a1-cp39-abi3-musllinux_1_2_aarch64.whl

Download URL retp-0.4.0a1-cp39-abi3-musllinux_1_2_aarch64.whl
Size 53.3 MB
Tags CPython 3.9 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
735be36f2f1479d9a83647f926065fc47bbd716432306949b04cd40b6eea0004
BLAKE2b-256 checksum
How to use checksums
cde10b1c9725a39f7323a688fab25aa5ba5edfd14cdaa7fb6a9cc060a77f166d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 22, 2026.

Transparency log

Release files / retp-0.4.0a1-cp39-abi3-manylinux_2_28_x86_64.whl

Download URL retp-0.4.0a1-cp39-abi3-manylinux_2_28_x86_64.whl
Size 48.2 MB
Tags CPython 3.9 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
6ffe3b2cff34adf810131c814e34850a81f76b5d0e9771db441a22d5d75dfc66
BLAKE2b-256 checksum
How to use checksums
c194babb0d6d11318a7400cb209c1a9772d92e0b9ebeb12cb3a062910666e1d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 22, 2026.

Transparency log

Release files / retp-0.4.0a1-cp39-abi3-manylinux_2_28_aarch64.whl

Download URL retp-0.4.0a1-cp39-abi3-manylinux_2_28_aarch64.whl
Size 53.3 MB
Tags CPython 3.9 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
8839ffee5f7898bbef87622da251e271c0b7d06cbbb1924f2a925808c057a3e8
BLAKE2b-256 checksum
How to use checksums
d59e394ec73d51612f892fd01c81afa4e2a5d8ea28b32f096f698ded89638df7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 22, 2026.

Transparency log

Release files / retp-0.4.0a1-cp39-abi3-macosx_11_0_arm64.whl

Download URL retp-0.4.0a1-cp39-abi3-macosx_11_0_arm64.whl
Size 42.4 MB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a468a712dde862facfe62b45e230e99c48a61f0437de5f697614dc4fdf3dc6fe
BLAKE2b-256 checksum
How to use checksums
e2b38deb8acc45d16713525fa8ee9276c2d5bd4249f9e9b550be502f87b1f15a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 22, 2026.

Transparency log

Release files / retp-0.4.0a1-cp39-abi3-macosx_10_12_x86_64.whl

Download URL retp-0.4.0a1-cp39-abi3-macosx_10_12_x86_64.whl
Size 42.1 MB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
2a46d84d81907ffc073cf43a0ec80cf907033a62ae69db68f1b858b2ebe6bcf7
BLAKE2b-256 checksum
How to use checksums
73d1f68d1fb5549d795facc59198f6ba6d52c6443e08f06297b8e0a6d4018972
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 22, 2026.

Transparency log

Security for retp 0.4.0a1

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 9 files in this release have been uploaded with provenance metadata.

Select from 9 files

Attestation for retp-0.4.0a1.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 Oct 22, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page