Skip to main content

Python client for Enedis SGE web-service

Project description

lowatt-enedis

A command-line tool and Python library to access Enedis SGE SOAP web-services, provided by LOWATT.

Disclaimer: this package is NOT affiliated to Enedis, but provided by Lowatt in case it could be useful to other users of the SGE web-services provided by Enedis.

Licensing

It is published under the terms of the GPL 3 license.

Installation

pip install lowatt-enedis

Command line usage

See lowatt-enedis --help for CLI usage. You'll be able to call the services controlled using options and see the SOAP response. You can take a look at doc/homologation.md for a sample session to go through Enedis'homologation process.

Some flags are required by all or most of the commands so they can be configured once by their respective environment variables.

Option Environment variable
--cert-file ENEDIS_CERT_FILE
--key-file ENEDIS_KEY_FILE
--login ENEDIS_LOGIN
--contrat ENEDIS_CONTRAT

Python library usage

Here is a sample code to access to the ConsultationMesuresDetaillees from Python code :

import datetime
import lowatt_enedis
import lowatt_enedis.services

config = {
    'login': 'you@example.com',
    'certificateFile': 'fullchain.pem',
    'keyFile': 'privkey.pem',
    'prm': '30000123456789',
}
# get client for the 'details' service using appropriate client
# certificate and key
client = lowatt_enedis.get_client(
    lowatt_enedis.COMMAND_SERVICE['details'][0],
    config['certificateFile'], config['keyFile'],
)
# actually call the web to get values for the past week
resp = lowatt_enedis.services.point_detailed_measures(client, {
    'login': config['login'],
    'prm': config['prm'],
    'type': 'COURBE',
    'courbe_type': 'PA',
    'corrigee': True,
    'from': datetime.date.today() - datetime.timedelta(days=7),
    'to': datetime.date.today(),
})
# get a list of (UTC timestamp, value(W))
data = lowatt_enedis.services.measures_resp2py(resp)

Contributions

Contribution are welcome through the Github repository.

Feel free to contact for more info by writing at info@lowatt.fr.

Sponsors

QosEnergy

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lowatt_enedis-3.2.0.tar.gz (139.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lowatt_enedis-3.2.0-py3-none-any.whl (154.3 kB view details)

Uploaded Python 3

File details

Details for the file lowatt_enedis-3.2.0.tar.gz.

File metadata

  • Download URL: lowatt_enedis-3.2.0.tar.gz
  • Upload date:
  • Size: 139.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for lowatt_enedis-3.2.0.tar.gz
Algorithm Hash digest
SHA256 043df2a11b703c0afe9cbd513fc893ce3c7fa382dbfcf072cc3de355cc36b7dc
MD5 4249cb7b15cf0c50152c782ba501ae82
BLAKE2b-256 74a1b6441c8937d3176a9412f007035745143cc4f1403c2757b728564c031ffc

See more details on using hashes here.

Provenance

The following attestation bundles were made for lowatt_enedis-3.2.0.tar.gz:

Publisher: release.yml on lowatt/lowatt-enedis

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lowatt_enedis-3.2.0-py3-none-any.whl.

File metadata

  • Download URL: lowatt_enedis-3.2.0-py3-none-any.whl
  • Upload date:
  • Size: 154.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for lowatt_enedis-3.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6128033f16c67c52b9efc0ee514db890c6bc5c33bcc3fdc28d98aa7216280728
MD5 51e16d03ed6a687d04129a1655a841dd
BLAKE2b-256 152a5f377ba4bdf6bcb9625ffe11e5dea07ef5116657c098028aa6229379e21c

See more details on using hashes here.

Provenance

The following attestation bundles were made for lowatt_enedis-3.2.0-py3-none-any.whl:

Publisher: release.yml on lowatt/lowatt-enedis

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page