Context manager, raw connection escape hatch, multi-vendor handling
Testing plugins
examples/device-connections/testing_plugins.py
Plugin tests with a fake raw connection, registry isolation
Existing Examples
Example
Path
Demonstrates
Ping
examples/ping/ping.py
Simple function block running ping operations (deprecated: for real use, the shipped base block fb.base.neops.io/network_device_ping in neops/fb/base/network_device/ping.py reports loss and min/max/mean/median RTT; it pings over an unprivileged ICMP socket when net.ipv4.ping_group_range allows it and over a raw socket (root or CAP_NET_RAW) otherwise)
Show command
examples/show_cmd/fb_get_show_cmd.py
CLI command execution via device connection
Python eval
examples/python_eval/python_eval.py
Dynamic Python execution in a function block
Suggested Learning Path
If you are new to the SDK, work through examples in this order:
Echo — understand the minimal structure
Show version — learn device connections
Config backup — see @run_in_thread in action
Parallel collection — fan out across multiple devices
Device inventory — create entities with deduplication
FRR plugin — extend the connection system
Project Template
File
Path
Purpose
pyproject.toml
examples/getting-started/echo/pyproject.toml
Minimal project template with SDK dependency and test configuration