Metadata-Version: 2.4
Name: dpdc
Version: 1.3.0
Summary: A Python CLI tool for Dhaka Power Distribution Company Limited (DPDC) prepaid electricity accounts
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-dpdc
Project-URL: Repository, https://github.com/mdminhazulhaque/python-dpdc
Project-URL: Bug Reports, https://github.com/mdminhazulhaque/python-dpdc/issues
Project-URL: Source Code, https://github.com/mdminhazulhaque/python-dpdc
Keywords: dpdc,electricity,prepaid,bangladesh,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

# 🔌 DPDC Prepaid CLI

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

A Python CLI tool to collect information about **Dhaka Power Distribution Company Limited (DPDC)** prepaid electricity accounts. Get real-time balance, customer information, and account details directly from your terminal.

## ✨ Features

- 💰 **Balance Check**: Get current balance and account information
- 👤 **Customer Info**: Retrieve detailed customer and meter information
- 🔐 **Secure Authentication**: Automatic token-based authentication with DPDC API
- 🚀 **Fast & Lightweight**: Built with Python and designed for speed
- 🔒 **GraphQL API**: Modern API integration with DPDC's official endpoints

## 📦 Installation

### From PyPI (Recommended)
```bash
pip install dpdc
```

### From Source
```bash
git clone https://github.com/mdminhazulhaque/python-dpdc.git
cd python-dpdc
pip install -e .
```

## 🚀 Quick Start

After installation, use the `dpdc-cli` command:

```bash
# Get help
dpdc-cli --help

# Check balance
dpdc-cli get-balance -c YOUR_CUSTOMER_NUMBER

# Get customer information
dpdc-cli get-customer-info -c YOUR_CUSTOMER_NUMBER
```

## 📖 Usage

```
Usage: dpdc-cli [OPTIONS] COMMAND [ARGS]...

  A CLI tool for DPDC Prepaid electricity account management.

Options:
  --help  Show this message and exit.

Commands:
  get-balance        Get current account balance and customer information
  get-customer-info  Get detailed customer information
```

## 💡 Examples

### 💰 Check Balance

Get your current account balance and information:

```bash
$ dpdc-cli get-balance -c 1234567890
```

**Sample Output:**
```
accountId            1234567890
accountType          Pre Paid
balanceRemaining     1250.50
connectionStatus     Active
```

### 👤 Get Customer Information

Retrieve comprehensive customer details:

```bash
$ dpdc-cli get-customer-info -c 1234567890
```

**Sample Output:**
```
accountId            1234567890
customerName         MD. JOHN DOE
customerClass        Residential
mobileNumber         01234567890
```

## 🛠️ Development

### Prerequisites

- Python 3.8 or higher
- pip package manager

### Setting up for Development

1. Clone the repository:
```bash
git clone https://github.com/mdminhazulhaque/python-dpdc.git
cd python-dpdc
```

2. Create a virtual environment:
```bash
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
```

3. Install in development mode:
```bash
pip install -e .
```

### Dependencies

- `requests` - HTTP library for API calls
- `click` - Command line interface framework
- `tabulate` - Pretty-print tabular data

## 🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

1. Fork the project
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request

## 📄 License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## ⚠️ Disclaimer

This is an unofficial tool. Use at your own discretion. The authors are not responsible for any issues that may arise from using this tool.
