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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 geiedlib-0.1.0.tar.gz.
File metadata
- Download URL: geiedlib-0.1.0.tar.gz
- Upload date:
- Size: 21.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e874aa2bc3a9027ee25a6fe2bf0948b47dc3dac6744a4f0f6a8dd4176db35703
|
|
| MD5 |
105bc77e3129dc6ce5b59e15d7f69210
|
|
| BLAKE2b-256 |
b5831cc95d964571ce6af3c7bdca506c6b4939e4615c9039f4fa9431069b6995
|
Provenance
The following attestation bundles were made for geiedlib-0.1.0.tar.gz:
Publisher:
release.yml on GuilhermeMarini/GElib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
geiedlib-0.1.0.tar.gz -
Subject digest:
e874aa2bc3a9027ee25a6fe2bf0948b47dc3dac6744a4f0f6a8dd4176db35703 - Sigstore transparency entry: 2720092182
- Sigstore integration time:
-
Permalink:
GuilhermeMarini/GElib@0eb44740980319565a98ab33494880e2cc34136b -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/GuilhermeMarini
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0eb44740980319565a98ab33494880e2cc34136b -
Trigger Event:
push
-
Statement type:
File details
Details for the file geiedlib-0.1.0-py3-none-any.whl.
File metadata
- Download URL: geiedlib-0.1.0-py3-none-any.whl
- Upload date:
- Size: 20.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a45e4739a29c842958c501018faa2c43deec6aa9070cd37100d1ee21485f8be4
|
|
| MD5 |
6307ea7477b7632aac399af2db41e329
|
|
| BLAKE2b-256 |
b986fe7b9af4151ee8284eccff18925dafaeb9fd3e9c14d3b8a05a3463d7fd11
|
Provenance
The following attestation bundles were made for geiedlib-0.1.0-py3-none-any.whl:
Publisher:
release.yml on GuilhermeMarini/GElib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
geiedlib-0.1.0-py3-none-any.whl -
Subject digest:
a45e4739a29c842958c501018faa2c43deec6aa9070cd37100d1ee21485f8be4 - Sigstore transparency entry: 2720092655
- Sigstore integration time:
-
Permalink:
GuilhermeMarini/GElib@0eb44740980319565a98ab33494880e2cc34136b -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/GuilhermeMarini
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0eb44740980319565a98ab33494880e2cc34136b -
Trigger Event:
push
-
Statement type: