Skip to main content

ascii-network-diagram

ascii-network-diagram is a Python package for generating visually appealing ASCII art network diagrams directly in your terminal. It is designed for quick visualization of star-topology networks, making it easy to share, document, or debug network layouts in plain text environments.

Key Features:

  • Draws star network diagrams with 2 to 12 nodes.
  • Each node can have a label (required), VLAN (optional), and connection/circuit ID (optional).
  • VLAN and title are not required; the diagram will render without them.
  • Automatically adjusts box sizes and layout for your node labels.
  • Attempts to center the diagram in the terminal
  • Output is pure ASCII/Unicode, suitable for terminals, documentation, and code comments.
  • No external dependencies beyond Python standard library.
  • Draws nodes in list-order from left-center in a counter-clockwise pattern

Limitations:

  • There is no overflow handling. If the diagram is too wide for your terminal, it prints a warning:
    • [Warning] Diagram width exceeds terminal width. Consider shortening labels or reducing the number of nodes.

Usage Example:

from ascii_network_diagram import star_diagram

nodes = [
    {"label": "node1.core, eth0", "vlan": 100, "connection": "CIR-100"},
    {"label": "node2.core, eth1", "vlan": 100, "connection": "CIR-100"},
]

star_diagram(nodes, title="2 Node Star Diagram")

Output:

┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                                                                                      │
│                                                 2 Node Star Diagram                                                  │
│                                                                                                                      │
├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│                                                                                                                      │
│                                ┌──────────────────┐             ┌──────────────────┐                                 │
│  CIR-100 ──── (vlan 100) ────▶ │ node1.core, eth0 │ ◀═════════▶ │ node2.core, eth1 │ ◀──── (vlan 100) ──── CIR-100   │
│                                └──────────────────┘             └──────────────────┘                                 │
│                                                                                                                      │
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

Installation

pip install ascii-network-diagram

Usage

from ascii_network_diagram import star_diagram

nodes = [
    {"label": "node1.core, eth0", "vlan": 100, "connection": "CIR-100"},
    {"label": "node2.core, eth1", "vlan": 100, "connection": "CIR-100"},
]

star_diagram(nodes, title="2 Node Star Diagram")

License

MIT License

Metadata

Release files for ascii-network-diagram 0.1.9

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

Source distribution (sdist)

Source distribution for ascii-network-diagram 0.1.9
File Size Uploaded Provenance Actions
ascii_network_diagram-0.1.9.tar.gz 8.8 kB With provenance Details for ascii_network_diagram-0.1.9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ascii-network-diagram 0.1.9
File Interpreter ABI Platform Actions
ascii_network_diagram-0.1.9-py3-none-any.whl Python 3 none any Details for ascii_network_diagram-0.1.9-py3-none-any.whl

Total release size: 16.2 kB

Release files / ascii_network_diagram-0.1.9.tar.gz

Download URL ascii_network_diagram-0.1.9.tar.gz
Size 8.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d3b2f2ee7a668ca403fcb7bbf446bd15640a3500030696ffab2cfb0ec110ecad
BLAKE2b-256 checksum
How to use checksums
6d9940c03972f58f933a8e15e0b7d5cfbd1c761e5559bfa4faf7a39965f87ff5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Apr 12, 2026.

Transparency log

Release files / ascii_network_diagram-0.1.9-py3-none-any.whl

Download URL ascii_network_diagram-0.1.9-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8f6347f66e188078135b2c257d6ca825a1f55a43e4c115ee6895067399c5979e
BLAKE2b-256 checksum
How to use checksums
fa74d55a649f087f51067d41eb37f10efaf6ef52e6c14f158b6ae438e673775f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Apr 12, 2026.

Transparency log

Security for ascii-network-diagram 0.1.9

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ascii_network_diagram-0.1.9.tar.gz

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 Apr 12, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.9 This release

2 release files Full provenance

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