Python library for pushing data to the Energy Mutual (Konductor) platform
Project description
About Energy Mutual
Energy Mutual helps owners of distributed energy assets make the most of their renewable resources.
Check us out at energymutual.com
Getting Started
Prerequisites
You will need the following. Please contact Energy Mutual Support if you do not have them already.
- Certificate files
private.pem.keycertificate.pem.crtCA.pem
- Your
client_idandtopic
Python 3.9 or newer is required.
Installation
pip install em-data-ingester
or, with uv:
uv add em-data-ingester
Usage
All examples below assume the following:
client_idofEM123456topicofMyTopicName- All required key/certificate files in a
certificates/subdirectory
Creating an EMDataIngester and connecting
from em_data_ingester import EMDataIngester
ingester = EMDataIngester(
client_id="EM123456",
topic="MyTopicName",
key_path="certificates/private.pem.key",
cert_path="certificates/certificate.pem.crt",
ca_path="certificates/CA.pem",
)
ingester.connect()
Adding attributes to the payload
from datetime import datetime, timezone
# Add a powerOutput reading (timestamp defaults to now, UTC)
ingester.add_to_payload("powerOutput", 123, units="kW")
# Or pass an explicit datetime
ingester.add_to_payload(
"reservoirLevel",
10,
dt=datetime.now(timezone.utc),
units="m",
)
Adding the same attribute name more than once will overwrite the previous value.
Sending the payload
ingester.send_payload()
This will clear the payload after a successful publish.
Clearing the payload
ingester.clear_payload()
Viewing the payload
print(ingester.payload)
Closing the connection (Important!)
ingester.end()
Context manager
EMDataIngester also works as a context manager, which connects on entry
and closes the connection on exit:
with EMDataIngester(
client_id="EM123456",
topic="MyTopicName",
key_path="certificates/private.pem.key",
cert_path="certificates/certificate.pem.crt",
ca_path="certificates/CA.pem",
) as ingester:
ingester.add_to_payload("powerOutput", 123, units="kW")
ingester.send_payload()
Contact
Energy Mutual - info@energymutual.com
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file em_data_ingester-1.0.1.tar.gz.
File metadata
- Download URL: em_data_ingester-1.0.1.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d529567a32ee557069a0cbf60941f14173e910ed088172126934bb06d1c77f7a
|
|
| MD5 |
7ac3681d3422a89304a4e6c15991da13
|
|
| BLAKE2b-256 |
08f9beef77d19db5ffe098f292728a9de04d598e2d579f294cc7cc416c69e258
|
Provenance
The following attestation bundles were made for em_data_ingester-1.0.1.tar.gz:
Publisher:
publish.yml on Energy-Mutual/data-ingester-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
em_data_ingester-1.0.1.tar.gz -
Subject digest:
d529567a32ee557069a0cbf60941f14173e910ed088172126934bb06d1c77f7a - Sigstore transparency entry: 1270982458
- Sigstore integration time:
-
Permalink:
Energy-Mutual/data-ingester-py@1c733b64cca961c8fb2129c1e552e7bfd36e277a -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Energy-Mutual
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1c733b64cca961c8fb2129c1e552e7bfd36e277a -
Trigger Event:
push
-
Statement type:
File details
Details for the file em_data_ingester-1.0.1-py3-none-any.whl.
File metadata
- Download URL: em_data_ingester-1.0.1-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9618a396dd109143c0ff7753f8dc1ec747bb5f8a3dd45cdf57e89664073a8615
|
|
| MD5 |
ba01b99f7b38ea987ef49ad23829b35f
|
|
| BLAKE2b-256 |
a64a2311955f6d389c3a2c3f0949117aad6a7cb1ec12bf36a430b0b16fc0f621
|
Provenance
The following attestation bundles were made for em_data_ingester-1.0.1-py3-none-any.whl:
Publisher:
publish.yml on Energy-Mutual/data-ingester-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
em_data_ingester-1.0.1-py3-none-any.whl -
Subject digest:
9618a396dd109143c0ff7753f8dc1ec747bb5f8a3dd45cdf57e89664073a8615 - Sigstore transparency entry: 1270982463
- Sigstore integration time:
-
Permalink:
Energy-Mutual/data-ingester-py@1c733b64cca961c8fb2129c1e552e7bfd36e277a -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Energy-Mutual
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1c733b64cca961c8fb2129c1e552e7bfd36e277a -
Trigger Event:
push
-
Statement type: