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.5

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.5
File Size Uploaded Provenance Actions
energyid-webhooks-0.0.5.tar.gz 4.6 kB Without provenance Details for energyid-webhooks-0.0.5.tar.gz

Built distribution (wheel)

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

Total release size: 10.1 kB

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

Download URL energyid-webhooks-0.0.5.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
5550b08861f03fc5c976c0018220d45167a8fcf9ac8c4dd559c5766dd2717e61
BLAKE2b-256 checksum
How to use checksums
061d1eebd429e5fe81c6f8d7464a7a4e2a739f38d30726bbd9edacbf42011498
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.5-py3-none-any.whl

Download URL energyid_webhooks-0.0.5-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fb9346099d9d4f1746fa3abba36719ec1e93937072ba346f8967476f57af201c
BLAKE2b-256 checksum
How to use checksums
334b2775409a7bcfeaccaf0eefda32025148d823bdb3bae0707efeef89d2159e
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.5

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