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.8.tar.gz (34.1 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: iec_api-0.4.8.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.8.tar.gz
Algorithm Hash digest
SHA256 ae18feb945b9b1065768d5e22be03874482e3482fdc66623e994eba18ec039ca
MD5 8ab957bcb91be7d2ebe972fbb9af7c39
BLAKE2b-256 9fd4f552b3d970f27192d23dbe66021d6e1d3b885b6a13adcdb356e36c9dfcff

See more details on using hashes here.

File details

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

File metadata

  • Download URL: iec_api-0.4.8-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.8-py3-none-any.whl
Algorithm Hash digest
SHA256 3025274d2edc6b35782922d2fdd7880a060d2a261abace132d6d0a14a0c1ea6a
MD5 67881543d416be1a480af6f54f47c005
BLAKE2b-256 1716a9b3c7a3589c7fc1cb12326af841de9fe1b838a7da003be3eb6d170e79d2

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