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
Release history Release notifications | RSS feed
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.7.tar.gz
(34.1 kB
view details)
Built Distribution
iec_api-0.4.7-py3-none-any.whl
(52.4 kB
view details)
File details
Details for the file iec_api-0.4.7.tar.gz
.
File metadata
- Download URL: iec_api-0.4.7.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4c16ac3cbc6e9c1ee1798e7c9a246b6764802a47a18e8f16e5e1bf6cf567fd6 |
|
MD5 | 517dab2b539c687987a7b2f9c5ee05ef |
|
BLAKE2b-256 | f670f08967b8e65a030f0006069b47ced8c4a96359e0e2be67358a6e6ed4b24a |
File details
Details for the file iec_api-0.4.7-py3-none-any.whl
.
File metadata
- Download URL: iec_api-0.4.7-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e21ccc4fa10622cf7f736c8f41000d235a65224a33e0828e128df19780088e5 |
|
MD5 | f2dface7e1909b7248998de798c1c6e6 |
|
BLAKE2b-256 | 365971e3eb3a13ec05c7647a99c4a721f64ae763fd778c3fd5fb176fbf287570 |