EWB Python SDK examples
This repo contains examples for utilising the Python SDK. If you don't wish to use Python, you can alternatively use the JVM SDK, which is written in Kotlin and compatible with Java.
Some of the examples covering basic concepts are highlighted in this section, an index of the examples containing more advanced concepts can be found at the end of the README.
Adding the EWB SDK to your own project
Add the following items to your setup.py:
install_requires=[
"zepben.auth==<VERSION>",
"zepben.ewb==<VERSION>"
],
The latest versions can be found on the Python package index:
[!NOTE]
If you are a keen developer and want access to the latest updates, beta versions that have been released since the latest official release can be found in the "Release history" page for each dependency.
Using the examples in your own project
[!IMPORTANT]
Sometimes you may want to copy the code from the examples into your own project, rather than just running them from this repo. It is important to note that some of the examples may be using beta version features, and you should make sure to use the SDK version specified in setup.py, rather than the latest official release.
Installation and setup of the examples
pip install -e .
Basic usage with EWB server
The first step is to connect to the EWB gRPC server. All other examples relating to using the EWB server can use any of the connection methods shown, based on the configuration of the EWB server.
Once you are connected the most common use case is to fetch a feeder. Once you have the feeder you can work with it locally, without changing the objects on the server, or other users of the feeder. See further examples for things you may want to do ith the feeder.
Building local models
Sometimes you do not want to pull a model from the EWB server, and instead want to build it locally. Depending on your use case, you may want to build your own network hierarchy. You can even build a full feeder, such as the IEEE 13 node test feeder
EAS Python examples
The EAS adds additional functionality to EWB.
Adding the EAS client to your own project
In addition to the EWB SDK requirements, add the following item to your setup.py:
install_requires=[
"zepben.eas==<VERSION>",
],
The latest version can be found on the Python package index:
[!NOTE]
If you are a keen developer and want access to the latest updates, beta versions that have been released since the latest official release can be found in the "Release history" page.
Creating and uploading studies
One feature added by the EAS is studies. You can create you own study and upload it to EAS, which will then be available via the UI for visualisation.
Examples Index
Reading from the server
Creating local models
- Interacting with a network model (e.g. adding and removing objects)
- Building the IEEE 13 node test feeder
- Modelling network hierarchies
Using the model
- Examining connectivity of cores on equipment and terminals
- Running network traces
- Creating and uploading studies
- Manipulating the current state of the network, including swapping a zone open point
Power flow
Release files for zepben.examples 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| zepben_examples-0.6.0.tar.gz | 43.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| zepben_examples-0.6.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 100.9 kB
Release files / zepben_examples-0.6.0.tar.gz
| Download URL | zepben_examples-0.6.0.tar.gz |
|---|---|
| Size | 43.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e667c6d92c6b14cac6b8027439ab22cdc69455a23c7cf1d52c9452fb8a2f9a38
|
|
BLAKE2b-256 checksum How to use checksums |
b543df9dca10a99f08797c6fa77c2d90402dbc7d9da75aac960bef4c2fac6315
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.19
|
Release files / zepben_examples-0.6.0-py3-none-any.whl
| Download URL | zepben_examples-0.6.0-py3-none-any.whl |
|---|---|
| Size | 57.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8e83dd533a75798375576aeba4f5d4d20a8624d4af8bba8d4ed8092b2e0c2b36
|
|
BLAKE2b-256 checksum How to use checksums |
09f332709f4d1d57ee419f001775da74f674856be8e2dc3eee7ef62f948a55cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.19
|