# iec-api
A python wrapper for Israel Electric Company API
## Module Usage
```python
from iec_api import iec_client as iec
client = iec.IecClient("123456789")
try:
await client.manual_login() # login with user inputs
except iec.exceptions.IECError as err:
logger.error(f"Failed Login: (Code {err.code}): {err.error}")
raise
customer = await client.get_customer()
print(customer)
contracts = await client.get_contracts()
for contract in contracts:
print(contract)
reading = await client.get_last_meter_reading(customer.bp_number, contracts[0].contract_id)
print(reading)
```
## Postman
To use the API manually through Postman - read [Postman Collection Guide](POSTMAN.md)
Raw data
{
"_id": null,
"home_page": "https://github.com/GuyKh/py-iec-api",
"name": "iec-api",
"maintainer": "Guy Khmelnitsky",
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": "guykhmel@gmail.com",
"keywords": "python, poetry, api, iec, israel, electric",
"author": "GuyKh",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/42/d9/a310ea7cfc09ee7cd5ff3f66bece3e923228fdbc4f45680b67f11d802c58/iec_api-0.4.9.tar.gz",
"platform": null,
"description": "# iec-api\n\nA python wrapper for Israel Electric Company API\n\n## Module Usage\n\n```python\nfrom iec_api import iec_client as iec\n\nclient = iec.IecClient(\"123456789\")\ntry:\n await client.manual_login() # login with user inputs\nexcept iec.exceptions.IECError as err:\n logger.error(f\"Failed Login: (Code {err.code}): {err.error}\")\n raise\n\ncustomer = await client.get_customer()\nprint(customer)\n\ncontracts = await client.get_contracts()\nfor contract in contracts:\n print(contract)\n\nreading = await client.get_last_meter_reading(customer.bp_number, contracts[0].contract_id)\nprint(reading)\n\n```\n\n\n## Postman\nTo use the API manually through Postman - read [Postman Collection Guide](POSTMAN.md)",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Python wrapper for Israel Electric Company API",
"version": "0.4.9",
"project_urls": {
"Homepage": "https://github.com/GuyKh/py-iec-api",
"Repository": "https://github.com/GuyKh/py-iec-api"
},
"split_keywords": [
"python",
" poetry",
" api",
" iec",
" israel",
" electric"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "8903032c8b655d9372b3b05da3e00ef99d1df6e655c81257ede5cdca0a522631",
"md5": "518ec91a6c23da505c2c695aba5e7204",
"sha256": "95f871466eac613833cd341f089ab104c841a5654f8de2f3f0c1c4272acc1fed"
},
"downloads": -1,
"filename": "iec_api-0.4.9-py3-none-any.whl",
"has_sig": false,
"md5_digest": "518ec91a6c23da505c2c695aba5e7204",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 52431,
"upload_time": "2024-11-10T10:22:40",
"upload_time_iso_8601": "2024-11-10T10:22:40.782420Z",
"url": "https://files.pythonhosted.org/packages/89/03/032c8b655d9372b3b05da3e00ef99d1df6e655c81257ede5cdca0a522631/iec_api-0.4.9-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "42d9a310ea7cfc09ee7cd5ff3f66bece3e923228fdbc4f45680b67f11d802c58",
"md5": "43230e19408cdffd92cec52b2da324c6",
"sha256": "142bf3ed2d2031da8ff790ac72f3f6504f6b1facbe0af8b1012b8ab74ec873a8"
},
"downloads": -1,
"filename": "iec_api-0.4.9.tar.gz",
"has_sig": false,
"md5_digest": "43230e19408cdffd92cec52b2da324c6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 34125,
"upload_time": "2024-11-10T10:22:42",
"upload_time_iso_8601": "2024-11-10T10:22:42.556399Z",
"url": "https://files.pythonhosted.org/packages/42/d9/a310ea7cfc09ee7cd5ff3f66bece3e923228fdbc4f45680b67f11d802c58/iec_api-0.4.9.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-10 10:22:42",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "GuyKh",
"github_project": "py-iec-api",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"lcname": "iec-api"
}