Skip to main content

A Python CLI tool for Dhaka Power Distribution Company Limited (DPDC) prepaid electricity accounts

Project description

🔌 DPDC Prepaid CLI

PyPI version Python Versions License: MIT Downloads

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
customerName         MD. JOHN DOE
customerClass        Residential
mobileNumber         01712345678
emailId              customer@example.com
accountType          Prepaid
balanceRemaining     1250.50
connectionStatus     Active
customerType         Domestic
minRecharge          100

👤 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         01712345678
emailId              customer@example.com
accountType          Prepaid
balanceRemaining     1250.50
connectionStatus     Active
customerType         Domestic
minRecharge          100

🛠️ Development

Prerequisites

  • Python 3.8 or higher
  • pip package manager

Setting up for Development

  1. Clone the repository:
git clone https://github.com/mdminhazulhaque/python-dpdc.git
cd python-dpdc
  1. Create a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install in development mode:
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 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dpdc-1.1.0.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dpdc-1.1.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file dpdc-1.1.0.tar.gz.

File metadata

  • Download URL: dpdc-1.1.0.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dpdc-1.1.0.tar.gz
Algorithm Hash digest
SHA256 9e6c69c3390f29acad6b36a6c9569e5c8550005eab3cf7dab98ae8c32d645f8a
MD5 f8d138b23b8ae6c2aa91e140e8f784f4
BLAKE2b-256 32437d83e98657335ebdfcfefc62d68788aab31123440554b22c8814e341045e

See more details on using hashes here.

Provenance

The following attestation bundles were made for dpdc-1.1.0.tar.gz:

Publisher: pypi.yml on mdminhazulhaque/python-dpdc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dpdc-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: dpdc-1.1.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

Hashes for dpdc-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ad1006e9ac72a5358ea814bc5b1bf6bf77d5362bdbe37bb0883cdecb09a77d52
MD5 5b393b31eba127897c3a76ea9a0efc0f
BLAKE2b-256 883ecae880aadf151e3efde0f5c42e46e0dfce4e965f9e5ec95a52682bf76b13

See more details on using hashes here.

Provenance

The following attestation bundles were made for dpdc-1.1.0-py3-none-any.whl:

Publisher: pypi.yml on mdminhazulhaque/python-dpdc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page