Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

cimhub-core

The shared layer of CIMHub, which converts power-system model formats to and from CIM (cim18v17 only). Core holds only what the format packages share and no upstream library provides: the .cimtbl import contract (CimtblImporter), the abstract reader, writer, importer and exporter classes, a typed store for native records (GraphModel), the export getters (cimhub_core.getters), canonical .cimtbl table shapes (cimhub_core/shapes/), derived-value helpers (cimhub_core.derived) and a test harness (cimhub_core.cimtbl_testing). You install it as a dependency of a format package; install it directly to write a new one.

pip install --pre cimhub-core

Python 3.11 or later.

Quickstart

Getters read one CIM concept and return plain floats in the unit you ask for. This example imports an OpenDSS deck (needs cimhub-opendss) and reads a load's power in kW and kVAr.

import cimprofiles.cim18.cim18v17 as cim

from cimhub_core.getters.load import get_phase_loads
from cimhub_opendss import DssReader, dss_to_cim

deck = "IEEE13Nodeckt.dss"   # copy the files in cimhub_opendss/tests/decks/IEEE/IEEE13_original/ next to it
network = dss_to_cim(DssReader(deck).read_all(), name="IEEE13")
consumer = next(iter(network.graph[cim.EnergyConsumer].values()))
print(consumer.name, get_phase_loads(consumer, "kW", "kVAr").total)   # 611 PhasePower(p=170.0, q=80.0)

What core provides

Module Purpose
cimhub_core.base FormatReader, FormatWriter, FormatImporter, CimtblImporter, FormatExporter
cimhub_core.graph_model GraphModel: indexed store for native LinkML dataclasses
cimhub_core.cimtbl mapper helpers: Field, fill_defaults, check_fields, fields_table, cimtbl_to_cim
cimhub_core.getters one getter per CIM concept (terminals, load, switch state, line impedance, tap changer, ...)
cimhub_core.names export naming: name, mrid or uri, chosen by argument or CIMHUB_NAME_SOURCE
cimhub_core.cimtbl_testing cim_scope, assert_matches_golden; CIMHUB_UPDATE_GOLDENS=1 regenerates goldens
cimhub_core.scaffold scaffold_package: generate a new format package
cimhub_core.time_points the Parquet sidecar of nc_schedule time points beside the CIM XML (write_time_points, read_time_points, rows_by_schedule); install cimhub-core[time-points]

Topology (spanning trees, islands, voltage zones) comes from cimtopology, not from core.

Documentation

BSD 3-Clause. Source and issues: https://github.com/PNNL-CIM-Tools/CIMHub.

License and attribution

BSD 3-Clause. See LICENSE. Contributors are listed in AUTHORS.

This software was created under a project sponsored by the U.S. Department of Energy's Office of Electricity, an agency of the United States Government. Neither the United States Government nor the United States Department of Energy, nor Battelle, nor any of their employees, nor any jurisdiction or organization that has cooperated in the development of these materials, makes any warranty, express or implied, or assumes any legal liability or responsibility for the accuracy, completeness, or usefulness or any information, apparatus, product, software, or process disclosed, or represents that its use would not infringe privately owned rights.

PACIFIC NORTHWEST NATIONAL LABORATORY
operated by BATTELLE
for the UNITED STATES DEPARTMENT OF ENERGY
under Contract DE-AC05-76RL01830

Metadata

Release files for cimhub_core 2.1.0a1

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

Source distribution (sdist)

Source distribution for cimhub_core 2.1.0a1
File Size Uploaded Provenance Actions
cimhub_core-2.1.0a1.tar.gz 136.3 kB Without provenance Details for cimhub_core-2.1.0a1.tar.gz

Built distribution (wheel)

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

Total release size: 255.1 kB

Release files / cimhub_core-2.1.0a1.tar.gz

Download URL cimhub_core-2.1.0a1.tar.gz
Size 136.3 kB
Tags Source
SHA-256 checksum
How to use checksums
af69954bc27ae17141ba73f8ee362bbbb90bc4e3c8034e00e92bc116d37fe5c3
BLAKE2b-256 checksum
How to use checksums
0bc8cea1eeb7a95bc4378abf73b44ee40a5e91c2da2fc1256eb0d707df0ee4a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / cimhub_core-2.1.0a1-py3-none-any.whl

Download URL cimhub_core-2.1.0a1-py3-none-any.whl
Size 118.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
17975118be5d4c2e1085ac891d801498c8c6accc0bb7215faf077f5287800daf
BLAKE2b-256 checksum
How to use checksums
b54e36b8ef1abc8a53ffec3cd27f451224a2e1777b027ec1ab70b3428c84fba0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for cimhub_core 2.1.0a1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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