Examples

July 23, 2026 · View on GitHub

Runnable, task-oriented example scripts for the VideoIPath Automation Tool. Each file is a self-contained Python script with a module docstring (title, description, prerequisites, related examples) and numbered sections, showing how to solve one realistic automation scenario.

Where the Getting Started Guide explains concepts, these examples show complete workflows you can copy and adapt.

Running an example

pip install videoipath-automation-tool
python docs/examples/01_setup/01_connect_and_check.py

Each script has a small block of placeholder constants near the top (SERVER_ADDRESS, USERNAME, PASSWORD, device labels, …) — edit these for your environment. Alternatively, set the VIPAT_* environment variables (or a .env file) and connect with a bare VideoIPathApp(); see 01_connect_and_check.py.

All identifiers in these examples are anonymized placeholders (device-a, leaf-1, 192.0.2.x, site-a, …). The examples write to the server — run them against a test system first. The read-only scripts (04_inspect/01, 06_workflows/02) are safe starting points.

Compatibility and conventions

  • Inspect app (app.inspect) is the forward-looking read/write interface and requires VideoIPath 2025.4 or newer.
  • Topology app (app.topology) is deprecated on VideoIPath 2025.x and unsupported on 2026.x, where its constructor raises TopologyUnsupportedError. Prefer the Inspect variant of a scenario on modern servers.
  • Recommended write style (Inspect): edit a domain object's properties and flush with app.inspect.update(obj). The keyword-argument methods (app.inspect.update_device(...), update_vertex(...), …) do the same in one call and are shown as an alternative where relevant.

Contents

01 — Setup

  • 01_connect_and_check.py — connect (constructor args or VIPAT_* env vars), verify the connection, read the server version.

02 — Inventory

03 — Topology and Inspect (paired examples)

Each scenario is implemented twice — once with the modern Inspect app, once with the classic Topology app — using identical data, so you can compare the two approaches side by side.

ScenarioInspectTopology
Device lifecycle: add, configure, remove01_device_lifecycle_inspect.py01_device_lifecycle_topology.py
Configure vertices (endpoints, SIPS, tags)02_configure_vertices_inspect.py02_configure_vertices_topology.py
Connect two devices with edges03_connect_devices_with_edges_inspect.py03_connect_devices_with_edges_topology.py
Lay out devices in a grid04_grid_placement_inspect.py04_grid_placement_topology.py
Create a virtual (driverless) device05_virtual_device_inspect.py05_virtual_device_topology.py

04 — Inspect (app-specific strengths)

05 — Administration

06 — Workflows (composite, real-world)