⚡ Getting Started with grid-reducer
Welcome! Follow the steps below to get grid-reducer up and running locally.
We recommend using a Python virtual environment for a clean install 🔒🐍.
This software is being provided as a prototype only. For your intended use, it is your responsibility to independently validate the results in accordance with your applicable software quality assurance program.
🧪 Step 1: Set Up a Python Environment
To avoid dependency conflicts, create and activate a virtual environment.
You can use any tool of your choice — here are a few popular options:
🟢 Option A: Using venv (Standard Library)
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
🔵 Option B: Using conda
conda create -n grid-reducer-env python=3.11
conda activate grid-reducer-env
🚀 Step 2: Install the Project Locally
Install the project:
pip install grid_reducer
✅ This will also install all required dependencies.
🛠 Example CLI Usage
Once installed, you can use command line interface. Run grid --help to see all the available command options.
Here is a minimal example to reduce OpenDSS model.
grid reduce -f Master.dss
Example Python Usage
You can also reduce the feeder model through python scripts.
Here is a minimal example to reduce OpenDSS feeder model using Python Script.
from pathlib import Path
from grid_reducer.reducer import OpenDSSModelReducer
file_path = "master.dss"
reducer = OpenDSSModelReducer(master_dss_file=file_path)
reduced_ckt = reducer.reduce(transform_coordinate=True)
out_folder = Path("outputs")
out_folder.mkdir(parents=True, exist_ok=True)
original_circuit_file = out_folder / "original_ckt.dss"
reduced_circuit_file = out_folder / "reduced_ckt.dss"
reducer.export_original_ckt(original_circuit_file)
reducer.export(reduced_ckt, reduced_circuit_file)
📌 Notes
- This is the recommended way to use the project:
pip install grid-reducer
- If you want your local changes to the code to be applied immediately (without needing to reinstall your package each time), use an “editable” install by running:
pip install -e .
Stay tuned for updates! 📬
Need help? Feel free to open an issue or reach out to the maintainers. 💬
Attribution and Disclaimer
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.
Reference herein to any specific commercial product, process, or service by trade name, trademark, manufacturer, or otherwise does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States Government or any agency thereof, or Battelle Memorial Institute. The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States Government or any agency thereof.
PACIFIC NORTHWEST NATIONAL LABORATORY
operated by BATTELLE
for the UNITED STATES DEPARTMENT OF ENERGY
under Contract DE-AC05-76RL01830
Metadata
Release files for grid-reducer 1.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| grid_reducer-1.1.2.tar.gz | 72.4 kB | With provenance | Details for grid_reducer-1.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| grid_reducer-1.1.2-py3-none-any.whl | Python 3 | none | any | Details for grid_reducer-1.1.2-py3-none-any.whl |
Total release size: 155.3 kB
Release files / grid_reducer-1.1.2.tar.gz
| Download URL | grid_reducer-1.1.2.tar.gz |
|---|---|
| Size | 72.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
160453913bde9641620ebc7e52dbc1ebf0a1b2982c6985404cced5c59a14b641
|
|
BLAKE2b-256 checksum How to use checksums |
c28179b2e9b24b85933c5f481d980bc9ae5c7f60e13eaf828ee7b06f6ddac4a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 18, 2025.
Transparency logRelease files / grid_reducer-1.1.2-py3-none-any.whl
| Download URL | grid_reducer-1.1.2-py3-none-any.whl |
|---|---|
| Size | 82.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
95633bcf22e9af353be03541633d6eaac2d463a6c01d8c56edf40acb0f72c45a
|
|
BLAKE2b-256 checksum How to use checksums |
58baad26e14e05d38c9d3b0e5e93274e4dd463470e466bae217aab195ea5f87a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 18, 2025.
Transparency logSecurity for grid-reducer 1.1.2
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for grid_reducer-1.1.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 18, 2025.
Transparency logA 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.