instro-ethernetip
EtherNet/IP device support for instro: the config-driven EtherNetIPDevice HAL plus its native session backend.
This is a dedicated, self-contained package. It owns the entire instro.ethernetip subpackage: the pure-Python HAL (EtherNetIPDevice, config, and types) and the private native module instro.ethernetip._ethernetip built from Rust. Install it with pip install instro-ethernetip, via the instro[ethernetip] extra, or as part of instro[all].
It exists separately from crates/instro-ethernetip on purpose:
crates/instro-ethernetipis the core Rust library and should stay usable from pure Rust code without pulling in PyO3 or Python packaging concerns.packages/instro-ethernetipis the optional Python-facing wrapper built with PyO3 andmaturin.
That split keeps the Rust crate focused on its transport and value API while allowing Python packaging, type stubs, and extension-module details to evolve independently.
Layout
src/lib.rs: PyO3 module entrypointsrc/sync_session.rs: synchronousEtherNetIpSessionAPIsrc/values.rs:PlcValue,PlcKind,StructuredValue, and Python/Rust value conversionssrc/errors.rs: shared Python exception mappinginstro/ethernetip/__init__.py: public HAL exports (EtherNetIPDevice, config and types)instro/ethernetip/ethernetip.py: the config-drivenEtherNetIPDeviceinstrumentinstro/ethernetip/ethernetip_types.py: pydantic config models (EtherNetIPConfig,TagDef, …)instro/ethernetip/_ethernetip.pyi: typing stub for the private native moduleinstro/ethernetip/py.typed: marker that makes the package's type information visible to type checkerspyproject.toml:maturinpackaging configuration
Relationship to the Rust crate
The Python wrapper depends on crates/instro-ethernetip and translates between:
- Python classes such as
EtherNetIpSession,PlcValue,PlcKind, andStructuredValue - the Rust crate's
blocking::ExplicitSession,Value, andStructuredValueAPI
The Rust crate remains the source of truth for EtherNet/IP behavior and owns the private shared Tokio runtime used by the synchronous wrapper. The PyO3 layer remains responsible for releasing the GIL around blocking calls and translating values and exceptions into Python types.
EtherNetIpSession.read_tag() returns PlcValue rather than a bare Python scalar so callers can
preserve the PLC scalar kind, such as DINT versus UDINT or REAL versus LREAL. The
PlcValue.value property exposes the Python payload, and PlcValue.kind exposes the corresponding
PlcKind.
EtherNetIpSession.read_tags() reads several tags in one batched request and returns one
(name, result) tuple per requested tag. Successful results are PlcValue instances. Per-tag
failures are typed EtherNetIpBatchError instances, so one missing or mismatched tag does not
discard successful reads from the same batch.
EtherNetIpSession.write_tag() accepts:
PlcValuefor explicit scalar and structured writesStructuredValue, which is promoted to a structured PLC valuebool, which maps unambiguously to PLCBOOL
It intentionally rejects bare Python int, float, str, bytes, and bytearray values. Use the
appropriate PlcValue.*(...) constructor for numeric writes and StructuredValue(data=...) for
raw structured bytes.
Type stubs
The .pyi file describes the Python API for type checkers, editors, and tests. It is not executed
at runtime.
instro/ethernetip/_ethernetip.pyibelongs to this package and describes the private compiled extension module built from Rust. The runtime_ethernetipmodule is a PyO3 native module, so this stub is where Python tooling learns aboutEtherNetIpSession,PlcKind,PlcValue,StructuredValue,EtherNetIpError, method signatures, properties, and value aliases.instro/ethernetip/py.typedmarks the package as typed so consumers and tests can see the stub when the package is installed.
When the PyO3 API changes, keep the Rust exports and _ethernetip.pyi in sync.
Build, CI, and packaging
This package's Cargo.lock lives beside Cargo.toml in this directory (not the root workspace lock). See CONTRIBUTING.md — Rust Cargo.lock (dual-lock policy) for how to maintain it and add future standalone wrappers.
instro-ethernetip is a PyO3 extension crate packaged by maturin.
pyo3exposes Rust types and functions as Python classes in the privateinstro.ethernetip._ethernetipmodulematurindrives the Python packaging step and turns the Rust crate into a Python wheel- the crate is built as a C-compatible dynamic library (
cdylib), which the wheel includes.- It's this dynamic library that's loaded by Python at import time to interface with Rust code.
- On disk, the dynamic library is a platform-specific Python extension module, such as
.abi3.soon Linux and macOS or.pydon Windows.
- the wheel is ABI-stable across CPython 3.10+ because the crate uses PyO3's
abi3-py310mode, which is a good fit because Connect already depends on Python 3.10+- concretely, this means we don't need to build each wheel for different python versions (3.10, 3.11, 3.12, etc).
At build time, maturin compiles the Rust crate, places the resulting shared library in the wheel
as the private instro.ethernetip._ethernetip extension module, and includes _ethernetip.pyi
and py.typed for typing.
For local verification on your current machine:
just eip-buildbuilds both an sdist and a wheel for the current host platform intodist/just eip-wheel-smoke-testbuilds the wheel, installs it into an isolated environment, and verifies thatinstro.ethernetip._ethernetipimports successfullyjust eip-testruns the EtherNet/IP-specific flow: wheel import smoke test, Rust formatting, linting, library tests, doc tests, and Python binding tests in editable modejust testrunsjust eip-testand then the broader Python test suite, including the local type-stub boundary tests
Distribution and platform coverage
EtherNet/IP support is published as the standalone instro-ethernetip package and surfaced on
the core distribution as the instro[ethernetip] extra (also included in instro[all]).
instro[ethernetip](andinstro[all]) depend oninstro-ethernetip- the root dev dependency group includes
instro-ethernetip, souv syncbuilds and installs the local PyO3 package for development just eip-wheel-smoke-testcan still build a local wheel and verify the private native module against that wheel
The release workflow builds platform-specific wheels for:
- Linux
x86_64andaarch64 - macOS
x86_64andaarch64 - Windows
x86_64
The release workflow also publishes a source distribution. The sdist includes the Rust
source for both instro-ethernetip and crates/instro-ethernetip, plus the Cargo
manifests and lockfile, so source builds do not depend on unpublished repository files.
Development setup:
uv sync
After uv sync, the local native package is available from its private module path.
Import path and runtime loading
Most callers use the EtherNetIPDevice HAL from instro.ethernetip. The native session API can
also be imported directly:
from instro.ethernetip._ethernetip import EtherNetIpSession, PlcValue, StructuredValue
Under the hood:
instro.ethernetip._ethernetipis the private native module owned by this package- importing
instro.ethernetip._ethernetiploads the compiled PyO3 extension module from the installed package - the module initializer registers the Rust-backed Python classes, and method calls then execute in Rust against
crates/instro-ethernetip
Metadata
Release files for instro-ethernetip 1.0.2
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 | |
|---|---|---|---|---|
| instro_ethernetip-1.0.2.tar.gz | 58.0 kB | With provenance | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| instro_ethernetip-1.0.2-cp310-abi3-win_amd64.whl | CPython 3.10 | abi3 | Windows x86-64 | Details |
| instro_ethernetip-1.0.2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| instro_ethernetip-1.0.2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ ARM64 | Details |
| instro_ethernetip-1.0.2-cp310-abi3-macosx_11_0_arm64.whl | CPython 3.10 | abi3 | macOS 11.0+ ARM64 | Details |
| instro_ethernetip-1.0.2-cp310-abi3-macosx_10_12_x86_64.whl | CPython 3.10 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 3.3 MB
Release files / instro_ethernetip-1.0.2.tar.gz
| Download URL | instro_ethernetip-1.0.2.tar.gz |
|---|---|
| Size | 58.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3dac9152f5bece4cafff85e9dde9e2015b7f0d47fa5cf2051cdfee43f16ff0ca
|
|
BLAKE2b-256 checksum How to use checksums |
a9a82d8e705f78d8804978ea7cb029cadf385d7cf45c7ff7c63afe548bcc19a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.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 Oct 24, 2026.
Transparency logRelease files / instro_ethernetip-1.0.2-cp310-abi3-win_amd64.whl
| Download URL | instro_ethernetip-1.0.2-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 510.0 kB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
fd4692e5c22cf2ece9e5dee96e44cdd03758fe78b8d620f97c550bcc18de6e31
|
|
BLAKE2b-256 checksum How to use checksums |
6c4820b37558dad4ec50a993d5fe3691dd0c0d0e9b52fe7abe9a08e9d611963f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.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 Oct 24, 2026.
Transparency logRelease files / instro_ethernetip-1.0.2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | instro_ethernetip-1.0.2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 762.0 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
69709e40e77e083daaf44907e7ad3fd3874279bc4aec910c784afa960bcacb03
|
|
BLAKE2b-256 checksum How to use checksums |
865e6388f5a8e6e60de0ec89d1bc2b931abb07f05b62f41446bb3bdb82661967
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.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 Oct 24, 2026.
Transparency logRelease files / instro_ethernetip-1.0.2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | instro_ethernetip-1.0.2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 702.9 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
93891e41b2e7693c61ab0df50ad1103517dd90367505ef5fbe54ebacb9ae6b2a
|
|
BLAKE2b-256 checksum How to use checksums |
fb3c670d528bb5015851053550229ca5c3e6a7080f0e7556f2a4f60727ddc99a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.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 Oct 24, 2026.
Transparency logRelease files / instro_ethernetip-1.0.2-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | instro_ethernetip-1.0.2-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 641.3 kB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
a0b9c2cd148a90aca9877a0c842b9b3262eeee65bbe741b5f9906342ef570b49
|
|
BLAKE2b-256 checksum How to use checksums |
3ef08f2c38d1939d011bcd1d7352a7ad0dd9bd5f94d15e69b5360ebce4628d48
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.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 Oct 24, 2026.
Transparency logRelease files / instro_ethernetip-1.0.2-cp310-abi3-macosx_10_12_x86_64.whl
| Download URL | instro_ethernetip-1.0.2-cp310-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 653.3 kB |
| Tags | CPython 3.10 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
5156d7e750190fb67e88c20bb964f9a37fe174c1970583101c36fe5307ac04a9
|
|
BLAKE2b-256 checksum How to use checksums |
4aec597b760b175d88ba766f387fb3f9f5974afe0fdc92b7a82a0ca4c403d1c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.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 Oct 24, 2026.
Transparency logSecurity for instro-ethernetip 1.0.2
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 6 files in this release have been uploaded with provenance metadata.
Attestation for instro_ethernetip-1.0.2.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 24, 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.