Skip to main content

⚡ py-dss-toolkit: Advanced Python Tools for OpenDSS Powered by EPRI

PyPI Platform License Build Status PyPI Downloads

py-dss-toolkit is a Python package that builds on the capabilities of the py-dss-interface package to provide advanced functionalities for creating Python-OpenDSS solutions more efficiently. By combining the robust connection to OpenDSS provided by py-dss-interface with the feature-rich tools of py-dss-toolkit, users can streamline their workflows and gain powerful new capabilities for analyzing and manipulating OpenDSS models, simulations, and results.

Requires py-dss-interface (tested with 2.3.0). For more information about py-dss-interface, visit the GitHub repository.

🚨 Note: This project was previously known as py-dss-tools and the repository was named py_dss_tools. It has been renamed to avoid naming conflicts on PyPI.

📦 Installation

You can install py-dss-toolkit in two ways:

👤 User Installation

If you simply want to use the package:

pip install py-dss-toolkit

👨‍💻 Developer Installation

If you want to contribute or explore the source code:

git clone https://github.com/PauloRadatz/py_dss_toolkit.git
cd py_dss_toolkit
pip install -e .

📦 Quickstart Example

from py_dss_toolkit import CreateStudy

study = CreateStudy.snapshot("My Study", dss_file="path/to/model.dss")
study.run()
study.interactive_view.circuit_plot()

✨ Features

  • Retrieve, analyze, and visualize OpenDSS model data with ease.
  • Flexible simulation result access via dss_tools or structured workflows via CreateStudy.
  • Visualize circuit topology, voltage profiles, and time-series using DSSView, Plotly, or Matplotlib.
  • Extract Simulation results directly into pandas DataFrames.
  • Built on top of py-dss-interface.

🚀 What Can You Do With py-dss-toolkit?

🔍 1. Model Exploration and Manipulation

  • Access detailed model information via organized pandas DataFrames.
  • Modify models efficiently with built-in Pythonic tools.

📘 Example Notebook

📊 2. Exploring Simulation Results Capabilities

  • Retrieve SnapShot power flow results (voltages, currents, powers) via organized pandas DataFrames.
  • Extract QSTS simulation data including meters and monitors.

📘 Snapshot Results 📘 QSTS Results

📈 3. Visualize Simulation Results

py-dss-toolkit supports multiple methods to visualize:

  • Circuit topology
  • Voltage profiles
  • Time-series results

All three can be visualized using:

  • 🖥️ DSSView.exe — the native visualization tool for OpenDSS.
  • 🔍 Plotly (interactive) — browser-based interactive plots.
  • 🧾 Matplotlib (static) — publication-ready static charts.

📘 Circuit Interactive View 📘 Voltage Profile DSS View 📘 Voltage Profile Interactive View 📘 Voltage Profile Static View

🛠️ How to Use py-dss-toolkit?

🔧 1. Directly with the dss_tools Object

This approach is ideal when you want full flexibility to use py-dss-toolkit alongside your own custom logic or an existing py-dss-interface workflow. It allows you to:

  • Inject the active DSS object into py-dss-toolkit using update_dss()
  • Use any feature provided by py-dss-toolkit independently of the study type
  • Combine different simulation types, preprocessing, and postprocessing in a custom flow

Pros:

  • Full control and flexibility
  • Ideal for experienced users who want to mix tools freely
  • Easily integrates into existing scripts

⚠️ Cons:

  • No study-type validation (e.g., SnapShot vs QSTS restrictions)
  • Higher chance of calling functions that don’t match the simulation context
  • Slightly steeper learning curve for py-dss-interface beginners
import py_dss_interface
from py_dss_toolkit import dss_tools

dss = py_dss_interface.DSS()
dss.text("compile path/to/model.dss")
dss_tools.update_dss(dss)

dss.text("solve")

dss_tools.interactive_view.voltage_profile()

🧪 2. Using the CreateStudy Class

This approach is best when you want a clear, structured workflow that restricts available features based on the type of study you are performing (e.g., SnapShot, QSTS). It abstracts the setup and ensures that only relevant tools are available, helping avoid mistakes or invalid calls.

Pros:

  • Easier for beginners to follow and use safely
  • Prevents access to results or views that don’t apply to the selected study type
  • Provides a cleaner, study-oriented interface

⚠️ Cons:

  • Less flexible than using dss_tools directly
  • You are limited to workflows supported by the framework
  • More abstraction might make it harder to customize or mix multiple simulations
from py_dss_toolkit import CreateStudy

study = CreateStudy.snapshot("Snapshot Study", dss_file="path/to/model.dss")
study.run()

study.interactive_view.circuit_plot()

🧪 Running Tests

pytest tests/ -v --tb=short

🎓 Learn More

The best way to master py-dss-toolkit and py-dss-interface is through the official course:

👉 Try the first modules for free

🤝 Community and Support

Contributions and feedback are welcome! Open an issue or start a discussion on the GitHub Issues Page.

This project is under active development, and there are many additional features that could be included in the future. If you have ideas or specific needs, feel free to open a feature request, contribute directly, or reach out to me!

📚 How to Cite

If you use py-dss-toolkit in your academic work, please reference it as follows:

APA Style:

Radatz, P. (2026). py-dss-toolkit: Advanced Python Tools for OpenDSS powered by EPRI (Version 0.18.0) [Computer software]. GitHub. https://github.com/PauloRadatz/py_dss_toolkit

BibTeX Entry:

@software{radatz2026pydsstoolkit,
  author = {Paulo Radatz},
  title = {py-dss-toolkit: Advanced Python Tools for OpenDSS powered by EPRI},
  year = {2026},
  version = {0.18.0},
  url = {https://github.com/PauloRadatz/py_dss_toolkit}
}

🙏 Acknowledgements

Developed and maintained by Paulo Radatz, with support from the global OpenDSS community.

Special thanks to the OpenDSS community and all contributors and users who have provided feedback and inspiration. The development of py-dss-toolkit builds on the foundation laid by py-dss-interface.


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py_dss_toolkit-0.18.0.tar.gz (190.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_dss_toolkit-0.18.0-py3-none-any.whl (145.1 kB view details)

Uploaded Python 3

File details

Details for the file py_dss_toolkit-0.18.0.tar.gz.

File metadata

  • Download URL: py_dss_toolkit-0.18.0.tar.gz
  • Upload date:
  • Size: 190.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for py_dss_toolkit-0.18.0.tar.gz
Algorithm Hash digest
SHA256 bec22594a7678ad41b2b4634cf54b3b0e47131163927697919ab08717944bf57
MD5 e513c35d057205ef1f6d852b257f2703
BLAKE2b-256 a21666db516ac29b6f6bd2b0b92ca00f2c9d926d628b0efca985b11e76e03e52

See more details on using hashes here.

File details

Details for the file py_dss_toolkit-0.18.0-py3-none-any.whl.

File metadata

File hashes

Hashes for py_dss_toolkit-0.18.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2644fe0c2d4c700ebf2372751aa815ca9d29759ddef18d2b59bdf4ac4feef0fd
MD5 099353d70ee654c24e8eeb8ffaa55723
BLAKE2b-256 942b2a13015cc9a6eb672113882d55ab03680adb69ace242cd9adcd9117ff70f

See more details on using hashes here.

Release history Release notifications | RSS feed

0.20.0

2 files

This release

0.18.0 This release

2 files

0.17.0

2 files

0.16.0

2 files

0.15.0

2 files

0.14.0

2 files

0.13.0

2 files

0.12.0

2 files

0.11.0

2 files

0.10.0

2 files

0.9.0

2 files

0.8.0

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 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