A compact Python library for modeling, analyzing, and visualizing optical network topologies.
Project description
Topolib 🚀
Topolib 🚀
Topolib is a compact, modular Python library for modeling, analyzing, and visualizing optical network topologies.
Goal: Provide researchers and engineers with a simple, extensible toolkit for working with nodes, links, metrics, and map-based visualizations.🌐 Model | 📊 Analyze | 🗺️ Visualize | 🧩 Extend
📂 Examples
Explore ready-to-run usage examples in the examples/ folder!
- Show topology on a map 🗺️
- Show default topology in map 🗺️
- Export topology as PNG 🖼️
- Export topology to CSV and JSON 📄
- Export topology and k-shortest paths for FlexNetSim 🔀
🧭 Overview
Topolib is organized into four main modules:
- 🧱 Elements:
Node,Link— basic building blocks - 🕸️ Topology:
Topology,Path— manage nodes, links, paths, and adjacency - 📈 Analysis:
Metrics— compute node degree, link stats, connection matrices - 🖼️ Visualization:
MapView— plot topologies on real maps
✨ Features
- Modular, extensible design
- Easy-to-use classes for nodes, links, and paths
- Built-in metrics and analysis helpers
- JSON import/export and interoperability
- Ready for Sphinx, Read the Docs, and PyPI
⚡ Quickstart
python -m venv .venv
source .venv/bin/activate
pip install -U pip
pip install topolib
📚 Documentation
Full documentation: https://topolib.readthedocs.io/
📝 Basic usage
from topolib.elements.node import Node
from topolib.topology.topology import Topology
n1 = Node(1, 'A', 10.0, 20.0)
n2 = Node(2, 'B', 11.0, 21.0)
topo = Topology(nodes=[n1, n2])
# Add links, compute metrics, visualize, etc.
🛠️ Development
See CONTRIBUTING.md for development guidelines, commit message rules, and pre-commit setup.
📄 License
MIT — see LICENSE for details.
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 topolib-0.6.0.tar.gz.
File metadata
- Download URL: topolib-0.6.0.tar.gz
- Upload date:
- Size: 61.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.11.14 Linux/5.15.154+
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46de4689f15bd072ef5ad70acdf8e7f3b76608d6584671af7ae4d74c25110fa2
|
|
| MD5 |
6931b8f22aa86ed482191456038a3a77
|
|
| BLAKE2b-256 |
92d63fdb9be574d758d0806495d113aeac421776931cd5a5e21d6d5085c5fcfa
|
File details
Details for the file topolib-0.6.0-py3-none-any.whl.
File metadata
- Download URL: topolib-0.6.0-py3-none-any.whl
- Upload date:
- Size: 82.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.11.14 Linux/5.15.154+
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b8299830928f7309efa692f19c33b7cb42132d3179b3b440e079fc67f3f30a3
|
|
| MD5 |
f82bf8f256bc1e39d3f5ce5775fa2937
|
|
| BLAKE2b-256 |
41219a3e87a20c18b68c4735ef5db497a8358ad33b37b063b2f4ccaf41213eb4
|