Python SDK for interacting with the Evolve platform
Project description
Zepben Evolve Python SDK
The Python Evolve SDK contains everything necessary to communicate with a Zepben EWB Server. See the complete Evolve Python SDK Documentation for more details.
Note this project is still a work in progress and unstable, and breaking changes may occur prior to 1.0.0.
Requirements
- Python 3.7 or later
- pycryptodome, which requires a C/C++ compiler to be installed.
On Linux, python headers (typically
python-dev
) is also necessary to build pycryptodome.
On Windows systems:
Download and run Build Tools for Visual Studio 2019
When in the installer, select and install:
- C++ build tools
- Windows 10 SDK
- The latest version of MSVC v142 x64/x86 build tools.
After this you should be able to pip install zepben.evolve
without issues.
Installation
pip install zepben.evolve
Building
python setup.py bdist_wheel
Developing
This library depends on protobuf and gRPC for messaging. To set up for developing against this library, clone it first:
git clone https://github.com/zepben/evolve-sdk-python.git
Install as an editable install. It's recommended to install in a Python virtualenv
cd evolve-sdk-python
pip install -e .[test]
Run the tests:
python -m pytest
Checklist for model changes
- Update
setup.py
to import the correct version ofzepben.protobuf
. - Model updating:
- Add new classes to the model package.
- Descriptions copied from Evolve CIM Profile documentation and added as doc comments to new changes (on class, property etc)
- Update translator package:
- Update
__init__.py
:from zepben.protobuf...<new_class_name>_pb2 import <new_class_name>
<new_class_name>.mrid = lambda self: self...mrid()
- Update network_cim2proto.py:
import <new_class_name> as PB<new_class_name>
- Add
def <new_class_name>_to_pb
- Add
"<new_class_name>_to_pb"
to__all__
- Add
<new_class_name>.to_pb = <new_class_name>_to_pb
- Update network_proto2cim.py
import <new_class_name> as PB<new_class_name>
- Add
def <new_class_name>_to_pb
- Add
"<new_class_name>_to_cim"
to__all__
- Add
<new_class_name>_to_cim = <new_class_name>_to_cim
- Update
- Update network_rpc.py
- Add
from zepben.protobuf...<new_class_name>_pb2 import <new_class_name>
- Add
<new_class_name>: ('Create<new_class_name>', Create<new_class_name>),
- Add
- Add reference resolver(s) to resolvers in common package (if new associations).
- Testing:
- Add the required creators to:
- Update
constructor_validation.py
- Add test for each new class to test/cim/... package.
- Verify that al the test are passing.
- Update release notes in
changelog.md
.
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 Distributions
Built Distribution
Hashes for zepben.evolve-0.23.0b10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62e6a385d7a4f4ece68a1552aa6161c2d7ca446cf314eb6478183a6bbd6e9374 |
|
MD5 | 00a7efccc9bc5833847d2a854e102e76 |
|
BLAKE2b-256 | 23c5a69372f6f80dff2e5b924edffe7de9fad2e261c8bc78c0126c61897b2f3a |