Skip to main content

🔌 NESCO Prepaid CLI

PyPI version Python Versions License: MIT Downloads

A Python CLI tool to collect information about Northern Electric Supply Company Limited (NESCO) prepaid electricity accounts. Get real-time balance, consumption data, customer information, and recharge history directly from your terminal.

✨ Features

  • 💰 Balance Check: Get current account balance instantly
  • 👤 Customer Info: Retrieve detailed customer and meter information
  • 📊 Monthly Consumption: View historical monthly usage data
  • 🔄 Recharge History: Track your payment and recharge records with token details
  • 🚀 Fast & Lightweight: Built with Python and designed for speed
  • 🔒 Secure: Direct API integration with NESCO's official endpoints

📦 Installation

pip install nesco

From Source

git clone https://github.com/mdminhazulhaque/python-nesco.git
cd python-nesco
pip install -e .

🚀 Quick Start

After installation, use the nesco-cli command:

# Get help
nesco-cli --help

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

# Get customer information
nesco-cli get-customer-info -c YOUR_CUSTOMER_NUMBER

📖 Usage

Usage: nesco-cli [OPTIONS] COMMAND [ARGS]...

  A CLI tool for NESCO Prepaid electricity account management.

Options:
  --help  Show this message and exit.

Commands:
  get-balance              Get current account balance
  get-customer-info        Get detailed customer and meter information
  get-monthly-consumption  Get monthly consumption history
  get-recharge-history     Get recharge and payment history

💡 Examples

💰 Check Balance

Get your current account balance:

$ nesco-cli get-balance -c 12345678

Sample Output:

987.43

👤 Get Customer Information

Retrieve comprehensive customer and meter details:

$ nesco-cli get-customer-info -c 12345678

Sample Output:

------------------  ------------------
name                RAHIM UDDIN
address             Sadar
electricity_office  Example S&D
feeder_name         Example Feeder
meter_number        XXXXXXXXXXX
approved_load_kw    2
------------------  ------------------

🔄 Get Recharge History

View your recent payment and recharge transactions with token details:

$ nesco-cli get-recharge-history -c 12345678

Sample Output:

  id  token                     power    amount  via     date                  status
----  ------------------------  -------  --------  ------  --------------------  --------
   1  0183-4597-1724-6908-6354   957.12   1000     ROCKET  01-JAN-2025 11:00 AM   Success
   2  4815-9365-5179-7943-3266   258.65    400     BKASH   01-FEB-2025 11:00 PM   Success
   3  2265-9417-3127-5691-9994   134.45    400     BKASH   01-MAR-2025 11:00 PM   Success

📊 Get Monthly Consumption

Analyze your monthly electricity usage patterns:

$ nesco-cli get-monthly-consumption -c 12345678

Sample Output:

  year  month        recharge    discount    usage
------  ---------  ----------  ----------  -------
  2025  March            2000       -20    1875.22
  2025  February          500        -5     433.15
  2025  January          1000       -10     812.08

🛠️ Development

Prerequisites

  • Python 3.6 or higher
  • pip package manager

Setting up for Development

  1. Clone the repository:
git clone https://github.com/mdminhazulhaque/python-nesco.git
cd python-nesco
  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 independent, unofficial tool and is not affiliated with, endorsed by, or connected to the Northern Electric Supply Company (NESCO).

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 nesco 1.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nesco 1.8.0
File Size Uploaded
nesco-1.8.0.tar.gz 7.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nesco 1.8.0
File Interpreter ABI Platform
nesco-1.8.0-py3-none-any.whl Python 3 none any Details

Total release size: 14.6 kB

Release files / nesco-1.8.0.tar.gz

Download URL nesco-1.8.0.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f0c4001466d812801fde563525c135acd86c8aa0614bcdb0cbc6361c7ceb1e44
BLAKE2b-256 checksum
How to use checksums
59c491b45eef8db4ec812778a023f3c97486409c6e6b645205bc26ea0bece635
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

Release files / nesco-1.8.0-py3-none-any.whl

Download URL nesco-1.8.0-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8d2d227199d7737e73f209e71accd7471e8ec07d6b2ef443fe159029b36e40a4
BLAKE2b-256 checksum
How to use checksums
515a5f15ca8c578b39e48c769c3593eca2d139f4d64de7094eb4ec1c1b639eb1
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

Release history Release notifications | RSS feed

This release

1.8.0 This release

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.0

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page