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.6.tar.gz
(34.1 kB
view details)
Built Distribution
iec_api-0.4.6-py3-none-any.whl
(52.4 kB
view details)
File details
Details for the file iec_api-0.4.6.tar.gz
.
File metadata
- Download URL: iec_api-0.4.6.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 | 10a5dc76c21bde8d123edcebcb4af3277770505ce0a1177d933ebd9f8cf14460 |
|
MD5 | 76f3c06a28b2f7d4da82a20e1bdde79d |
|
BLAKE2b-256 | f32aedd653c8f81c67ebb721648bc1209b64b71233571991bd8ca08e368fbe0d |
File details
Details for the file iec_api-0.4.6-py3-none-any.whl
.
File metadata
- Download URL: iec_api-0.4.6-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 | d84936788d3ee51b271de9da1fc52cc25a6f0fbbdaaea68fea90418d8dfc6492 |
|
MD5 | 56081811b3267b0a740cc0645c6b5ed9 |
|
BLAKE2b-256 | d5e2f042309acc8eb81736fb0599896854951ec18a2460bbe6920106ce819ade |