isptools 🌐 (v3.0.0)
🌍 (Arabic / العربية)
isptools هي مكتبة Python احترافية وأداة سطر أوامر (CLI) متكاملة مصممة خصيصاً لمهندسي الشبكات وفنيي مزودي خدمات الإنترنت (ISPs).
❓ ما هي أداة isptools؟
هي أداة شاملة لإدارة أجهزة الشبكة من شركات مختلفة مثل MikroTik, Ubiquiti, Cisco, و أجهزة SNMP عبر واجهة موحدة.
⚙️ كيف تعمل الأداة؟
- الاتصال الموحد: تستخدم بروتوكولات (SSH, HTTP, API) للوصول للأجهزة.
- التحليل: تحول البيانات المعقدة إلى تقارير بسيطة.
- الإصلاح التلقائي (AutoFix): تكتشف المشاكل (مثل ضعف الإشارة) وتعالجها تلقائياً.
- رسم الخرائط: ترسم خريطة الشبكة (Topology) آلياً.
👨💻 المطور
تم التطوير بواسطة ياسين طه (devyassin01).
- GitHub: devyassin01
- Instagram: @y_as.01
💻 الأنظمة المدعومة
تعمل على: Linux, Windows, macOS, و Android (Termux).
🌎 (English / الإنجليزية)
isptools is a professional Python library and CLI tool designed specifically for network engineers and ISP technicians.
❓ What is isptools?
It is a comprehensive tool for managing network equipment from multiple vendors like MikroTik, Ubiquiti, Cisco, and SNMP devices through a unified interface.
⚙️ How does it work?
- Unified Connection: Uses standard protocols (SSH, HTTP, API) to access devices.
- Analysis: Converts complex data into simple, readable reports.
- Self-Healing (AutoFix): Detects issues (like low signal) and fixes them automatically.
- Topology Mapping: Automatically maps the network structure.
👨💻 Developer
Developed by Yassin Taha (devyassin01).
- GitHub: devyassin01
- Instagram: @y_as.01
💻 Supported Systems
Runs on: Linux, Windows, macOS, and Android (Termux).
Features
- Unified API: One library to talk to multiple vendor platforms.
- MikroTik: Full support via RouterOS API.
- Ubiquiti NanoStation: Deep integration with airOS 6.x/8.x (Auto-detection, Link Quality, Spectrum Scan).
- Cisco: Command execution via SSH (Netmiko).
- SNMP: Generic monitoring support (v1, v2c, v3).
- CLI Tool: Powerful
isptoolscommand for terminal-based management. - Monitoring: Built-in asynchronous poller for concurrent device monitoring.
- Alerting: Flexible alert manager with threshold-based rules.
Installation
pip install isptools
CLI Usage
The library comes with a powerful CLI tool:
# Scan a device for full info
isptools scan --host 192.168.1.20 --user admin --password pass --type ubiquiti
# List connected clients
isptools clients --host 192.168.1.1 --user admin --password pass --type mikrotik
# Live monitor stats
isptools monitor --host 10.0.0.1 --user ubnt --password ubnt --type ubiquiti --interval 2
Quick Start (Python API)
Basic Usage
from isptools import ISPTools, Device
# Initialize
isp = ISPTools()
# Add a MikroTik device
isp.add_device(Device(
host="192.168.88.1",
username="admin",
password="password",
device_type="mikrotik"
))
# Connect and get stats
isp.connect_all()
stats = isp.get_stats("192.168.88.1")
print(f"CPU Load: {stats.cpu_load}%")
Advanced NanoStation Support
from isptools import ISPTools, Device
isp = ISPTools()
isp.add_device(Device(host="192.168.1.20", username="ubnt", password="ubnt", device_type="ubiquiti"))
isp.connect_all()
driver = isp.devices["192.168.1.20"]
quality = driver.get_link_quality()
print(f"Link Quality Score: {quality['score']}/100 ({quality['level']})")
# Run spectrum scan
# results = driver.scan_spectrum()
Advanced Features
AutoFix (Self-Healing)
Automatically detect and repair common network issues with a permission-based system.
from isptools import ISPTools, Device, PermissionManager, PermissionLevel, AutoFixEngine
pm = PermissionManager(level=PermissionLevel.SAFE_FIX, require_confirm=True)
engine = AutoFixEngine(pm)
isp = ISPTools()
# ... add devices ...
stats = isp.get_stats("192.168.1.20")
results = engine.apply_fixes(isp.devices["192.168.1.20"], stats.__dict__)
Network Topology Mapping
Discover how your devices are connected and export the graph.
from isptools import TopologyMapper, TopologyExporter
mapper = TopologyMapper(list(isp.devices.values()))
graph = mapper.discover()
print(TopologyExporter.to_mermaid(graph))
Reports & History
Track bandwidth and performance over time using SQLite.
from isptools import StatsCollector, Reporter
collector = StatsCollector()
reporter = Reporter(collector)
# After some polling...
reporter.export_html("192.168.1.1", hours=24, output_path="daily_report.html")
Telegram Alerts
Get notified of issues directly on your phone.
from isptools import TelegramNotifier
tg = TelegramNotifier(bot_token="YOUR_TOKEN", chat_id="YOUR_ID")
tg.send_alert("192.168.1.20", "Signal dropped to -85 dBm", "Increased TX power ✅")
API Reference
Device Dataclass
| Field | Type | Description |
|---|---|---|
host |
str |
IP address or hostname |
username |
str |
Login username |
password |
str |
Login password |
device_type |
str |
mikrotik, ubiquiti, cisco, snmp |
port |
int |
Optional override port |
ISPTools Class Methods
add_device(device: Device): Register a device.connect_all(): Establish connections to all devices.get_stats(host: str) -> DeviceStats: Fetch performance metrics.get_clients(host: str) -> List[Station]: List connected clients.start_monitor(interval: int): Start async background polling.stop_monitor(): Stop polling.
Publishing
To publish a new version to PyPI:
- Update version in
isptools/version.py. - Commit changes and push.
- Create a git tag:
git tag -a v3.0.0 -m "Release version 3.0.0"
git push origin v3.0.0
GitHub Actions will automatically build and publish to PyPI.
👨💻 Developer
isptools was developed by Yassin Taha
[
](https://instagram.com/y_as.01) [
](https://github.com/alexiq01)
Built with ❤️ for ISP engineers and network technicians.
License
MIT
Metadata
Release files for isptools-pro 3.0.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 | |
|---|---|---|---|
| isptools_pro-3.0.0.tar.gz | 25.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| isptools_pro-3.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 53.0 kB
Release files / isptools_pro-3.0.0.tar.gz
| Download URL | isptools_pro-3.0.0.tar.gz |
|---|---|
| Size | 25.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c2ab8b7b98d4ef063809da588aad5cb6d19f9956dfb843987334ce2538707aec
|
|
BLAKE2b-256 checksum How to use checksums |
3d2ff5ea2208ac86515b3835a68359c352a169e36d42b53db6802481c2a98c97
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.13
|
Release files / isptools_pro-3.0.0-py3-none-any.whl
| Download URL | isptools_pro-3.0.0-py3-none-any.whl |
|---|---|
| Size | 27.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
19f8ea4f40970f6f0bb83e958060dbbedd116a67d6e33706c757be1eaa71c1e4
|
|
BLAKE2b-256 checksum How to use checksums |
383cd1c9c8cd6a4e6965fb225e30106cd4054033cb3f34bbb230dfd4d255c965
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.13
|