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 schedule time points beside the CIM XML: nc_schedule EnergyConnectionTimePoints and the RegularTimePoints of any RegularIntervalSchedule (write_time_points, read_time_points, rows_by_schedule, regular_time_points, add_regular_time_points, add_device_time_points; a group schedule's points through getters.load_schedule.get_schedule_points, a device's through getters.device_schedule.get_device_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.0a4

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.0a4
File Size Uploaded Provenance Actions
cimhub_core-2.1.0a4.tar.gz 149.6 kB Without provenance Details for cimhub_core-2.1.0a4.tar.gz

Built distribution (wheel)

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

Total release size: 274.1 kB

Release files / cimhub_core-2.1.0a4.tar.gz

Download URL cimhub_core-2.1.0a4.tar.gz
Size 149.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a73b6989cf524586d8c3067a56e1cebe4c2c35ce06df9196c73d422488700262
BLAKE2b-256 checksum
How to use checksums
769095a327c74ae5da257ca727e1cf8bc29579a37d82d6aff303bbed37d2ca2e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","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.0a4-py3-none-any.whl

Download URL cimhub_core-2.1.0a4-py3-none-any.whl
Size 124.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
64570955f77355706eda7433b106711ec1f8d31f4925c911a995c08963020021
BLAKE2b-256 checksum
How to use checksums
2abc7d8bd12c5ba62f4a0923ee61b9fcff4fc326c1f3e4a08cd2171f31fd6440
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","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.0a4

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