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.
- 💰 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
pip install dpdcgit clone https://github.com/mdminhazulhaque/python-dpdc.git
cd python-dpdc
pip install -e .After installation, use the dpdc-cli command:
# 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_NUMBERUsage: 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
Get your current account balance and information:
$ dpdc-cli get-balance -c 1234567890Sample Output:
accountId 1234567890
accountType Pre Paid
balanceRemaining 1250.50
connectionStatus Active
Retrieve comprehensive customer details:
$ dpdc-cli get-customer-info -c 1234567890Sample Output:
accountId 1234567890
customerName MD. JOHN DOE
customerClass Residential
mobileNumber 01234567890
- Python 3.8 or higher
- pip package manager
- Clone the repository:
git clone https://github.com/mdminhazulhaque/python-dpdc.git
cd python-dpdc- Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install in development mode:
pip install -e .requests- HTTP library for API callsclick- Command line interface frameworktabulate- Pretty-print tabular data
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.
- Fork the project
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
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.