iec-api


Nameiec-api JSON
Version 0.4.10 PyPI version JSON
download
home_pagehttps://github.com/GuyKh/py-iec-api
SummaryA Python wrapper for Israel Electric Company API
upload_time2024-12-03 11:53:28
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/84/30/839c42a3045e6b9686dc3fc5d098b55d96e2049bfe955ac011aa77829b1b/iec_api-0.4.10.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.10",
    "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": "03426c3a9cea993f3fc1340283f50b96d6fd7e771b8eca0c0371a72ac575782c",
                "md5": "4f74052ec2032eb9de74d6e8100b58dc",
                "sha256": "bd422c063ca4234b70a785d8e40d3ac385597412f66c7e31981fa4e0e2d431e8"
            },
            "downloads": -1,
            "filename": "iec_api-0.4.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4f74052ec2032eb9de74d6e8100b58dc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 52483,
            "upload_time": "2024-12-03T11:53:27",
            "upload_time_iso_8601": "2024-12-03T11:53:27.321393Z",
            "url": "https://files.pythonhosted.org/packages/03/42/6c3a9cea993f3fc1340283f50b96d6fd7e771b8eca0c0371a72ac575782c/iec_api-0.4.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8430839c42a3045e6b9686dc3fc5d098b55d96e2049bfe955ac011aa77829b1b",
                "md5": "c0d7ad993a1973f6da38e665b98d3271",
                "sha256": "1cfbc3a23d1f761eedf34f94421788ad8642aa07549c5d637bdf14b079bcbd75"
            },
            "downloads": -1,
            "filename": "iec_api-0.4.10.tar.gz",
            "has_sig": false,
            "md5_digest": "c0d7ad993a1973f6da38e665b98d3271",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 34132,
            "upload_time": "2024-12-03T11:53:28",
            "upload_time_iso_8601": "2024-12-03T11:53:28.454262Z",
            "url": "https://files.pythonhosted.org/packages/84/30/839c42a3045e6b9686dc3fc5d098b55d96e2049bfe955ac011aa77829b1b/iec_api-0.4.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-03 11:53:28",
    "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: 1.28619s