Skip to main content

Pytest • Upload to PyPi • deploy-docs • PyPI - Downloads • GitHub issues • License • PyPI Downloads

PyDSS

PyDSS is a high-level Python interface for OpenDSS that extends its organizational, analytical, and co-simulation capabilities. It is built on top of OpenDSSDirect.py.

Documentation: https://natlabrockies.github.io/PyDSS/

Key Features

  • Custom Control Algorithms — Define Python-based controllers for any circuit element, executed at each simulation time step. 13 built-in controllers are included (PV, storage, motor stall, fault, transformer, thermostat, and more).
  • HELICS Co-simulation — Integrate with external simulators via the HELICS framework for cyber-physical co-simulation studies.
  • Scenario Management — Run multiple scenarios on a shared OpenDSS model with independent controllers, exports, and post-processing.
  • Flexible Data Export — Export results to HDF5 or CSV with per-element filtering, regex-based selection, moving averages, and group aggregation.
  • Automated Reports — Generate reports for voltage metrics, thermal metrics, PV clipping/curtailment, capacitor switching, tap changes, and feeder losses.
  • Monte Carlo Studies — Built-in support for running Monte Carlo simulations with profile management.
  • Extension Architecture — Plugin system for custom controllers, post-processing scripts, and report types.

Installation

Install in a conda virtual environment (recommended):

conda create -n pydss python=3.11
conda activate pydss
pip install NREL-pydss

Quick Start

# Create a project with two scenarios
pydss create-project --project=my-project --scenarios="scenario1,scenario2" --path=./projects

# Copy your OpenDSS files into projects/my-project/DSSfiles/
# Set dss_file in projects/my-project/simulation.toml

# Run all scenarios
pydss run ./projects/my-project

Python API

from pydss.pydss_project import PyDssProject

# Run a project
PyDssProject.run_project("./projects/my-project")

# Access results
from pydss.pydss_results import PyDssResults
results = PyDssResults("./projects/my-project")
scenario = results.scenarios[0]
df = scenario.get_dataframe("Lines", "Currents", "Line.pvl_112")

CLI Commands

Command Description
pydss create-project Create a new project with scenarios
pydss run Run all scenarios in a project
pydss export Convert HDF5 results to CSV
pydss controllers Manage the controller registry
pydss edit-scenario Modify scenario configuration
pydss reports Generate analysis reports

Run pydss --help for full usage details.

License

BSD 3-Clause. See LICENSE for details.

Metadata

Release files for NREL-pydss 3.1.10

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

Source distribution (sdist)

Source distribution for NREL-pydss 3.1.10
File Size Uploaded
nrel_pydss-3.1.10.tar.gz 178.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for NREL-pydss 3.1.10
File Interpreter ABI Platform
nrel_pydss-3.1.10-py3-none-any.whl Python 3 none any Details

Total release size: 418.3 kB

Release files / nrel_pydss-3.1.10.tar.gz

Download URL nrel_pydss-3.1.10.tar.gz
Size 178.5 kB
Tags Source
SHA-256 checksum
How to use checksums
43d03089285a1c0253aa4c9682abc68078e8c8a3fd89078b0beb630d27b04b08
BLAKE2b-256 checksum
How to use checksums
140b0e76389dc452d44ca823ee8c54a1dd610fc6eea7a2f1b3dd72d40c13de74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / nrel_pydss-3.1.10-py3-none-any.whl

Download URL nrel_pydss-3.1.10-py3-none-any.whl
Size 239.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d0214d47c7aef5ae960ec53c985d6974df9723590be1e2dae39c14e7a3f9c030
BLAKE2b-256 checksum
How to use checksums
dd1cefb00a05196fde0a2aaf7d81c0af19e22fca4f86672a9aa5b62edaab2ee0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release history Release notifications | RSS feed

This release

3.1.10 This release

2 release files

3.1.7

2 release files

3.1.6

2 release files

3.1.5

2 release files

3.1.4

2 release files

3.1.3

2 release files

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