Skip to main content

Module containing examples for interacting with Zepben's platform

Project description

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

Using the model

Power flow

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"

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

zepben_examples-0.7.0b7.tar.gz (46.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zepben_examples-0.7.0b7-py3-none-any.whl (64.2 kB view details)

Uploaded Python 3

File details

Details for the file zepben_examples-0.7.0b7.tar.gz.

File metadata

  • Download URL: zepben_examples-0.7.0b7.tar.gz
  • Upload date:
  • Size: 46.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for zepben_examples-0.7.0b7.tar.gz
Algorithm Hash digest
SHA256 d0be7b1366d58837122e8e0f69e8ae7997cc65c6973c7775c4e3961576393dfc
MD5 c219fb42787d763f7bf49525e3d09bad
BLAKE2b-256 72456e9ea4a5ec14e5b59b446d206248acefc444eac4f0625fe03021176fbd47

See more details on using hashes here.

File details

Details for the file zepben_examples-0.7.0b7-py3-none-any.whl.

File metadata

File hashes

Hashes for zepben_examples-0.7.0b7-py3-none-any.whl
Algorithm Hash digest
SHA256 8c4bdcd6fe18fca7ad8f4aeec79aa57bce3b71361de7d0d7dc1dea8af1ed9b86
MD5 e51b5e0348caefc8e86b8d4a45e460b6
BLAKE2b-256 b9974430ee97baec322a97d4a6be952a001a38876645df6e8a7ff85deb3b5fdb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page