Skip to main content

energyid-webhooks-py

Light weight Python package to interface with EnergyID Webhooks

Installation

pip install energyid-webhooks

Usage

Get your URL at https://app.energyid.eu/integrations/WebhookIn

from energyid_webhooks import WebhookClient

url = "https://app.energyid.eu/integrations/WebhookIn/..."

client = WebhookClient(url)

# Get some information about the webhook

print(client.get())

# Post some data to the webhook

data = {
    'remoteId': 'my-solar-inverter',
    'remoteName': 'My Solar Panels',
    'metric': 'solarPhotovoltaicProduction',
    'metricKind': 'total',
    'unit': 'kWh',
    'interval': 'P1D',
    'data': [['2022-10-05T08:00+0200', 0.004]]
}

client.post(data)

Async usage

import asyncio
from energyid_webhooks import WebhookClientAsync

url = "https://app.energyid.eu/integrations/WebhookIn/..."

client = WebhookClientAsync(url)

async def main():
    # Get some information about the webhook

    print(await client.get())

    # Post some data to the webhook

    data = {
        'remoteId': 'my-solar-inverter',
        'remoteName': 'My Solar Panels',
        'metric': 'solarPhotovoltaicProduction',
        'metricKind': 'total',
        'unit': 'kWh',
        'interval': 'P1D',
        'data': [['2022-10-05T08:00+0200', 0.004]]
    }

    await client.post(data)

asyncio.run(main())

Demo Notebook

See demo.ipynb for a demo notebook.

Development

Setup

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Metadata

Release files for energyid-webhooks 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for energyid-webhooks 0.0.6
File Size Uploaded Provenance Actions
energyid-webhooks-0.0.6.tar.gz 4.9 kB Without provenance Details for energyid-webhooks-0.0.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for energyid-webhooks 0.0.6
File Interpreter ABI Platform Actions
energyid_webhooks-0.0.6-py3-none-any.whl Python 3 none any Details for energyid_webhooks-0.0.6-py3-none-any.whl

Total release size: 11.0 kB

Release files / energyid-webhooks-0.0.6.tar.gz

Download URL energyid-webhooks-0.0.6.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c34972e2dfdb9d854cdf7bd03d2e528b67a68856abf9942c8445dd6bc8dd073b
BLAKE2b-256 checksum
How to use checksums
531fe11f1605c2cc6f443a729f3c063e8389de04ae8d71e1d63e5ba3d41d7525
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.8

Release files / energyid_webhooks-0.0.6-py3-none-any.whl

Download URL energyid_webhooks-0.0.6-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8a00184958f1f57001fd407785dcaf845054c34d4f8bcdc3e9ae7c1f48ec4ecb
BLAKE2b-256 checksum
How to use checksums
3e104e35126f3705529db412678185b9425e26582d01edc15027e85fb239e36c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.8

Security for energyid-webhooks 0.0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page