# 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/9b/89/ef8169cc2c6d1444563c7e62fae786c13be63dc13e6874108b023a532e9f/iec_api-0.2.16.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.2.16",
"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": "e81e5e421d7443034c54da39e3068e017eaad31d7b9d6554c411a1650461bd45",
"md5": "0c8bf85fb3eaffaced178274f3036cdd",
"sha256": "7dd4dee962876daa148f057048fb19147dfac2208bd3cbea7cdf61bab803de8a"
},
"downloads": -1,
"filename": "iec_api-0.2.16-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0c8bf85fb3eaffaced178274f3036cdd",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 32383,
"upload_time": "2024-05-01T08:40:02",
"upload_time_iso_8601": "2024-05-01T08:40:02.175379Z",
"url": "https://files.pythonhosted.org/packages/e8/1e/5e421d7443034c54da39e3068e017eaad31d7b9d6554c411a1650461bd45/iec_api-0.2.16-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "9b89ef8169cc2c6d1444563c7e62fae786c13be63dc13e6874108b023a532e9f",
"md5": "0d9f67c05862662cf71ca44c227b7f25",
"sha256": "8fbf4134c32b36cd96227d38e90fc5e40a7d4a7843100d407ecfd53bdcc75eda"
},
"downloads": -1,
"filename": "iec_api-0.2.16.tar.gz",
"has_sig": false,
"md5_digest": "0d9f67c05862662cf71ca44c227b7f25",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 20920,
"upload_time": "2024-05-01T08:40:04",
"upload_time_iso_8601": "2024-05-01T08:40:04.403417Z",
"url": "https://files.pythonhosted.org/packages/9b/89/ef8169cc2c6d1444563c7e62fae786c13be63dc13e6874108b023a532e9f/iec_api-0.2.16.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-01 08:40:04",
"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"
}