🔌 DPDC Prepaid CLI
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)
pip install dpdc
From Source
git clone https://github.com/mdminhazulhaque/python-dpdc.git
cd python-dpdc
pip install -e .
🚀 Quick Start
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_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:
$ 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:
$ 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
- 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 .
Dependencies
requests- HTTP library for API callsclick- Command line interface frameworktabulate- 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.
- 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
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
⚠️ Disclaimer
This is an independent, unofficial tool and is not affiliated with, endorsed by, or connected to the Dhaka Power Distribution Company (DPDC).
Every piece of information this tool retrieves is already publicly available to any consumer through the official customer portal and mobile app. This project does not reverse engineer, bypass, or circumvent anything — it simply accesses the same publicly accessible consumer information programmatically and presents it in a convenient format.
Please only look up accounts you are authorized to access. Use at your own discretion; the authors are not responsible for any issues that may arise from using this tool.
Metadata
Release files for dpdc 1.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dpdc-1.4.0.tar.gz | 6.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dpdc-1.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.6 kB
Release files / dpdc-1.4.0.tar.gz
| Download URL | dpdc-1.4.0.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1c3d3294632417811b9e98e8536cd010050adbc9a4e5af8690fc88dffb472277
|
|
BLAKE2b-256 checksum How to use checksums |
4926112823154ed7dc6139eb667b5446ebc415a44a9d877297eae87ae5bea46b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 10, 2026.
Transparency logRelease files / dpdc-1.4.0-py3-none-any.whl
| Download URL | dpdc-1.4.0-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d93adfd342e5d9d1b4aceba76e468ac38474de7fc8aa8528c580f4d075fee0ed
|
|
BLAKE2b-256 checksum How to use checksums |
a8c5c667759a9851353ed6fbd54cb7476f775e9fec834ae1487271341948555a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 10, 2026.
Transparency log