SELlib
Read and write the file formats an SEL protective relay project is made of — the ones AcSELerator QuickSet produces.
Nothing here talks to a relay, opens a socket, or knows what a web request is.
Renamed. This library was published as
selfilesfor 1.x. From 2.0.0 it isSELlib, and the import moved with it —import sellib, notimport selfiles. Nothing else changed in 2.0.0; the major is the rename.selfiles1.1.1 stays on PyPI and is not maintained.
import sellib
from sellib.rdb import process_upload
from sellib.dnp_map import parse, discover
sellib.configure(user_data_dir="~/.pacct/data", cache_dir="/var/cache/rdb")
info = process_upload(open("substation.rdb", "rb").read(), "substation.rdb")
for relay in info.relays:
print(relay.name, relay.model, relay.ip)
| module | what it reads |
|---|---|
sellib.rdb, .rdb_cache |
the RDB (an OLE compound database): relays, models, addresses, extracted into a content-addressed cache |
sellib.settings |
SET_*.TXT relay settings |
sellib.dnp_map |
SET_D<n>.TXT, the DNP3 point map |
sellib.gle |
QuickSet logic diagrams — parse, and render a page to SVG |
sellib.selogic |
SELOGIC equations: parse, compare by equivalence, normalise settings |
sellib.models |
per-model registries: block conventions, and valid Relay Word names |
sellib.scl |
IEC 61850 SCL/SCD: IEDs, GOOSE, VLANs, ExtRefs, functional constraints, SEL sAddr |
sellib.match |
cross-match an RDB's relays against an SCD's IEDs |
sellib.dnp_profile |
SEL DNP3 device profile bundles |
The one contract to know about
sellib.dnp_map guarantees parse(b).serialize() == b, byte for byte, for
every SET_D in the reference corpus. These bytes go back into a protection
relay: a settings file that round-trips imperfectly is a relay that behaves in
a way nobody asked for. The 0x1C field separator lives inside the line,
before the CRLF, and is preserved literally, along with each model's own
index padding (BI_1 on a 411L, BI_00 on a 751).
Writing a Compound File back out — needed whenever an edit grows a stream — is
cfbwrite, a separate library.
Data
The per-model registries ship with the package. configure(user_data_dir=...)
adds an overlay searched first, per model, so a host can add a relay model
at runtime without shipping a new release and without repeating the rest.
Install
pip install sellib
Python 3.10+. Extracted from PAC CT, where all of it is exercised against a real substation corpus.
Licence
AGPL-3.0-or-later — see LICENSE.
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 sellib-2.0.0.tar.gz.
File metadata
- Download URL: sellib-2.0.0.tar.gz
- Upload date:
- Size: 293.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57b29848dd8f040b705001e40a9cb0fc8453a692fd87b0534fd75136feb08de9
|
|
| MD5 |
79d45490e5fabe3c811e139a55d11a91
|
|
| BLAKE2b-256 |
bed88ef78ff13b3091558e610b8a9a57e1986cecd63c0dafe3528a5c402a3c42
|
Provenance
The following attestation bundles were made for sellib-2.0.0.tar.gz:
Publisher:
release.yml on GuilhermeMarini/sellib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sellib-2.0.0.tar.gz -
Subject digest:
57b29848dd8f040b705001e40a9cb0fc8453a692fd87b0534fd75136feb08de9 - Sigstore transparency entry: 2719344526
- Sigstore integration time:
-
Permalink:
GuilhermeMarini/sellib@84dda709cb20f464408951b59f20978c94be709c -
Branch / Tag:
refs/tags/v2.0.0 - Owner: https://github.com/GuilhermeMarini
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@84dda709cb20f464408951b59f20978c94be709c -
Trigger Event:
push
-
Statement type:
File details
Details for the file sellib-2.0.0-py3-none-any.whl.
File metadata
- Download URL: sellib-2.0.0-py3-none-any.whl
- Upload date:
- Size: 276.2 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 |
21c95ff9869b26b55492b6bab9589fbcd6d8262c89050f6f701a92fb2c350c82
|
|
| MD5 |
db1fa266787c46888c4a18299f39bc76
|
|
| BLAKE2b-256 |
78fa8282e9afcd07aa4470992edc122dd74dbb191bdfc83289537fdd5b2b3bb0
|
Provenance
The following attestation bundles were made for sellib-2.0.0-py3-none-any.whl:
Publisher:
release.yml on GuilhermeMarini/sellib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sellib-2.0.0-py3-none-any.whl -
Subject digest:
21c95ff9869b26b55492b6bab9589fbcd6d8262c89050f6f701a92fb2c350c82 - Sigstore transparency entry: 2719344928
- Sigstore integration time:
-
Permalink:
GuilhermeMarini/sellib@84dda709cb20f464408951b59f20978c94be709c -
Branch / Tag:
refs/tags/v2.0.0 - Owner: https://github.com/GuilhermeMarini
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@84dda709cb20f464408951b59f20978c94be709c -
Trigger Event:
push
-
Statement type: