Skip to main content

Siemenslib

Read what DIGSI writes into an SCL file beside the standard.

pip install siemenslib
from py61850.scl import SclDocument
from siemenslib import digsi

doc = SclDocument.parse("station.scd")      # parsed once, asked three times

for ied in digsi.read_ieds(doc):
    print(ied.name, ied.device, ied.digsi_name, ied.application_template)
# QPC2_TR1_AL11 7SJ85 AL11_UPC1 7SJ85_Non_Directional_OC
# QPC1_TR1_UPC1 7UT85 TR1_UPC1  7UT8x_2WindTransformer_Basic

for app in digsi.read_goose_applications(doc):
    print(app.name, app.app_id, app.ied_names)
# 138 kV  0001 ['QPC1_LT1_UPC1', 'QPC1_LT2_UPC1', ...]
# 34,5 kV 0002 ['QPC2_TR1_AL11', 'QPC2_TR1_AL12', ...]

Every reader also takes a plain path and parses a document for itself. Pass one SclDocument when you ask more than one question about the same file: on the 13.5 MB mixed-vendor reference station that is 400 ms instead of 917.

module what it reads
siemenslib.digsi the Siemens-* privates and the siedig namespace in an SCD/ICD: SIPROTEC product codes, application templates, DIGSI names and revisions, and the GOOSE applications

Why this exists

An SCD from the Siemens IEC 61850 System Configurator is ordinary SCL with a second layer folded into it. The reference station — 14 IEDs — carries 2,473 <Private type="Siemens-*"> elements, and no vendor-neutral reader looks at one of them. They hold what a commissioning engineer actually asks about a SIPROTEC: which device it is, which application template it was built from, what DIGSI calls it, and when it last changed.

The GOOSE applications are the part that earns the library. DIGSI groups datasets into named applications — "138 kV", "34,5 kV" — and the grouping is by GUID:

<Private type="Siemens_SiedigGooseApplicationStorage">    <!-- on <SCL> -->
  <siedig:GooseApplication name="138 kV">
    <siedig:DataSet guidRef="1f741f02..." />        <!-- an opaque hex string -->

<IED name="QPC1_TR1_UPC1"> … <LN0> <DataSet>
    <Private type="Siemens-GUID">1f741f02...</Private>    <!-- lives over here -->

Walking that link turns a list of hex strings into the IEDs that publish in each application. On the reference station all 14 datasets resolve, and the two applications split cleanly by voltage level.

What this does not do

It does not read the standard half of IEC 61850, and it parses no XML at all. An SCD's IEDs, GOOSE control blocks, addressing and data model are ordinary SCL, and py61850's scl package reads them for any vendor, as an IEC 61850-6 object model. A second reader for one standard format would be two things to keep right instead of one. This library is for what is Siemens' own, and it reads it off py61850's model nodes.

The seam that makes that possible is standard SCL, not an arrangement made for Siemens: Private elements hang off every node, keyed by type, and a vendor library reads its own. The sibling SELlib reads SEL's half of the very same files the same way — the mixed-vendor reference station is a DIGSI export containing SEL relays, and both libraries read it without sharing a line of code or opening it twice.

It does not write. Reading is what a commissioning job needs from these privates; nothing here modifies a project DIGSI owns.

Status

Alpha, and proven against two real stations: a 7 MB DIGSI export (14 IEDs, 2 GOOSE applications, 14 dataset GUIDs) and a 13.5 MB mixed-vendor one (14 IEDs, 14 applications, 113 GUIDs). Every field the previous XML-walking reader produced is reproduced exactly by the model-based one.

Licence

AGPL-3.0-or-later.

Metadata

Release files for siemenslib 0.2.1

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

Source distribution (sdist)

Source distribution for siemenslib 0.2.1
File Size Uploaded Provenance Actions
siemenslib-0.2.1.tar.gz 26.9 kB With provenance Details for siemenslib-0.2.1.tar.gz

Built distribution (wheel)

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

Total release size: 49.1 kB

Release files / siemenslib-0.2.1.tar.gz

Download URL siemenslib-0.2.1.tar.gz
Size 26.9 kB
Tags Source
SHA-256 checksum
How to use checksums
1b6f61af4ee0c539f45260c856a19ff080a14fc00b20c24229cb9e0b73bfd1bd
BLAKE2b-256 checksum
How to use checksums
338e0b1488ab2e0f1f79c79c3c46354f324d471345b5bf2736c230c7c98e9e08
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 8, 2026.

Transparency log

Release files / siemenslib-0.2.1-py3-none-any.whl

Download URL siemenslib-0.2.1-py3-none-any.whl
Size 22.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e650c8d7bee4e91a171deffc00d7c8db814b43f50520a10d151a82856df471ae
BLAKE2b-256 checksum
How to use checksums
84222d6b894a489311c6c77034344f2f262bb7825043136071b044bb0364ce58
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 8, 2026.

Transparency log

Security for siemenslib 0.2.1

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 siemenslib-0.2.1.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 8, 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.

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