A Python CLI tool for Dhaka Power Distribution Company Limited (DPDC) prepaid electricity accounts
Project description
🔌 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 unofficial tool. Use at your own discretion. The authors are not responsible for any issues that may arise from using this tool.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dpdc-1.3.0.tar.gz.
File metadata
- Download URL: dpdc-1.3.0.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4fac0d3b99da391d4785bf484ad4d1c81b01f70970051b02050561118fb90a1
|
|
| MD5 |
ba5845c14ebbbb1af4496146ec035724
|
|
| BLAKE2b-256 |
39b199e3fd5a1e0be264d373b42a4fc167b8483be5e00490274e37847268c366
|
Provenance
The following attestation bundles were made for dpdc-1.3.0.tar.gz:
Publisher:
pypi.yml on mdminhazulhaque/python-dpdc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dpdc-1.3.0.tar.gz -
Subject digest:
a4fac0d3b99da391d4785bf484ad4d1c81b01f70970051b02050561118fb90a1 - Sigstore transparency entry: 829044731
- Sigstore integration time:
-
Permalink:
mdminhazulhaque/python-dpdc@1a4350f27de6dd38b52feb8a98a9b97d1f5401ed -
Branch / Tag:
refs/heads/main - Owner: https://github.com/mdminhazulhaque
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@1a4350f27de6dd38b52feb8a98a9b97d1f5401ed -
Trigger Event:
push
-
Statement type:
File details
Details for the file dpdc-1.3.0-py3-none-any.whl.
File metadata
- Download URL: dpdc-1.3.0-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46e880de9ab0db75333a60c28d23f6b4baef40034e5f1ff089c1a78a0359b33f
|
|
| MD5 |
b0407e3b4f8df31012e95c362ec1cbb9
|
|
| BLAKE2b-256 |
dfabc1dc31336befbe9982d4c8300553030992cb2d8e66513027afe75f2f416a
|
Provenance
The following attestation bundles were made for dpdc-1.3.0-py3-none-any.whl:
Publisher:
pypi.yml on mdminhazulhaque/python-dpdc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dpdc-1.3.0-py3-none-any.whl -
Subject digest:
46e880de9ab0db75333a60c28d23f6b4baef40034e5f1ff089c1a78a0359b33f - Sigstore transparency entry: 829044737
- Sigstore integration time:
-
Permalink:
mdminhazulhaque/python-dpdc@1a4350f27de6dd38b52feb8a98a9b97d1f5401ed -
Branch / Tag:
refs/heads/main - Owner: https://github.com/mdminhazulhaque
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@1a4350f27de6dd38b52feb8a98a9b97d1f5401ed -
Trigger Event:
push
-
Statement type: