Skip to main content

IEC 61850 client for Python, backed by rust_61850 (Rust core).

Project description

iec61850 — Python bindings for rust_61850

Status: Phase 1.0 scaffold (v0.0.0). The public API shape is defined here for review; method bodies raise NotImplementedError until v0.1.0 vertical slice lands (connect + read_int32 + write_int32 end-to-end).

Layout

bindings/python/
  Cargo.toml          # PyO3 extension crate (cdylib, name = _native)
  pyproject.toml      # maturin build backend, PyPI package name = iec61850
  src/lib.rs          # PyO3 #[pymodule] — exception hierarchy + __version__
  python/iec61850/    # pure-Python facade (loaded by Python import system)
    __init__.py       # re-exports public surface
    _facade.py        # class shapes (IedConnection, RcbHandle, ...) with NIE stubs
    _enums.py         # FC / AcsiClass / Validity (StrEnum)
    _dataclasses.py   # frozen value types (TriggerOptions, ClientReport, ...)
    py.typed          # PEP 561 marker
  tests/              # pytest — import / shape / exception hierarchy smoke

Pure-value types stay in Python because they are immutable. Opaque handles (IedConnection, RcbHandle, ControlObjectClient, MmsValue, …) will become PyO3 classes in _native as their implementations land per vertical slice.

Build (development)

From this directory:

uv venv
uv pip install maturin pytest pytest-asyncio
maturin develop      # build + install into the venv
pytest tests/

Publish to PyPI

For v0.0.0 placeholder squat (sdist only — no platform wheels needed):

maturin sdist
# uploads target/wheels/iec61850-0.0.0.tar.gz
twine upload target/wheels/iec61850-0.0.0.tar.gz

For v0.1.0+ proper releases, switch to maturin publish with abi3 wheels for Python 3.10+ across the Linux/macOS/Windows matrix (CI workflow lands later).

Why same repo as rust_61850

The PyO3 facade is a thin shim — it must move in lockstep with the iec61850-client Rust API. Same-repo lets a single commit update both. csp_lib (or any other Python consumer) sees only the PyPI package iec61850; the upstream Rust workspace stays invisible.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iec61850-0.0.0.tar.gz (240.4 kB view details)

Uploaded Source

File details

Details for the file iec61850-0.0.0.tar.gz.

File metadata

  • Download URL: iec61850-0.0.0.tar.gz
  • Upload date:
  • Size: 240.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for iec61850-0.0.0.tar.gz
Algorithm Hash digest
SHA256 8ae72ad1312ce0670e749971541718d0627a13eb952826beeab6f5435436b160
MD5 0db82245680822edadf6ca20a6eef6d9
BLAKE2b-256 c3d013fbebcb928c99780784e92aa25ea3895611990e3f99de8b4ae146dccf85

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page