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.5.tar.gz
(34.1 kB
view details)
Built Distribution
iec_api-0.4.5-py3-none-any.whl
(52.4 kB
view details)
File details
Details for the file iec_api-0.4.5.tar.gz
.
File metadata
- Download URL: iec_api-0.4.5.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 | 671f4216e7c792c5996f0eee5e4631c45442110b58c795c73426e5953dd7d236 |
|
MD5 | 3a897abe76884248f0e459ed421807df |
|
BLAKE2b-256 | 858c655954e60c8879e19e0b592e84c21b19de86e142c4b58b35f3c08bb80c8c |
File details
Details for the file iec_api-0.4.5-py3-none-any.whl
.
File metadata
- Download URL: iec_api-0.4.5-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 | 5911389664d37c6cade78c3c29d65bff89644aeec0802a52e02a737948d13487 |
|
MD5 | bf110f44d519fec0daed207ced4a7da6 |
|
BLAKE2b-256 | 8a9fb0c689f1f5678ea1c0aac7a6176f8359480300029c76de71a50fddaeb370 |