# 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/89/e7/667feab101bdf6c8bd1731eeea5d6b0cbb5baea5c96586083a3a8953e6ec/iec_api-0.4.12.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.12",
"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": "85e1cff1c5cb6d0f6aad56c3e4984d5fa4fc24ccf52436a6cad595ae78a3f8a0",
"md5": "f37c939be0f93287895adb6b6f5b0445",
"sha256": "27b027c33caf1ae7d973f85e8c38f67c163c84c16eb83613bcfb88801988395f"
},
"downloads": -1,
"filename": "iec_api-0.4.12-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f37c939be0f93287895adb6b6f5b0445",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 52742,
"upload_time": "2025-08-10T09:03:38",
"upload_time_iso_8601": "2025-08-10T09:03:38.340860Z",
"url": "https://files.pythonhosted.org/packages/85/e1/cff1c5cb6d0f6aad56c3e4984d5fa4fc24ccf52436a6cad595ae78a3f8a0/iec_api-0.4.12-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "89e7667feab101bdf6c8bd1731eeea5d6b0cbb5baea5c96586083a3a8953e6ec",
"md5": "e0155b9079922a2868a25298ed20aa3e",
"sha256": "4a4b42a592b205d3dfc7130a25262a9a260310348f637c946ae523e46e005301"
},
"downloads": -1,
"filename": "iec_api-0.4.12.tar.gz",
"has_sig": false,
"md5_digest": "e0155b9079922a2868a25298ed20aa3e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 33237,
"upload_time": "2025-08-10T09:03:39",
"upload_time_iso_8601": "2025-08-10T09:03:39.545035Z",
"url": "https://files.pythonhosted.org/packages/89/e7/667feab101bdf6c8bd1731eeea5d6b0cbb5baea5c96586083a3a8953e6ec/iec_api-0.4.12.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-10 09:03:39",
"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"
}