Metadata-Version: 2.4
Name: bpdb
Version: 1.5.0
Summary: A Python module for Bangladesh Power Development Board (BPDB) Smart Meters
Author-email: Md Minhazul Haque <mdminhazulhaque@gmail.com>
Maintainer-email: Md Minhazul Haque <mdminhazulhaque@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/mdminhazulhaque/python-bpdb
Project-URL: Repository, https://github.com/mdminhazulhaque/python-bpdb
Project-URL: Bug Reports, https://github.com/mdminhazulhaque/python-bpdb/issues
Project-URL: Source Code, https://github.com/mdminhazulhaque/python-bpdb
Keywords: bpdb,smart-meter,electricity,bangladesh,power,utility,cli
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: End Users/Desktop
Classifier: Topic :: Utilities
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Typing :: Typed
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.28.0
Requires-Dist: click>=8.0.0
Requires-Dist: tabulate>=0.9.0
Requires-Dist: configparser>=5.0.0

# 🔌 BPDB Smart Meter CLI

[![PyPI version](https://badge.fury.io/py/bpdb.svg)](https://badge.fury.io/py/bpdb)
[![Python Versions](https://img.shields.io/pypi/pyversions/bpdb.svg)](https://pypi.org/project/bpdb/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Downloads](https://pepy.tech/badge/bpdb)](https://pepy.tech/project/bpdb)

## Overview

The `bpdb` is a Python module designed for reading and interacting with Bangladesh Power Development Board (BPDB) smart meters through an HTTP API. It provides a simple interface for retrieving consumer details and recharge data.

## Installation

```bash
pip install bpdb
```

## CLI Usage

### Send OTP

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

### Login

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

### Recharge Info

```ini
$ 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

```ini
$ 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.
