Skip to main content

GElib

Read the file formats a GE protective relay project is made of — the ones EnerVista UR Setup produces.

Nothing here talks to a relay, opens a socket, or knows what a web request is.

from pathlib import Path
from gelib import urs

doc = urs.parse(Path("relay.urs").read_bytes())

print(doc.header.model, doc.header.firmware)     # T60 820
print(len(doc.settings), doc.groups())           # 16111 [1, 2, 3, 4, 5, 6]

curve = doc.get("UR_DATA_GROUND_TOC_X_CURVE")
print(curve.raw, curve.decode)                   # 4 IEC Curve B

assert doc.serialize() == Path("relay.urs").read_bytes()   # byte for byte
module what it reads
gelib.urs .urs, the settings export: every setting of a UR, at its group, element and index

Round-trip is the contract

parse(data).serialize() == data, byte for byte — the same rule the SEL side holds for a SET_D<n>.TXT, and for the same reason: these bytes describe what a protection relay does. It is kept by emitting the original bytes of every line, which is what carries the INI tail, the LN records and the occasional line that is not text at all. Line endings are stored per line and never per file: the reference export mixes 101,289 CRLF with 3,381 bare LF, and a serializer that picks one rewrites 3,381 lines nobody touched.

Measured on that export, a T60's 6.28 MB and 128,867 lines: 16,111 settings over 1,051 names, all six setting groups, 1,024 FlexLogic entries, 542 LN records. Parsed in 109 ms.

What this does not do

It does not write an edited file. The header ends in a 40-character token that is very probably a checksum over the file. What it covers is unknown, so it is carried verbatim and never recomputed, and no write is offered that might produce a file UR Setup refuses. Settling that needs one experiment in EnerVista: change a byte, reopen.

It does not read IEC 61850. A GE UR's .icd and .cid are ordinary SCL, and SELlib's scl module reads them today with no GE-specific code — a T60's .cid gives up its IEDs, its GSE control blocks with MAC and APPID, and its data model. A second reader for one standard format would be two things to keep right instead of one.

Install

pip install GEiedlib

Three names, and the reason is worth one line: the repository is GElib, the import is gelib, and the distribution on PyPI is GEiedlib -- because GElib is taken there by an unrelated project (a group equivariant neural network library) and the match is exact.

Status

Alpha. The reader is complete and proven against a real 6.3 MB export; there is no writer, and the section above says why.

Licence

AGPL-3.0-or-later.

Metadata

Release files for GEiedlib 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for GEiedlib 0.1.0
File Size Uploaded Provenance Actions
geiedlib-0.1.0.tar.gz 21.7 kB With provenance Details for geiedlib-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for GEiedlib 0.1.0
File Interpreter ABI Platform Actions
geiedlib-0.1.0-py3-none-any.whl Python 3 none any Details for geiedlib-0.1.0-py3-none-any.whl

Total release size: 42.1 kB

Release files / geiedlib-0.1.0.tar.gz

Download URL geiedlib-0.1.0.tar.gz
Size 21.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e874aa2bc3a9027ee25a6fe2bf0948b47dc3dac6744a4f0f6a8dd4176db35703
BLAKE2b-256 checksum
How to use checksums
b5831cc95d964571ce6af3c7bdca506c6b4939e4615c9039f4fa9431069b6995
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 Sep 5, 2026.

Transparency log

Release files / geiedlib-0.1.0-py3-none-any.whl

Download URL geiedlib-0.1.0-py3-none-any.whl
Size 20.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a45e4739a29c842958c501018faa2c43deec6aa9070cd37100d1ee21485f8be4
BLAKE2b-256 checksum
How to use checksums
b986fe7b9af4151ee8284eccff18925dafaeb9fd3e9c14d3b8a05a3463d7fd11
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 Sep 5, 2026.

Transparency log

Security for GEiedlib 0.1.0

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for geiedlib-0.1.0.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 Sep 5, 2026.

Transparency log

A 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page