import os from pei_tariff_api import PeiTariffApi client = PeiTariffApi(os.environ["PEI_API_KEY"]) print(client.health()) print(client.calculate({ "state_code": "BR", "subcategory_code": "BR_DS_II", "energy_units": 126, "connected_load": "1", "billing_days": 30 })) print(client.calculate({ "state_code": "MH", "licensee_code": "MH_MSEDCL", "category_id": "MH_MSEDCL_HT_I_INDUSTRY", "subtype": "GENERAL", "financial_year": "2026-27", "billing_demand_kva": 400, "consumption_units": 10000, "timestamp": "2026-08-13T18:00:00+05:30" })) print("ODISHA DOMESTIC") print(client.calculate({ "state_code": "OD", "licensee_code": "OD_TPCODL", "subcategory_code": "DOMESTIC", "energy_units": 100, "load_kw": 1, "billing_date": "2026-08-01" })) print("ODISHA GROSS METERING") print(client.calculate({ "state_code": "OD", "licensee_code": "OD_TPCODL", "subcategory_code": "DOMESTIC", "energy_units": 100, "load_kw": 1, "billing_date": "2026-08-01", "metering_mode": "gross_metering", "generation_kwh": 150 }))