IEC 61850 client for Python, backed by rust_61850 (Rust core).
Project description
iec61850
Async-first, type-hinted IEC 61850 client for Python.
Features
- TCP connect / disconnect with timeout
- Typed scalar read / write:
bool,int32,int64,uint32,float,float64,string,timestamp(decoded todatetime),quality(decoded to aQualitydataclass) - Directory queries:
get_server_directory,get_logical_device_directory,get_logical_node_directory(AcsiClass),get_data_directory - Typed exception hierarchy:
IedError,IedConnectionError,IedTimeoutError,IedDataAccessError,IedServiceError,IedControlError
Install
pip install iec61850
Requires Python 3.11+. Wheels are published for Windows x86_64 and Linux x86_64 (manylinux 2014).
Quick start
import asyncio
import iec61850
async def main():
conn = await iec61850.IedConnection.connect("127.0.0.1:102", timeout_ms=5000)
try:
status = await conn.read_int32("simpleIOGenericIO/LLN0.Mod.stVal", iec61850.FC.ST)
vendor = await conn.read_string("simpleIOGenericIO/LLN0.NamPlt.vendor", iec61850.FC.DC)
quality = await conn.read_quality("simpleIOGenericIO/GGIO1.Ind1.q", iec61850.FC.ST)
print(status, vendor, quality.validity)
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:
... # connection timed out
except iec61850.IedConnectionError:
... # TCP / OSI stack failure
except iec61850.IedError:
... # catch-all base for any IEC 61850 error
License
Apache-2.0
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file iec61850-0.4.0-cp311-abi3-win_amd64.whl.
File metadata
- Download URL: iec61850-0.4.0-cp311-abi3-win_amd64.whl
- Upload date:
- Size: 651.4 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9023ef009013bb81a5ea4d5ca4284f0e079140f31a00899b550174675990ecf6
|
|
| MD5 |
3886f58c5e6210c50e16606784f0f216
|
|
| BLAKE2b-256 |
c84c0f736e709093c8ca2130e338bc39e4d78554771eb3ace9951bedd1b9fd9f
|
File details
Details for the file iec61850-0.4.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: iec61850-0.4.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 630.9 kB
- Tags: CPython 3.11+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
318b55f9dd039f10c728acc6e71c46bad1b48a788c8c984acfda43d729641f0f
|
|
| MD5 |
35ab1900924b542550cfba0242561b1d
|
|
| BLAKE2b-256 |
a4ffc1ebcf84373aeff05f90f20d4a6aad2c017b6ed6f61c4fd6926b570320b0
|