Skip to main content

No project description provided

Project description

About:

  • Parses CIM RDF/XML data to pandas dataframe with 4 columns [ID, KEY, VALUE, INSTANCE_ID] (triplestore like)
  • The solution does not care about CIM version nor namespaces
  • Input files can be xml or zip files (containing one or mutiple xml files)
  • All files are parsed into one and same Pandas DataFrame, thus if you want single file or single data model, you need to filter on INSTANCE_ID column

Documentation:

https://haigutus.github.io/triplets

To get started:

python -m pip install triplets
import pandas
import triplets

path = "CGMES_v2.4.15_RealGridTestConfiguration_v2.zip"
data = pandas.read_RDF([path])

Result:

image

You can then query a dataframe of all same type elements and its parameters across all [EQ, SSH, TP, SV etc.] instance files, where parameters are columns and index is object ID-s

data.type_tableview("ACLineSegment")

image

Export:

data.export_to_cimxml(
    rdf_map=schemas.ENTSOE_CGMES_2_4_15_552_ED1,
    export_type=ExportType.XML_PER_INSTANCE_ZIP_PER_XML,
)

Look into examples folders for more

Parser engines

Three parser engines with automatic fallback (fastest available):

Engine Requires Speed
python_lxml_pandas lxml + pandas (core) 1x baseline, always works
python_lxml_arrow + pyarrow (pip install triplets[arrow]) ~1x, better interop
cython_pugixml_arrow + C++ build 9.8x
import pandas
import polars
import triplets  # registers pandas.read_RDF, polars.read_rdf etc.

# default (auto: best available engine)
data = pandas.read_RDF(["grid_EQ.xml", "data.zip"])

# explicit engine selection
data = pandas.read_RDF(path, engine="python_lxml_pandas")        # no pyarrow needed
data = pandas.read_RDF(path, engine="python_lxml_arrow")         # arrow intermediate
data = pandas.read_RDF(path, engine="cython_pugixml_arrow")      # fastest

# polars
data = polars.read_rdf(["grid_EQ.xml"], return_type="polars")

# return Arrow directly
table = triplets.parser.parse(path, return_type="arrow")

# direct API call (same as read_RDF)
data = triplets.parser.parse(["f.xml"], engine="python_lxml_pandas")

To build the performance engine (no system C++ deps needed):

pixi install -e build
pixi run build-cython-pugixml-arrow

See pixi.toml for build environment and tests/test_parser_backends.py for usage. See docs/parsers.md for the full call sequence and architecture.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

