Python interface for controlling OpenDSS Powered by EPRI.
Project description
๐ py-dss-interface: Python Control for OpenDSS Powered by EPRI
py-dss-interface is a Python package to control OpenDSS Powered by EPRI using the Python programming language. This tool is actively used across multiple EPRI research projects and by many utilities and consultants. It also serves as the foundation for the automated testing process of OpenDSS itself.
๐ What Can You Do With py-dss-interface?
Use the full power of Python to control and automate your OpenDSS workflows:
- โ๏ธ Automate repetitive OpenDSS tasks.
- ๐ง Manipulate circuit, element, and bus properties with Python logic.
- ๐ Extract simulation results and generate custom reports.
- ๐งฎ Implement advanced analysis and algorithms using Python.
๐ Why Use py-dss-interface Instead of the COM Interface?
Compared to the COM interface, py-dss-interface provides a modern, Pythonic experience:
- ๐ก Code Completion: Works seamlessly with IDEs like PyCharm for better developer productivity.
- ๐ฆ No OpenDSS Installation Required (Windows): No need to install OpenDSS since
py-dss-interfacecomes bundled with a tested version of OpenDSS. However, you may also use a different OpenDSS version if desired. Please note that compatibility is only guaranteed for the bundled version. - ๐ Supports Multiple DSS Objects: Interact with multiple OpenDSS objects at the same time.
- ๐ Multi-Platform: Supports both Windows and now Linux (via local OpenDSS C++ build).
- โก Better Performance: Some examples comparing performance will be provided later.
- ๐ Version Control Friendly (Windows): Avoid breaking your Python code when updating the OpenDSS version on your computer.
๐ป Platform Support
โ Windows
pip install py-dss-interface
๐ง Linux (OpenDSS C++ Build Required)
To use py-dss-interface on Linux, you'll need to build the OpenDSS C++ engine locally.
๐ง Step 1: Clone the repository
git clone https://github.com/PauloRadatz/py_dss_interface.git
cd py_dss_interface
This will create a folder named
py_dss_interfaceโ youโll use this path later when installing the package.
โ๏ธ Step 2: Build the OpenDSS C++ engine
bash py_dss_interface/OpenDSSLinuxCPPForRepo.sh
๐ Note: You'll need tools for building C++ code on your system (e.g., g++, cmake, etc.).
๐ฆ Step 3: Install the package in your Python environment
If you're using py-dss-interface in your own Python project or script, install it like this:
pip install path/to/py_dss_interface
๐ฆ Quickstart Example
import py_dss_interface
dss = py_dss_interface.DSS()
dss.text("compile path/to/circuit.dss")
dss.text("solve")
print(dss.circuit.total_power)
๐ Documentation
๐ Full documentation available at: ๐ https://py-dss-interface.readthedocs.io/en/latest/
๐ Learn More
๐ Comprehensive Online Course
The best way to master py-dss-interface is through the official course:
๐ Try the first modules for free
๐บ YouTube Playlists
- ๐ Why Use Python with OpenDSS
- ๐ py-dss-interface Version 2 Overview
- ๐ Version 1 Introduction
๐งฉ Tools Built on py-dss-interface
-
๐ OpenDER_Interface: EPRI's tool for Distributed Energy Resource simulation and control, powered by
py-dss-interface. More on OpenDER: GitHub -
๐ 2023 Hosting Capacity Webinar: Examples shown using this package.
-
๐ง py-dss-toolkit: A new package built on top of
py-dss-interface, coming soon to PyPI.
๐ Where to Find Examples
- ๐ OpenDSS Repository
- ๐ Local Installation:
After installing OpenDSS on your Windows computer, navigate to:
C:\\Program Files\\OpenDSS\\Examples\\Python\\py-dss-interface
๐ค Community and Support
- ๐ฌ Open an Issue on GitHub for bugs or feature requests.
- ๐ Contributions welcome! Please open a pull request with clear descriptions.
- ๐ป Questions? Join discussions in the OpenDSS user forums or comment on relevant YouTube videos.
๐ How to Cite
If you use py-dss-interface in your academic work, please reference it as follows:
APA Style:
Radatz, P. (2025). py-dss-interface: A Python package that interfaces with OpenDSS powered by EPRI (Version X.X.X) [Computer software]. GitHub. https://github.com/PauloRadatz/py_dss_interface
BibTeX Entry:
@software{radatz2024bdgd2opendss,
author = {Paulo Radatz},
title = {py-dss-interface: A Python package that interfaces with OpenDSS powered by EPRI},
year = {2025},
version = {X.X.X},
url = {https://github.com/PauloRadatz/py_dss_interface}
}
๐ Please replace X.X.X with the version of the package you are using.
๐ Acknowledgements
Developed and maintained by Paulo Radatz, with support from EPRI and the global OpenDSS community.
Special thanks to รnio Viana and Rodolfo Pilar Londero for their contributions to the first version of this tool.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file py_dss_interface-2.2.1.tar.gz.
File metadata
- Download URL: py_dss_interface-2.2.1.tar.gz
- Upload date:
- Size: 29.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34a320bf46d8618d052659480adb32ee36b46c9d32c94e07cb7677dbc6765be4
|
|
| MD5 |
e5767c03d2aa7bcd86bf071562c3c153
|
|
| BLAKE2b-256 |
1fb1d4d4176f97b9f188bdb4580d3339db3156d790639583907e2286af225d39
|
File details
Details for the file py_dss_interface-2.2.1-py3-none-any.whl.
File metadata
- Download URL: py_dss_interface-2.2.1-py3-none-any.whl
- Upload date:
- Size: 15.0 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98bd779bc2430d64dd77dc6689b456f5579e067483dc9bbf32c2f93b7ef773d6
|
|
| MD5 |
367923af5bc705ad5d64226c6bc8bf4a
|
|
| BLAKE2b-256 |
501fde3c80bfffa004049f7c9b97576b920b950d2c2916ef42098ac6bb0b87a2
|