Skip to main content

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

Project description

iec61850

IEC 61850 client for Python — async-first, type-hinted.

Status: early development (v0.1.x). Vertical slice currently supports:

  • TCP connect / disconnect with timeout
  • read_int32 / write_int32 over MMS
  • Typed exception hierarchy (IedError / IedConnectionError / IedTimeoutError / IedDataAccessError / IedServiceError / IedControlError)

Additional surface (read_bool, read_float, reporting, control, datasets, TLS, GOOSE / SV) is stubbed and will land per release.

Install

pip install iec61850

Requires Python 3.11+.

Platform support note (v0.1.x): only Windows x86_64 wheels are published. Linux / macOS support arrives in a later release.

Quick start

import asyncio
import iec61850

async def main():
    conn = await iec61850.IedConnection.connect("127.0.0.1:102", timeout_ms=5000)
    try:
        value = await conn.read_int32("simpleIOGenericIO/LLN0.Mod.stVal", iec61850.FC.ST)
        print("Mod.stVal =", value)
    finally:
        await conn.disconnect()

asyncio.run(main())

Error handling

try:
    conn = await iec61850.IedConnection.connect("10.0.0.1:102", timeout_ms=2000)
except iec61850.IedTimeoutError:
    ...   # 連線超時
except iec61850.IedConnectionError:
    ...   # TCP / OSI stack 失敗
except iec61850.IedError:
    ...   # 其他 IEC 61850 錯誤的 catch-all base

License

Apache-2.0

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

iec61850-0.2.0-cp311-abi3-win_amd64.whl (530.2 kB view details)

Uploaded CPython 3.11+Windows x86-64

iec61850-0.2.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (545.0 kB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ x86-64

File details

Details for the file iec61850-0.2.0-cp311-abi3-win_amd64.whl.

File metadata

  • Download URL: iec61850-0.2.0-cp311-abi3-win_amd64.whl
  • Upload date:
  • Size: 530.2 kB
  • Tags: CPython 3.11+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for iec61850-0.2.0-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 6825a496c8d6397d4a346316283dda621abfbcb57f96dcdc8784fc2b1c4af63a
MD5 9c930def0cc335346f2d856c0ea0dc3b
BLAKE2b-256 f6be1efbc001a52c84c77f66a7816b6e6a4363dc16a049e616aa03b226ef9e0e

See more details on using hashes here.

File details

Details for the file iec61850-0.2.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for iec61850-0.2.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 33422b60dbdf7533d97b14f187cb2535f8390e2f9db996704b6591eab1c689ce
MD5 971d8509b7b84aad2c026823366f0d8c
BLAKE2b-256 990cdb6063c8dd1ef3f9ebc47270b8b76a7dfde9ca7dba9683684c8eaf7b9f5d

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