iec-api


Nameiec-api JSON
Version 0.4.11 PyPI version JSON
download
home_pagehttps://github.com/GuyKh/py-iec-api
SummaryA Python wrapper for Israel Electric Company API
upload_time2025-07-10 09:17:07
maintainerGuy Khmelnitsky
docs_urlNone
authorGuyKh
requires_python<4.0,>=3.10
licenseMIT
keywords python poetry api iec israel electric
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # 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/14/47/acd07721186ac26ba94800fa762478781257f905b89ea936f18375b2b187/iec_api-0.4.11.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.11",
    "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": "4d1f1d8eb842727efa829219784dd81f07031248c2e4a2a25cc13d5ea8a09e71",
                "md5": "e8d625d2960450a9b05bf3f7f907014e",
                "sha256": "18f50b8ce0d047a22469c83ea6b4a245c01004b2308f1143b8f161a024f66098"
            },
            "downloads": -1,
            "filename": "iec_api-0.4.11-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e8d625d2960450a9b05bf3f7f907014e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 52564,
            "upload_time": "2025-07-10T09:17:06",
            "upload_time_iso_8601": "2025-07-10T09:17:06.037520Z",
            "url": "https://files.pythonhosted.org/packages/4d/1f/1d8eb842727efa829219784dd81f07031248c2e4a2a25cc13d5ea8a09e71/iec_api-0.4.11-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1447acd07721186ac26ba94800fa762478781257f905b89ea936f18375b2b187",
                "md5": "f31c16d4189b01897a149a5e47b8ab1c",
                "sha256": "0c217fceb6b2c80e415f69d4de4103e0b1cd7ac420f281b2033021fa14a59d7c"
            },
            "downloads": -1,
            "filename": "iec_api-0.4.11.tar.gz",
            "has_sig": false,
            "md5_digest": "f31c16d4189b01897a149a5e47b8ab1c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 33082,
            "upload_time": "2025-07-10T09:17:07",
            "upload_time_iso_8601": "2025-07-10T09:17:07.000062Z",
            "url": "https://files.pythonhosted.org/packages/14/47/acd07721186ac26ba94800fa762478781257f905b89ea936f18375b2b187/iec_api-0.4.11.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-10 09:17:07",
    "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"
}
        
Elapsed time: 0.69785s