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.12.tar.gz (172.8 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.12-py3-none-any.whl (67.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: iec_api-0.5.12.tar.gz
  • Upload date:
  • Size: 172.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","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.12.tar.gz
Algorithm Hash digest
SHA256 62cf188445d7d7ce6c9fbb8b424857c91a8e44f843e0cebf649696afc08dfbef
MD5 3ffcafc360cc1a3d8e9e19cf3b76f63f
BLAKE2b-256 17fa5487277561cb0df98d72f282719c786ca52e717b7f756884434238321e40

See more details on using hashes here.

File details

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

File metadata

  • Download URL: iec_api-0.5.12-py3-none-any.whl
  • Upload date:
  • Size: 67.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","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.12-py3-none-any.whl
Algorithm Hash digest
SHA256 e72f161ecd6f8f7dbc7ab698b51d6dd325576b4929816143012defa23703e478
MD5 a939f58fa3f13cf26f4164f1c60a9b16
BLAKE2b-256 37441e51dfa497b779d775cab24ceaa887a8d8fc13d3917013f1c0180e31fd01

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