Skip to main content

tnb_bill

A Python package to calculate TNB electricity bills based on usage, with support for KWTBB and SST.

How to install in Google Colab

!pip install tnb_bill

Example of usage

from tnb_bill import calculate_electricity_bill

total_usage_kwh = 1400
days = 30
bill_amount, sst, kwtbb, total_bill = calculate_electricity_bill(total_usage_kwh, days)

print(f"Bill Amount : RM {bill_amount:.2f}")
print(f"SST : {sst:.2f}")
print(f"KWTBB : {kwtbb:.2f}")
print(f"Total Electricity Bill (including 6% SST) for {total_usage_kwh} kWh is: RM {total_bill:.2f}")

Release files for tnb-bill 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tnb-bill 0.2
File Size Uploaded
tnb_bill-0.2.tar.gz 2.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tnb-bill 0.2
File Interpreter ABI Platform
tnb_bill-0.2-py3-none-any.whl Python 3 none any Details

Total release size: 4.4 kB

Release files / tnb_bill-0.2.tar.gz

Download URL tnb_bill-0.2.tar.gz
Size 2.0 kB
Tags Source
SHA-256 checksum
How to use checksums
10f6a43170fe420d4820036cca1a399e65374770251e4050d3cac55a2077afe1
BLAKE2b-256 checksum
How to use checksums
d79afaa3fd7d990b333bb337c7d3e386f7e1fb5058fb08ee2dc21a724de64d81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.7

Release files / tnb_bill-0.2-py3-none-any.whl

Download URL tnb_bill-0.2-py3-none-any.whl
Size 2.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ef77b352e80d9ba8cf823acef81a7904506e71fc1dfd999dff4d9d139a8fa3ab
BLAKE2b-256 checksum
How to use checksums
6552045cb0aae5d111649bf97ad0a97c35af8416c980d97515eb150134f70be0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.7

Release history Release notifications | RSS feed

This release

0.2 This release

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page