This release is a pre-release and may not be stable for production use.
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:
Using the examples in your own project
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:
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
- Requesting a network model ingest from blob storage
Power flow
- Translating a CIM network model into a pandapower model
- Requesting a PowerFactory model through the SDK
F.A.Q
-
What do I do about permission issues when I use token from the web UI to use in the example code? Please double-check the role of the generated token has the right to perform desired operations. See https://zepben.github.io/evolve/docs/evolve-app-server/2.8.0/permissions/ for the list of permissions and their access.
-
What do I do when I run into CA or SSL issue while attempt to request/download power factory model? CA used in this request will be OS based, thus it is highly likely the user is missing a package that points the script to it. Try running the command "pip install pip-system-certs"
Release files for zepben.examples 0.7.0b9
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.7.0b9.tar.gz | 47.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| zepben_examples-0.7.0b9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 115.1 kB
Release files / zepben_examples-0.7.0b9.tar.gz
| Download URL | zepben_examples-0.7.0b9.tar.gz |
|---|---|
| Size | 47.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d8211fbe87b6f6ca9355474b6ace3ddfbb1440648b1475b5c2ca9eff1e7ee5e2
|
|
BLAKE2b-256 checksum How to use checksums |
2334eb7d74ef27c553233959135d973da0ccf37b9f91a32fc5ac4e5ff4870344
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.20
|
Release files / zepben_examples-0.7.0b9-py3-none-any.whl
| Download URL | zepben_examples-0.7.0b9-py3-none-any.whl |
|---|---|
| Size | 67.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a2631382d22a62ad8bafc4c0c987199b29ee99a3e2c911b783f760116c849652
|
|
BLAKE2b-256 checksum How to use checksums |
bae1939e79be2fe2f3bc20b73bcb162b96fed44f7369da5775463cb6e236f867
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.20
|