Skip to main content
Pre-release

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

cimhub-opendss

OpenDSS converter for CIMHub: OpenDSS .dss decks to and from CIM (cim18v17). DssReader parses a deck into native records. DssImporter maps them to .cimtbl text (one file per DSS class, values copied verbatim in the deck's units), and cimtables builds the CIM model from that text. DssExporter reads a CIM model through the cimhub-core getters and DssWriter writes a deck that DssReader and the importer read back.

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

Python 3.11 or later.

Quickstart

from cimhub_opendss import DssReader, cim_to_dss, dss_to_cim

# IEEE13Nodeckt.dss and IEEELineCodes.dss: cimhub_opendss/tests/decks/IEEE/IEEE13_original/ in the repository
network = dss_to_cim(DssReader("IEEE13Nodeckt.dss").read_all(), name="IEEE13", artifact_dir="ieee13_cimtbl")
cim_to_dss(network, "ieee13_export.dss")
  • dss_to_cim(model, *, name, authority=..., length_unit=None, device_geometry="point", network=None, artifact_dir=None, time_points=None) returns the CIM network. name is the model name and the master file stem. Without artifact_dir the .cimtbl files go to a temporary directory that is removed after loading. length_unit is the per-length unit of impedances that give no units: a LineCode with none on the code or its lines, and a line's own inline values with none on the line. It replaces the magnitude guess; a code or line with its own units keeps them. device_geometry draws a two-terminal device's coordinates as a "point" midway between its buses or a "linestring" from bus to bus. time_points is a dict that receives the yearly shapes' time points (loads' and devices'); without it they are dropped with a warning.
  • cim_to_dss(network, destination, *, per_class=False, time_points=None, **opts) writes the deck. per_class=True writes one file per DSS class beside the master, which Redirects them; time_points is the dict of time point tables the yearly shapes are read from. opts go to DssExporter.to_model: name_source ('name', 'mrid' or 'uri'; default $CIMHUB_NAME_SOURCE, else 'mrid'), circuit_source, the EnergySource to write as New Circuit when the model has several, and switch_state ('actual', the default, or 'normal').

What is supported

DSS class Import Export
Circuit / Vsource yes yes
Line (matrix, sequence and geometry impedance), LineCode, LineGeometry, LineSpacing, WireData, CNData, TSData yes yes
Switches (Line with Switch=y, Fuse, Recloser, SwtControl) yes yes
Transformer, XfmrCode, RegControl yes yes
Load, LoadShape (yearly), Capacitor, CapControl yes yes
PVSystem, Storage, Generator yes yes
Reactor yes yes
Bus coordinates yes yes

The master .cimtbl lists, in a comment, every DSS class in the deck that no mapper reads yet, with its record count. The exporter raises, naming the classes and counts, when the CIM model holds conducting equipment of a class it does not export. Unknown fields, unmapped enumerations and unresolved references raise on import. A deck without a New Circuit, or with a second one, raises.

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_opendss 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_opendss 2.1.0a2
File Size Uploaded Provenance Actions
cimhub_opendss-2.1.0a2.tar.gz 410.8 kB Without provenance Details for cimhub_opendss-2.1.0a2.tar.gz

Built distribution (wheel)

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

Total release size: 814.4 kB

Release files / cimhub_opendss-2.1.0a2.tar.gz

Download URL cimhub_opendss-2.1.0a2.tar.gz
Size 410.8 kB
Tags Source
SHA-256 checksum
How to use checksums
7997270fc4ee3a06cbef4409c8dea9865dc32d0f10d2930424f2d0685e7106f9
BLAKE2b-256 checksum
How to use checksums
aa9c78db7c58bcc0e7a9e48bfc0ddc74f6b049e02e2d43ca2bdc352c093ddbb6
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_opendss-2.1.0a2-py3-none-any.whl

Download URL cimhub_opendss-2.1.0a2-py3-none-any.whl
Size 403.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
74662b7ac440325c3d66c6dbd2a29cf4d6efa89d2be93a7efe08cf2553363ae3
BLAKE2b-256 checksum
How to use checksums
3219feae3e40f1fe75f8193763b5a0cad0419933f4364dfb6e06fbd9f59d1f3f
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_opendss 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