Python bindings for libiec61850 - IEC 61850 protocol implementation
Project description
pyiec61850-ng
Next Generation Python bindings for libiec61850, packaged as a Python wheel.
This repository provides Python bindings for the libiec61850 library, which is an open-source implementation of the IEC 61850 standard for communication networks and systems in substations.
Installation
Install from PyPI (Recommended)
pip install pyiec61850-ng
Install from GitHub Release
pip install pyiec61850-ng --find-links https://github.com/f0rw4rd/pyiec61850-ng/releases/latest/download/
Install directly from GitHub
pip install git+https://github.com/f0rw4rd/pyiec61850-ng.git
Install from local wheel
pip install pyiec61850-ng-*.whl
Usage
Quick Start
import pyiec61850.pyiec61850 as pyiec61850
# Create and connect to an IEC 61850 server
connection = pyiec61850.IedConnection_create()
error = pyiec61850.IedConnection_connect(connection, "192.168.1.100", 102)
if error == pyiec61850.IED_ERROR_OK:
print("Connected successfully!")
# Perform operations...
pyiec61850.IedConnection_close(connection)
pyiec61850.IedConnection_destroy(connection)
Examples
For comprehensive examples, see the examples directory:
- Basic Connection - Connect to an IEC 61850 server
- Device Discovery - Discover logical devices, nodes, and data objects
- Reading Data - Read values from data objects
- File Transfer - Download files using MMS file services
Run examples:
python examples/01_basic_connection.py 192.168.1.100
python examples/02_device_discovery.py 192.168.1.100
Building from Source
The wheel package is built using Docker:
docker build -t pyiec61850-builder --build-arg LIBIEC61850_VERSION=v1.6 .
To extract the wheel file:
mkdir -p ./dist
docker create --name wheel-container pyiec61850-builder
docker cp wheel-container:/wheels/. ./dist/
docker rm wheel-container
Versioning
This package uses the format: LIBIEC61850_VERSION.REVISION
- Example:
1.6.0.1= libiec61850 v1.6.0, first package revision - 1.6.0: The exact libiec61850 version included (static)
- .1: Package revision for bug fixes, rebuilds, binding improvements
This clearly shows which libiec61850 version you're getting and our package iteration.
Check current version:
python version.py # Package version: 1.6.0.1
python version.py --libiec61850 # libiec61850 version: v1.6.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
Built Distribution
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 pyiec61850_ng-1.6.0.3-cp310-cp310-manylinux1_x86_64.whl.
File metadata
- Download URL: pyiec61850_ng-1.6.0.3-cp310-cp310-manylinux1_x86_64.whl
- Upload date:
- Size: 1.9 MB
- Tags: CPython 3.10
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6ed19d3e3b7b8c9274ba95c2986c6a874508225445453fa45cafeff035bcfc3
|
|
| MD5 |
225d16415649ac660ecfed618ed15111
|
|
| BLAKE2b-256 |
934f2b1fb8e5fc6049b663c3cdaaaf6a94446268ad0da19c917928dfcd87e044
|