# lowatt-enedis
A command-line tool and Python library to access
[Enedis](https://www.enedis.fr/) SGE SOAP web-services, provided by
[LOWATT](https://www.lowatt.fr).
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 :
```python
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](https://github.com/lowatt/lowatt_enedis).
Feel free to contact for more info by writing at info@lowatt.fr.
## Sponsors
[](https://www.qosenergy.com/)
Raw data
{
"_id": null,
"home_page": "https://github.com/lowatt/lowatt-enedis",
"name": "lowatt-enedis",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": "",
"keywords": "",
"author": "Lowatt",
"author_email": "info@lowatt.fr",
"download_url": "https://files.pythonhosted.org/packages/46/32/e41c76f5e4d5a35912ac5fab8ba6a18ce3351d97a763b3125ed4a371650d/lowatt-enedis-2.2.3.tar.gz",
"platform": null,
"description": "# lowatt-enedis\n\nA command-line tool and Python library to access\n[Enedis](https://www.enedis.fr/) SGE SOAP web-services, provided by\n[LOWATT](https://www.lowatt.fr).\n\nDisclaimer: this package is *NOT* affiliated to Enedis, but provided by Lowatt\nin case it could be useful to other users of the SGE web-services provided by\nEnedis.\n\n## Licensing\n\nIt is published under the terms of the GPL 3 license.\n\n## Installation\n\n``pip install lowatt-enedis``\n\n## Command line usage\n\nSee ``lowatt-enedis --help`` for CLI usage. You'll be able to call the services\ncontrolled using options and see the SOAP response. You can take a look at\n``doc/homologation.md`` for a sample session to go through Enedis'homologation\nprocess.\n\nSome flags are required by all or most of the commands so they can be\nconfigured once by their respective environment variables.\n\n| Option | Environment variable |\n|---------------|----------------------|\n| `--cert-file` | `ENEDIS_CERT_FILE` |\n| `--key-file` | `ENEDIS_KEY_FILE` |\n| `--login` | `ENEDIS_LOGIN` |\n| `--contrat` | `ENEDIS_CONTRAT` |\n\n## Python library usage\n\nHere is a sample code to access to the ``ConsultationMesuresDetaillees`` from\nPython code :\n\n```python\nimport datetime\nimport lowatt_enedis\nimport lowatt_enedis.services\n\nconfig = {\n 'login': 'you@example.com',\n 'certificateFile': 'fullchain.pem',\n 'keyFile': 'privkey.pem',\n 'prm': '30000123456789',\n}\n# get client for the 'details' service using appropriate client\n# certificate and key\nclient = lowatt_enedis.get_client(\n lowatt_enedis.COMMAND_SERVICE['details'][0],\n config['certificateFile'], config['keyFile'],\n)\n# actually call the web to get values for the past week\nresp = lowatt_enedis.services.point_detailed_measures(client, {\n 'login': config['login'],\n 'prm': config['prm'],\n 'type': 'COURBE',\n 'courbe_type': 'PA',\n 'corrigee': True,\n 'from': datetime.date.today() - datetime.timedelta(days=7),\n 'to': datetime.date.today(),\n})\n# get a list of (UTC timestamp, value(W))\ndata = lowatt_enedis.services.measures_resp2py(resp)\n```\n\n## Contributions\n\nContribution are welcome through the [Github\nrepository](https://github.com/lowatt/lowatt_enedis).\n\nFeel free to contact for more info by writing at info@lowatt.fr.\n\n## Sponsors\n\n[](https://www.qosenergy.com/)\n",
"bugtrack_url": null,
"license": "GPL3",
"summary": "Query Enedis SGE web-service",
"version": "2.2.3",
"project_urls": {
"Homepage": "https://github.com/lowatt/lowatt-enedis"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "0488d2d7336adab839d3a7ed426dce3c48731a2123a51e47703a7edd838bcca1",
"md5": "37750668e76c4e25282b16408225d789",
"sha256": "e61470ba1002ee5325b5205d65c0ac8b3ec1ffac4f0e2f4909222a7e1e2ed51c"
},
"downloads": -1,
"filename": "lowatt_enedis-2.2.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "37750668e76c4e25282b16408225d789",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 142796,
"upload_time": "2023-10-24T07:37:24",
"upload_time_iso_8601": "2023-10-24T07:37:24.707690Z",
"url": "https://files.pythonhosted.org/packages/04/88/d2d7336adab839d3a7ed426dce3c48731a2123a51e47703a7edd838bcca1/lowatt_enedis-2.2.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4632e41c76f5e4d5a35912ac5fab8ba6a18ce3351d97a763b3125ed4a371650d",
"md5": "2e3cfd0f0b8e60ea43b75889c8ac52c3",
"sha256": "467f2ecd82460c9d9da2b1e7e6c5605b8d07493258491ce345314812f314f437"
},
"downloads": -1,
"filename": "lowatt-enedis-2.2.3.tar.gz",
"has_sig": false,
"md5_digest": "2e3cfd0f0b8e60ea43b75889c8ac52c3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 126287,
"upload_time": "2023-10-24T07:37:26",
"upload_time_iso_8601": "2023-10-24T07:37:26.659078Z",
"url": "https://files.pythonhosted.org/packages/46/32/e41c76f5e4d5a35912ac5fab8ba6a18ce3351d97a763b3125ed4a371650d/lowatt-enedis-2.2.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-24 07:37:26",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "lowatt",
"github_project": "lowatt-enedis",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "lowatt-enedis"
}