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

Limitations

For now it implements the following web services:

  • RecherchePoint-v2.0
  • ConsultationDonneesTechniquesContractuelles-v1.0
  • ConsultationMesures-v1.1
  • ConsultationMesuresDetaillees-v2.0
  • CommandeTransmissionHistoriqueMesures-v1.0
  • CommandeTransmissionDonneesInfraJ-v1.0

In other words, CommandeCollectePublicationMesures, RechercheServicesSouscritsMesures, and CommandeArretServiceSouscritMesures are not yet implemented.

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.sh for a sample session to go through Enedis'homologation process.

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': 'api.sge@lowatt.fr',
    '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-1.0.tar.gz (78.6 kB view details)

Uploaded Source

Built Distribution

lowatt_enedis-1.0-py3-none-any.whl (87.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lowatt-enedis-1.0.tar.gz
  • Upload date:
  • Size: 78.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for lowatt-enedis-1.0.tar.gz
Algorithm Hash digest
SHA256 db142cbe90f72dbde7507117f0e62b282b3096b6f9162666de9ce8bc1fd14289
MD5 7d54fb37fc9e0e31e7332f531baf4f3d
BLAKE2b-256 872baeaa9e217fe62c05eac07091bd7fa6600f8e059868047038e5bd1cf087ed

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lowatt_enedis-1.0-py3-none-any.whl
  • Upload date:
  • Size: 87.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for lowatt_enedis-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b75002da473772492dec16f89f645fc2085fc91aefae99f84081bcddf1458fe9
MD5 e4f319c63f46bc2c48deca62c7d65713
BLAKE2b-256 2f7af5cf7fc599a5bf2a369107eaa95e9479d2bbd5831093732602938f50c9a4

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