# ๐ py-dss-interface: Python Control for OpenDSS Powered by EPRI





`py-dss-interface` is a Python package to control **OpenDSS Powered by [EPRI](https://www.epri.com/)** 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-interface` comes 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
```bash
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
```bash
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
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:
```bash
pip install path/to/py_dss_interface
```
---
## ๐ฆ Quickstart Example
```python
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/](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](https://www.pauloradatz.me/course-py-dss-interface)
### ๐บ YouTube Playlists
- ๐ [Why Use Python with OpenDSS](https://www.youtube.com/watch?v=BIMcjZWpJek&list=PLhdRxvt3nJ8w36keL4uGBNbWs5SRxEyW0)
- ๐ [py-dss-interface Version 2 Overview](https://www.youtube.com/watch?v=3KpQ_ORK3ew&list=PLhdRxvt3nJ8xURfBipVoAx8du1a-S5YsL)
- ๐ [Version 1 Introduction](https://www.youtube.com/watch?v=QRnpLuMipFs&list=PLhdRxvt3nJ8zlzp6b_-7s3_YwwlunTNRC)
---
## ๐งฉ Tools Built on py-dss-interface
- ๐ [OpenDER_Interface](https://github.com/epri-dev/OpenDER_interface): EPRI's tool for Distributed Energy Resource simulation and control, powered by `py-dss-interface`.
More on OpenDER: [GitHub](https://github.com/epri-dev/OpenDER)
- ๐ [2023 Hosting Capacity Webinar](https://epri.app.box.com/s/l1y0vyrj1dg3i0dadoseo97c9wj66pys): Examples shown using this package.
- ๐ง [py-dss-toolkit](https://github.com/PauloRadatz/py_dss_toolkit): A new package built on top of `py-dss-interface`, coming soon to PyPI.
---
## ๐ Where to Find Examples
- ๐ [OpenDSS Repository](https://sourceforge.net/p/electricdss/code/HEAD/tree/trunk/Version8/Distrib/Examples/Python/py-dss-interface/)
- ๐ 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](https://github.com/PauloRadatz/py_dss_interface/issues) 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:**
```bibtex
@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](https://www.linkedin.com/in/pauloradatz/), 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.
---
Raw data
{
"_id": null,
"home_page": null,
"name": "py-dss-interface",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "OpenDSS, Python, Power Systems, Distribution Systems, Energy",
"author": null,
"author_email": "Paulo Radatz <paulo.radatz@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/f6/e4/7d496edf182b7983a2069a058194cc034f778e84a4dcfd32e6aa8adde621/py_dss_interface-2.2.0.tar.gz",
"platform": null,
"description": "# \ud83d\udc0d py-dss-interface: Python Control for OpenDSS Powered by EPRI\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n`py-dss-interface` is a Python package to control **OpenDSS Powered by [EPRI](https://www.epri.com/)** 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.\r\n\r\n\r\n---\r\n\r\n## \ud83d\ude80 What Can You Do With `py-dss-interface`?\r\n\r\nUse the full power of Python to control and automate your OpenDSS workflows:\r\n\r\n- \u2699\ufe0f Automate repetitive OpenDSS tasks.\r\n- \ud83e\udde0 Manipulate circuit, element, and bus properties with Python logic.\r\n- \ud83d\udcca Extract simulation results and generate custom reports.\r\n- \ud83e\uddee Implement advanced analysis and algorithms using Python.\r\n\r\n---\r\n\r\n## \ud83d\udd04 Why Use `py-dss-interface` Instead of the COM Interface?\r\n\r\nCompared to the COM interface, `py-dss-interface` provides a modern, Pythonic experience:\r\n\r\n- \ud83d\udca1 **Code Completion**: Works seamlessly with IDEs like PyCharm for better developer productivity.\r\n- \ud83d\udce6 **No OpenDSS Installation Required (Windows)**: No need to install OpenDSS since `py-dss-interface` comes 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.\r\n- \ud83d\udd04 **Supports Multiple DSS Objects**: Interact with multiple OpenDSS objects at the same time.\r\n- \ud83c\udf10 **Multi-Platform**: Supports both **Windows** and now **Linux** (via local OpenDSS C++ build).\r\n- \u26a1 **Better Performance**: Some examples comparing performance will be provided later.\r\n- \ud83d\udd10 **Version Control Friendly (Windows)**: Avoid breaking your Python code when updating the OpenDSS version on your computer.\r\n\r\n---\r\n\r\n## \ud83d\udcbb Platform Support\r\n\r\n### \u2705 Windows\r\n```bash\r\npip install py-dss-interface\r\n```\r\n\r\n### \ud83d\udc27 Linux (OpenDSS C++ Build Required)\r\n\r\nTo use `py-dss-interface` on Linux, you'll need to build the OpenDSS C++ engine locally.\r\n\r\n#### \ud83d\udd27 Step 1: Clone the repository\r\n\r\n```bash\r\ngit clone https://github.com/PauloRadatz/py_dss_interface.git\r\ncd py_dss_interface\r\n```\r\n\r\n> This will create a folder named `py_dss_interface` \u2014 you\u2019ll use this path later when installing the package.\r\n\r\n#### \u2699\ufe0f Step 2: Build the OpenDSS C++ engine\r\n\r\n```bash\r\nbash py_dss_interface/OpenDSSLinuxCPPForRepo.sh\r\n```\r\n\r\n\ud83d\udccc **Note:** You'll need tools for building C++ code on your system (e.g., `g++`, `cmake`, etc.).\r\n\r\n#### \ud83d\udce6 Step 3: Install the package in your Python environment\r\n\r\nIf you're using `py-dss-interface` in your own Python project or script, install it like this:\r\n\r\n```bash\r\npip install path/to/py_dss_interface\r\n```\r\n\r\n---\r\n\r\n## \ud83d\udce6 Quickstart Example\r\n\r\n```python\r\nimport py_dss_interface\r\n\r\ndss = py_dss_interface.DSS()\r\ndss.text(\"compile path/to/circuit.dss\")\r\ndss.text(\"solve\")\r\nprint(dss.circuit.total_power)\r\n```\r\n\r\n---\r\n\r\n## \ud83d\udcd6 Documentation\r\n\r\n\ud83d\udcd6 **Full documentation available at:**\r\n\ud83d\udc49 [https://py-dss-interface.readthedocs.io/en/latest/](https://py-dss-interface.readthedocs.io/en/latest/)\r\n\r\n---\r\n\r\n## \ud83c\udf93 Learn More\r\n\r\n### \ud83d\udcd8 Comprehensive Online Course\r\n\r\nThe best way to master `py-dss-interface` is through the official course:\r\n\r\n\ud83d\udc49 [Try the first modules for free](https://www.pauloradatz.me/course-py-dss-interface)\r\n\r\n### \ud83d\udcfa YouTube Playlists\r\n\r\n- \ud83d\udd17 [Why Use Python with OpenDSS](https://www.youtube.com/watch?v=BIMcjZWpJek&list=PLhdRxvt3nJ8w36keL4uGBNbWs5SRxEyW0)\r\n- \ud83d\udd17 [py-dss-interface Version 2 Overview](https://www.youtube.com/watch?v=3KpQ_ORK3ew&list=PLhdRxvt3nJ8xURfBipVoAx8du1a-S5YsL)\r\n- \ud83d\udd17 [Version 1 Introduction](https://www.youtube.com/watch?v=QRnpLuMipFs&list=PLhdRxvt3nJ8zlzp6b_-7s3_YwwlunTNRC)\r\n\r\n---\r\n\r\n## \ud83e\udde9 Tools Built on py-dss-interface\r\n\r\n- \ud83d\udcc8 [OpenDER_Interface](https://github.com/epri-dev/OpenDER_interface): EPRI's tool for Distributed Energy Resource simulation and control, powered by `py-dss-interface`.\r\n More on OpenDER: [GitHub](https://github.com/epri-dev/OpenDER)\r\n\r\n- \ud83d\udcca [2023 Hosting Capacity Webinar](https://epri.app.box.com/s/l1y0vyrj1dg3i0dadoseo97c9wj66pys): Examples shown using this package.\r\n\r\n- \ud83d\udd27 [py-dss-toolkit](https://github.com/PauloRadatz/py_dss_toolkit): A new package built on top of `py-dss-interface`, coming soon to PyPI.\r\n\r\n---\r\n\r\n## \ud83d\udcc2 Where to Find Examples\r\n\r\n- \ud83d\udcc1 [OpenDSS Repository](https://sourceforge.net/p/electricdss/code/HEAD/tree/trunk/Version8/Distrib/Examples/Python/py-dss-interface/)\r\n- \ud83d\udcc1 Local Installation:\r\n After installing OpenDSS on your Windows computer, navigate to:\r\n `C:\\\\Program Files\\\\OpenDSS\\\\Examples\\\\Python\\\\py-dss-interface`\r\n\r\n---\r\n\r\n## \ud83e\udd1d Community and Support\r\n\r\n- \ud83d\udcac Open an [Issue on GitHub](https://github.com/PauloRadatz/py_dss_interface/issues) for bugs or feature requests.\r\n- \ud83d\ude4c Contributions welcome! Please open a pull request with clear descriptions.\r\n- \ud83d\udcbb Questions? Join discussions in the OpenDSS user forums or comment on relevant YouTube videos.\r\n\r\n---\r\n\r\n## \ud83d\udcda How to Cite\r\n\r\nIf you use `py-dss-interface` in your academic work, please reference it as follows:\r\n\r\n**APA Style:**\r\n\r\n> 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\r\n\r\n**BibTeX Entry:**\r\n\r\n\r\n```bibtex\r\n@software{radatz2024bdgd2opendss,\r\n author = {Paulo Radatz},\r\n title = {py-dss-interface: A Python package that interfaces with OpenDSS powered by EPRI},\r\n year = {2025},\r\n version = {X.X.X},\r\n url = {https://github.com/PauloRadatz/py_dss_interface}\r\n}\r\n```\r\n\r\n> \ud83d\udccc Please replace X.X.X with the version of the package you are using.\r\n\r\n---\r\n\r\n## \ud83d\ude4f Acknowledgements\r\n\r\nDeveloped and maintained by [Paulo Radatz](https://www.linkedin.com/in/pauloradatz/), with support from EPRI and the global OpenDSS community.\r\n\r\nSpecial thanks to **\u00canio Viana** and **Rodolfo Pilar Londero** for their contributions to the first version of this tool.\r\n\r\n---\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python interface for controlling OpenDSS Powered by EPRI.",
"version": "2.2.0",
"project_urls": {
"Changelog": "https://py_dss_interface.readthedocs.io/en/latest/changelog.html",
"Documentation": "https://py_dss_interface.readthedocs.io/",
"Issue Tracker": "https://github.com/PauloRadatz/py_dss_interface/issues",
"Source": "https://github.com/PauloRadatz/py_dss_interface"
},
"split_keywords": [
"opendss",
" python",
" power systems",
" distribution systems",
" energy"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "b81484f4732c00cb1de79f060f4c7438c4d7c72888834de0be5ae1dbc58caafa",
"md5": "be713514e83620e47061850bc38f6a4e",
"sha256": "5c0887c02ae0226b0b74a8e4f18d981b2ad7fbcd575669d02f8dd7e5db5b412c"
},
"downloads": -1,
"filename": "py_dss_interface-2.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "be713514e83620e47061850bc38f6a4e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 14983604,
"upload_time": "2025-08-19T22:46:35",
"upload_time_iso_8601": "2025-08-19T22:46:35.552725Z",
"url": "https://files.pythonhosted.org/packages/b8/14/84f4732c00cb1de79f060f4c7438c4d7c72888834de0be5ae1dbc58caafa/py_dss_interface-2.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "f6e47d496edf182b7983a2069a058194cc034f778e84a4dcfd32e6aa8adde621",
"md5": "f412c40b1091165009f04c4958cb0215",
"sha256": "76186ea63ce50cf3521d147c2c7eb7bec58dfb7205339ec48f68acdc612cd61a"
},
"downloads": -1,
"filename": "py_dss_interface-2.2.0.tar.gz",
"has_sig": false,
"md5_digest": "f412c40b1091165009f04c4958cb0215",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 29014313,
"upload_time": "2025-08-19T22:46:39",
"upload_time_iso_8601": "2025-08-19T22:46:39.051242Z",
"url": "https://files.pythonhosted.org/packages/f6/e4/7d496edf182b7983a2069a058194cc034f778e84a4dcfd32e6aa8adde621/py_dss_interface-2.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-19 22:46:39",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "PauloRadatz",
"github_project": "py_dss_interface",
"travis_ci": true,
"coveralls": true,
"github_actions": false,
"appveyor": true,
"tox": true,
"lcname": "py-dss-interface"
}