Skip to main content

A Python wrapper for Israel Electric Company API

Project description

iec-api

A python wrapper for Israel Electric Company API

Module Usage

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iec_api-0.4.9.tar.gz (34.1 kB view details)

Uploaded Source

Built Distribution

iec_api-0.4.9-py3-none-any.whl (52.4 kB view details)

Uploaded Python 3

File details

Details for the file iec_api-0.4.9.tar.gz.

File metadata

  • Download URL: iec_api-0.4.9.tar.gz
  • Upload date:
  • Size: 34.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.11.10 Linux/6.5.0-1025-azure

File hashes

Hashes for iec_api-0.4.9.tar.gz
Algorithm Hash digest
SHA256 142bf3ed2d2031da8ff790ac72f3f6504f6b1facbe0af8b1012b8ab74ec873a8
MD5 43230e19408cdffd92cec52b2da324c6
BLAKE2b-256 42d9a310ea7cfc09ee7cd5ff3f66bece3e923228fdbc4f45680b67f11d802c58

See more details on using hashes here.

File details

Details for the file iec_api-0.4.9-py3-none-any.whl.

File metadata

  • Download URL: iec_api-0.4.9-py3-none-any.whl
  • Upload date:
  • Size: 52.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.11.10 Linux/6.5.0-1025-azure

File hashes

Hashes for iec_api-0.4.9-py3-none-any.whl
Algorithm Hash digest
SHA256 95f871466eac613833cd341f089ab104c841a5654f8de2f3f0c1c4272acc1fed
MD5 518ec91a6c23da505c2c695aba5e7204
BLAKE2b-256 8903032c8b655d9372b3b05da3e00ef99d1df6e655c81257ede5cdca0a522631

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page