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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iec_api-0.5.14-py3-none-any.whl (68.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: iec_api-0.5.14.tar.gz
  • Upload date:
  • Size: 190.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for iec_api-0.5.14.tar.gz
Algorithm Hash digest
SHA256 8c005593d3c0e8a22908f18feee78d01309b995cf9719cd7d2658abb8855b787
MD5 d4b6633962372778fcc77678c04f85ec
BLAKE2b-256 6cbd7972d9240536028e4b715245af29a6776edf2e0821eb82bb416ba733ff2d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: iec_api-0.5.14-py3-none-any.whl
  • Upload date:
  • Size: 68.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for iec_api-0.5.14-py3-none-any.whl
Algorithm Hash digest
SHA256 5c5d6cab5386799b12f6f92e6771d5654ea8ca59e315021f655637051190b562
MD5 648963152deb1b238e1c1167e56d19fd
BLAKE2b-256 e96049bb6b87a9296d65cca8451703a978702a7eda5101b1862a4612fde9374a

See more details on using hashes here.

Supported by

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