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.0a3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cimhub_core-2.1.0a3.tar.gz | 149.2 kB | Without provenance | Details for cimhub_core-2.1.0a3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cimhub_core-2.1.0a3-py3-none-any.whl | Python 3 | none | any | Details for cimhub_core-2.1.0a3-py3-none-any.whl |
Total release size: 273.7 kB
Release files / cimhub_core-2.1.0a3.tar.gz
| Download URL | cimhub_core-2.1.0a3.tar.gz |
|---|---|
| Size | 149.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d874c59a9fcd51ab90e6e9762893f0cd6056b9f9ca23e6d1de1b3e58a2a16ffc
|
|
BLAKE2b-256 checksum How to use checksums |
4744a32d59f7df1847a661a4e48aec7f171741f23f86e4516523f2d3b8b11756
|
| 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.0a3-py3-none-any.whl
| Download URL | cimhub_core-2.1.0a3-py3-none-any.whl |
|---|---|
| Size | 124.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f490f7376c7cd0115144e0e771ddc2ef05098cc8e6290c90b99a74313b10ed08
|
|
BLAKE2b-256 checksum How to use checksums |
13f0ac83439b2164bc7cc8e34c1e3a8e2206ddbd221a5abcabbc4b1680038901
|
| 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.0a3
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.