Skip to main content

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

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-2.0.0.tar.gz (102.6 kB view details)

Uploaded Source

Built Distribution

lowatt_enedis-2.0.0-py3-none-any.whl (121.9 kB view details)

Uploaded Python 3

File details

Details for the file lowatt-enedis-2.0.0.tar.gz.

File metadata

  • Download URL: lowatt-enedis-2.0.0.tar.gz
  • Upload date:
  • Size: 102.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for lowatt-enedis-2.0.0.tar.gz
Algorithm Hash digest
SHA256 ca588c8173c7c3e157a2ef3b4c502343acfd883aa1ff23add7b53d1af769fb91
MD5 d12aebcf4ce6788a522a0616122a022a
BLAKE2b-256 b5209a2493ea549d374fcd7f685b19fb7f6f36695be17783ca39a0cfc3c0ea61

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lowatt_enedis-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 121.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for lowatt_enedis-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 876f513daf71c9986d08692b5508c743fe031a1426b9424bee11af62948b3661
MD5 2f8c571ad53431654315818e06c2863e
BLAKE2b-256 5648928202b60f36f1308a5b9ad02c57692f5ee2870239a3a88509fcc9f75491

See more details on using hashes here.

Supported by

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