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

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.4
File Size Uploaded Provenance Actions
energyid-webhooks-0.0.4.tar.gz 4.5 kB Without provenance Details for energyid-webhooks-0.0.4.tar.gz

Built distribution (wheel)

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

Total release size: 10.1 kB

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

Download URL energyid-webhooks-0.0.4.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
bd2d568c7948d342ab3c1ac8d4525e568673da1c52fca38cd1f064a7021d37fc
BLAKE2b-256 checksum
How to use checksums
0040573ba950ba8b349690a8e87a1bbd5d3153d9d08df45a60d3714c59e1414f
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.4-py3-none-any.whl

Download URL energyid_webhooks-0.0.4-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8d54ae02d0613dbd784053f88c544985a273a667cdd96e53b3d21b7f94eaa510
BLAKE2b-256 checksum
How to use checksums
53377b312aa3f976253de9a543177e530467d3185fa83ffa544d5e13374de365
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.4

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