triplets-0.1.0rc1.tar.gz (2.2 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

triplets-0.1.0rc1-cp313-cp313-win_amd64.whl (2.0 MB view details)

Uploaded CPython 3.13Windows x86-64

triplets-0.1.0rc1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

triplets-0.1.0rc1-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (3.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.24+ ARM64manylinux: glibc 2.28+ ARM64

triplets-0.1.0rc1-cp313-cp313-macosx_11_0_arm64.whl (1.9 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

triplets-0.1.0rc1-cp312-cp312-win_amd64.whl (2.0 MB view details)

Uploaded CPython 3.12Windows x86-64

triplets-0.1.0rc1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

triplets-0.1.0rc1-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (3.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.24+ ARM64manylinux: glibc 2.28+ ARM64

triplets-0.1.0rc1-cp312-cp312-macosx_11_0_arm64.whl (1.9 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

triplets-0.1.0rc1-cp311-cp311-win_amd64.whl (2.0 MB view details)

Uploaded CPython 3.11Windows x86-64

triplets-0.1.0rc1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

triplets-0.1.0rc1-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (3.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.24+ ARM64manylinux: glibc 2.28+ ARM64

triplets-0.1.0rc1-cp311-cp311-macosx_11_0_arm64.whl (1.9 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

File details

Details for the file triplets-0.1.0rc1.tar.gz.

File metadata

  • Download URL: triplets-0.1.0rc1.tar.gz
  • Upload date:
  • Size: 2.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for triplets-0.1.0rc1.tar.gz
Algorithm Hash digest
SHA256 442c46e590c8731a2b7b6cd1b196744e16e6f738a08ebb97b29af60b4199b391
MD5 1ce833fa90497e7d7d2698834c12a1e3
BLAKE2b-256 43b41e31927ce377c43adcff54143a0216c8b3fee5ee68fbda0fe3919f760215

See more details on using hashes here.

Provenance

The following attestation bundles were made for triplets-0.1.0rc1.tar.gz:

Publisher: build-wheels.yml on Haigutus/triplets

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file triplets-0.1.0rc1-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for triplets-0.1.0rc1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 e7d19f3805aca4968ad8f1625bceacb5c38deba18d172d484685ba3bd877db81
MD5 a3208d67f10ded5759edd68c23bfd954
BLAKE2b-256 69b9179e2063783ad03de6bded6068361b7b34a21a8a7f7297fb1aee46ce1153

See more details on using hashes here.

Provenance

The following attestation bundles were made for triplets-0.1.0rc1-cp313-cp313-win_amd64.whl:

Publisher: build-wheels.yml on Haigutus/triplets

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file triplets-0.1.0rc1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for triplets-0.1.0rc1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 859111424fae6ca58593f75c4c622cfb9c3856c7379ff34fc8c7ba4fcfe5cc9b
MD5 d397378132d78257fd81061feb4afcfe
BLAKE2b-256 bd82cf9dfa577c96243dea1194acc74386db559834a32cfbff0da3a00df2387d

See more details on using hashes here.

Provenance

The following attestation bundles were made for triplets-0.1.0rc1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build-wheels.yml on Haigutus/triplets

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file triplets-0.1.0rc1-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for triplets-0.1.0rc1-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 1e55f08f613ca1c74647f5473b7a648af81ef92b64fdb085f66e7a40675963ce
MD5 e7ea297cc71f63c4ba63f72d25b49661
BLAKE2b-256 facf5b4f3c9d25975c43b66dcb7b79e3bc5a5774bbb164d46adc76038366c864

See more details on using hashes here.

Provenance

The following attestation bundles were made for triplets-0.1.0rc1-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl:

Publisher: build-wheels.yml on Haigutus/triplets

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file triplets-0.1.0rc1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for triplets-0.1.0rc1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6e4ea9466e8dddeea582f1e778252ff40701b0c3092bad129f452580c0a6d04a
MD5 d07968db657717763466e9d458d7bdad
BLAKE2b-256 9fb18b3ccbc2cf8d4e337361d7dbcb7733b675db4f0e72aeb885d5c33e820e96

See more details on using hashes here.

Provenance

The following attestation bundles were made for triplets-0.1.0rc1-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: build-wheels.yml on Haigutus/triplets

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file triplets-0.1.0rc1-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for triplets-0.1.0rc1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 f4e79b92e806964c69bd496efcbb62859eba7680c6ed831b34035b0d7781846e
MD5 09c2ccb89539704eaf61a6c9ff5a90fc
BLAKE2b-256 7639c961fea807691955977c5c90cbba0f45c1d8056f3d76084da9aa743a8246

See more details on using hashes here.

Provenance

The following attestation bundles were made for triplets-0.1.0rc1-cp312-cp312-win_amd64.whl:

Publisher: build-wheels.yml on Haigutus/triplets

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file triplets-0.1.0rc1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for triplets-0.1.0rc1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1b848d55d9b7d7e18686674e232d1daa54edde7ee6ef2a8796be404d2cd73fc6
MD5 74132e4a5ea59e07cb7a2a3d7a1240d7
BLAKE2b-256 2d94db5dccb34a5f70151dd2bd22fff978b4410b479d36a1c8ffb1b0bc9d438a

See more details on using hashes here.

Provenance

The following attestation bundles were made for triplets-0.1.0rc1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build-wheels.yml on Haigutus/triplets

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file triplets-0.1.0rc1-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for triplets-0.1.0rc1-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 0b25d2d830b10d2fd24f69c9e01745729bfda489176f4d956595bed13136f99f
MD5 189d57bf86bf821cd64d8288c7049376
BLAKE2b-256 98a05155cb8af8fd0b36228e5f342e220829b0c2e1e7e05b291468f4c65cc55d

See more details on using hashes here.

Provenance

The following attestation bundles were made for triplets-0.1.0rc1-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl:

Publisher: build-wheels.yml on Haigutus/triplets

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file triplets-0.1.0rc1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for triplets-0.1.0rc1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1c4e9827f7dca3f74ba0bb13e7951b99a5f3d04f1d703dc0127dbc1ead1127fc
MD5 6776fe0c491dba592961d02160d1369e
BLAKE2b-256 81ba3570d51c4c3cf3429132156e490a140ab78123792ad81be25756ac4adb1e

See more details on using hashes here.

Provenance

The following attestation bundles were made for triplets-0.1.0rc1-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: build-wheels.yml on Haigutus/triplets

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file triplets-0.1.0rc1-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for triplets-0.1.0rc1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 be42cc0b8e77dab1b9173f399a02660b4e6a747d913e92051f1b95953c44fee2
MD5 632f881573fad7f8066dce7137b42236
BLAKE2b-256 e87491530e2d30be37f2de9a5bd71caa282993cd54665a937f44b7e287de4e10

See more details on using hashes here.

Provenance

The following attestation bundles were made for triplets-0.1.0rc1-cp311-cp311-win_amd64.whl:

Publisher: build-wheels.yml on Haigutus/triplets

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file triplets-0.1.0rc1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for triplets-0.1.0rc1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c42359a6163b1d72197e65e892b306adc5e97c0cd4fa418808422196e3617fe7
MD5 b3e60c121c1917c42472ebec9a547708
BLAKE2b-256 f9ff2968a0d2e2e427a675a2e06092d427d0be550f7617bf450ba21db353a86e

See more details on using hashes here.

Provenance

The following attestation bundles were made for triplets-0.1.0rc1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build-wheels.yml on Haigutus/triplets

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file triplets-0.1.0rc1-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for triplets-0.1.0rc1-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 9e2dc73c83cea103c50474de95dae976dccd740585107f6a8cd338dcf4663b4a
MD5 1b59f3cbf3cb80182fd9c846501c2feb
BLAKE2b-256 756359bfe85ecd40efa9a9b1eb6795084b997696be96b7029ecca7362eacb968

See more details on using hashes here.

Provenance

The following attestation bundles were made for triplets-0.1.0rc1-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl:

Publisher: build-wheels.yml on Haigutus/triplets

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file triplets-0.1.0rc1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for triplets-0.1.0rc1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8e509dc2da5f4c5781d5b81e2826da3e2943ab35cfece023c4523dd2ff2911b4
MD5 732ec16653fb89cf3048eed12b9053fa
BLAKE2b-256 d339584abba94500c91869cf6a1080eaaa251738456d684d8128483e55128f4b

See more details on using hashes here.

Provenance

The following attestation bundles were made for triplets-0.1.0rc1-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: build-wheels.yml on Haigutus/triplets

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page