Skip to main content

A Python module for Bangladesh Power Development Board (BPDB) Smart Meters

Project description

bpdb

Overview

The bpdb is a Python module designed for reading and interacting with smart meters through an HTTP API. It provides a simple interface for retrieving consumer details and last recharge data.

Installation

pip install bpdb

CLI Usage

Send OTP

$ bpdb-cli send-otp 01710123456
OTP sent to 01710123456

Login

$ bpdb-cli login 01710123456 123456
Logged in with phone number 01710123456

Recharge Info

$ bpdb-cli recharge-info 01710123456 0120100112233
+---------------------+--------------+-------------+--------------------------+
|        Date         | Gross Amount | Energy Cost |          Tokens          |
+---------------------+--------------+-------------+--------------------------+
| 2024-05-01 16:15:04 |     5000     |   4662.19   | 1111-2222-3333-4444-5555 |
| 2024-10-01 17:47:27 |     5000     |   4281.47   | 1111-2222-3333-4444-5555 |
| 2025-01-01 23:41:46 |     5000     |   4785.47   | 1111-2222-3333-4444-5555 |
+---------------------+--------------+-------------+--------------------------+

Consumer Info

$ bpdb-cli consumer-info                         
+------------------+--------------------+
|     Division     |      Mymensingh    |
|    Meter Type    |          1P        |
|   Account Type   |   Active (Prepaid) |
|   S&D Division   |   S&D Kishoreganj  |
|  Sanction Load   |          4         |
|  Customer Name   | MD. ABDUL HANNAN   |
| Customer Address |      BOTTIRISH     |
| Tariff Category  |    Tariff : LT-A   |
+------------------+--------------------+

Contributing

Contributions are welcome! If you have suggestions for improvements or find bugs, please open an issue or submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bpdb-0.0.3.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bpdb-0.0.3-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file bpdb-0.0.3.tar.gz.

File metadata

  • Download URL: bpdb-0.0.3.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for bpdb-0.0.3.tar.gz
Algorithm Hash digest
SHA256 40a892b66fb1b0c7423fa27facb9fcd3af84e93ad7dead6496d8f91fce1aa1e3
MD5 3c7af639444f8e84436253fc2ffe6c13
BLAKE2b-256 05c78bda1e8bc461469a64cac0297f907062429f90007d8cf976f7b5e50db382

See more details on using hashes here.

Provenance

The following attestation bundles were made for bpdb-0.0.3.tar.gz:

Publisher: pypi.yml on mdminhazulhaque/python-bpdb

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bpdb-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: bpdb-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for bpdb-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6d97f9b6904a93a3a0c03bc6d02f2f2058a01a0aab2e58d06f305a173b5194ff
MD5 a2864679630b2316dd71ef8eea1a4765
BLAKE2b-256 858a60b800a81e8dac005c74290a1c1572d574fca6ee22a82286d89598179a31

See more details on using hashes here.

Provenance

The following attestation bundles were made for bpdb-0.0.3-py3-none-any.whl:

Publisher: pypi.yml on mdminhazulhaque/python-bpdb

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page