🔌 NESCO Prepaid CLI
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
From PyPI (Recommended)
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
- Clone the repository:
git clone https://github.com/mdminhazulhaque/python-nesco.git
cd python-nesco
- 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 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)
| File | Size | Uploaded | |
|---|---|---|---|
| nesco-1.8.0.tar.gz | 7.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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 logRelease 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