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

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.3
File Size Uploaded Provenance Actions
energyid-webhooks-0.0.3.tar.gz 3.6 kB Without provenance Details for energyid-webhooks-0.0.3.tar.gz

Built distribution (wheel)

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

Total release size: 7.8 kB

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

Download URL energyid-webhooks-0.0.3.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a98cc780cddc712f0a823e332727a465d4089e79231079f319f5d502dc822f91
BLAKE2b-256 checksum
How to use checksums
64e707eefd355f00cd21f152898a6d9226744707cda0969f500244d667586109
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.3-py3-none-any.whl

Download URL energyid_webhooks-0.0.3-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d7b3477a675de88f0bfd327522b8d894bc095b5a97e50a292c6e9d246a91c254
BLAKE2b-256 checksum
How to use checksums
2f7c096110a9e0da82ebd2e3f88a89ae57eff071432176af3570beac4fe1d1de
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.3

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