Skip to main content
Pre-release

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

cimhub-raw

PSS/E RAW v34 importer and exporter for CIMHub: RAW cases to and from CIM (cim18v17). Raw34Reader parses a case into native records. RawImporter maps them to .cimtbl text (one file per RAW table, values copied verbatim in the case's units), and cimtables builds the CIM model from that text. RawExporter reads a CIM network through the core getters and returns RAW records, which Raw34Writer writes as a .raw file (cim_to_raw(network, path) does both).

pip install --pre cimhub-raw      # also installs cimhub-core

Python 3.11 or later. Version 2.1 is in alpha.

Quickstart

import cimprofiles.cim18.cim18v17 as cim

from cimhub_raw.importer.raw_to_cimtbl import raw_to_cim
from cimhub_raw.raw34_reader import Raw34Reader
from cimhub_raw.raw34_writer import Raw34Writer

# IEEE_14_bus.raw: cimhub_raw/tests/cases/IEEE14/ in the repository
model = Raw34Reader("IEEE_14_bus.raw").read_all()
network = raw_to_cim(model, name="IEEE14", artifact_dir="ieee14_cimtbl")
print(len(network.graph[cim.TopologicalNode]), "buses")   # 14 buses
Raw34Writer().write(model, "ieee14_copy.raw")

from cimhub_raw.exporter.cim_to_raw import cim_to_raw
cim_to_raw(network, "ieee14_from_cim.raw")                # CIM back to RAW

raw_to_cim(model, *, name, authority=..., network=None, artifact_dir=None) returns the CIM network. Without artifact_dir the .cimtbl files go to a temporary directory. name is the model name and the master file stem.

What is supported

RAW data Import
Case identification, system-wide data, zones, areas, interarea transfers, owners yes (owners are untranscribed: CIM has no home for them)
Buses, substations and node-breaker data (nodes, switching devices, equipment terminals) yes
Branches, system switching devices, multi-section lines yes
Loads, fixed shunts, switched shunts yes
Generators (including renewable models and implicit step-up transformers) yes
Two- and three-winding transformers, phase shifters, impedance correction tables yes
Two-terminal DC lines, VSC DC lines, FACTS devices yes
Multi-terminal DC lines, GNE devices, induction machines raise NotImplementedError when the case has any

Raw34Writer raises for a multi-terminal DC or GNE section; induction machines are read and written, and only the importer raises on them. Blank or missing fields take the schema's default and are listed on the row comment (# defaulted: ...).

The repository carries three public cases: IEEE 14 bus, IEEE 118 bus (with four node-breaker substations) and the WECC 240 bus case. Other cases are not distributed.

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_raw 2.1.0a2

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_raw 2.1.0a2
File Size Uploaded Provenance Actions
cimhub_raw-2.1.0a2.tar.gz 191.1 kB Without provenance Details for cimhub_raw-2.1.0a2.tar.gz

Built distribution (wheel)

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

Total release size: 395.4 kB

Release files / cimhub_raw-2.1.0a2.tar.gz

Download URL cimhub_raw-2.1.0a2.tar.gz
Size 191.1 kB
Tags Source
SHA-256 checksum
How to use checksums
83d9cb7ba13f2703115cb5eec9f4ec6a707549aa892f5edcf7d701346d8c7b0d
BLAKE2b-256 checksum
How to use checksums
31f6a98ad4376cefd91d30da6e5854e972a1005b219b2f0f32bbad9f325c39c4
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_raw-2.1.0a2-py3-none-any.whl

Download URL cimhub_raw-2.1.0a2-py3-none-any.whl
Size 204.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3c9521fd548ce5e45e1f17bc4addacf4be0a636a98482367920100ef5962342b
BLAKE2b-256 checksum
How to use checksums
f6d40e9631f9f872abfab05630a4ac308f83bc2213e0251f4098d69396b020b7
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_raw 2.1.0a2

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