snappi
The Snappi Open Traffic Generator Python Package
Decision gist · record as of 2026-08-14
Yes. Snappi is actively maintained, has no known vulnerabilities, supports current Python versions (3.9–3.13), and carries a permissive MIT license. Install friction is low. If you need to automate traffic generation against an OTG-compliant server (especially Ixia-c), this is the standard SDK for that task. The only prerequisite is having a running OTG API server to connect to.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a running Open Traffic Generator (OTG) API server at the specified location (e.g., Ixia-c instance) to connect to and control.
- Low install friction with a pure-Python wheel distribution.
- The package is actively maintained with a recent release (2 days old) and has been in active development since 2020.
License · maintenance · safety
MIT (permissive) — Licensed under MIT (permissive), so you can use, modify, and distribute snappi freely in both open-source and commercial projects with minimal restrictions.
last release 2026-08-12 (2 days) · last repo commit 2026-08-12 · 94 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 154,957 downloads/mo, #10,836 on PyPI
Alternatives
Verify before relying
pip install snappi
import snappi
api = snappi.api(location="https://localhost:8443")
config = api.config()
ptx = config.ports.add(name="ptx", location="veth-a")
flow = config.flows.add(name="flow")
flow.tx_rx.port.tx_name = ptx.name
api.set_config(config)- Whether the package works with traffic generators other than Ixia-c that claim OTG API conformance.
- Performance characteristics when handling large-scale traffic configurations or high-frequency metric polling.
What it is and what it does
Snappi is a Python SDK auto-generated from the Open Traffic Generator API specification, designed to let you programmatically control any traffic generator that implements that standard. You use it to create traffic configurations (defining ports, flows, packet headers, and transmission parameters), push those configurations to a running OTG server, start and stop traffic, and retrieve flow metrics. The package wraps gRPC and HTTP communication with the OTG API, handling protocol buffers and YAML serialization internally.
The typical workflow is to instantiate an API client pointing to your traffic generator, build a configuration object by adding ports and flows with protocol headers and transmission rules, serialize and push that config to the server, control transmission state, and poll metrics until your test completes. It's designed for network testing automation—validating traffic behavior, measuring throughput and packet loss, or simulating complex traffic patterns in a reproducible, scriptable way.
Use it for
- Automate network traffic testing by scripting traffic generation, transmission, and metric collection against Ixia-c or other OTG-compliant generators.
- Build CI/CD pipelines that validate network device behavior under controlled, repeatable traffic patterns.
- Configure multi-flow traffic scenarios with varying packet sizes, protocols, and port patterns for network simulation testing.
- Poll and assert on flow metrics (transmit/receive counts, stopped state) to validate traffic generator behavior in test frameworks like pytest.
- Generate custom packet payloads and protocol header combinations to test edge cases in network processing.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Snappi is actively maintained, has no known vulnerabilities, supports current Python versions (3.9–3.13), and carries a permissive MIT license. Install friction is low. If you need to automate traffic generation against an OTG-compliant server (especially Ixia-c), this is the standard SDK for that task. The only prerequisite is having a running OTG API server to connect to.
Install
snappi on PyPI
Before you install
Low install friction with a pure-Python wheel distribution. The package is actively maintained with a recent release (2 days old) and has been in active development since 2020. Seven runtime dependencies are all standard, widely-used libraries (grpcio, protobuf, PyYAML, requests, urllib3, semantic_version).
Requires a running Open Traffic Generator (OTG) API server at the specified location (e.g., Ixia-c instance) to connect to and control.
License in practice
Licensed under MIT (permissive), so you can use, modify, and distribute snappi freely in both open-source and commercial projects with minimal restrictions.
Quickstart
pip install snappi
import snappi
api = snappi.api(location="https://localhost:8443")
config = api.config()
ptx = config.ports.add(name="ptx", location="veth-a")
flow = config.flows.add(name="flow")
flow.tx_rx.port.tx_name = ptx.name
api.set_config(config)
Verify before relying
- Whether the package works with traffic generators other than Ixia-c that claim OTG API conformance.
- Performance characteristics when handling large-scale traffic configurations or high-frequency metric polling.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release <4,>=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 7 packagesgrpciogrpcio-toolsprotobufPyYAMLrequestsurllib3semantic_version |
| Maintenance | Actively maintained 2 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 154,957 / month, #10,836 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Software Development :: Testing :: Traffic Generation |
Evidence: snappi-1.61.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “traffic generator python sdk”
- snappiSnappi is an auto-generated Python SDK for controlling traffic…
- snappi-ixnetworkExecutes traffic generation test scripts against IxNetwork,…
- genie.trafficgenProvides connection implementations to traffic generator devices…
Give your agent the search over MCP, or paste the wish link into any chat.
More Traffic Generation packages
Locust is a Python-based load testing framework that lets you write performance tests in regular Python code and run them against HTTP and other protocols, with real-time monitoring via a web UI or command line.
Install it if you need load testing with code-based test definition, distributed scaling, and real-time monitoring—especially for HTTP services or when you want to…
Represents and manipulates IPv4, IPv6, MAC addresses and related network objects; supports CIDR notation, subnetting, set operations, IANA lookups, and DNS reverse generation.
SeleniumBase is a browser automation framework that combines Selenium WebDriver with pytest integration, CDP mode for bot-detection bypass, and tools for web testing, scraping, and crawling.
However, the 60 runtime dependencies are substantial—evaluate whether you need the full feature set or if a lighter alternative suits your use case.
Extends Locust with plugins for load testing non-HTTP protocols, reading test data, listening to results, and command-line tools to reduce boilerplate in performance test scripts.
Taurus is a command-line wrapper that simplifies performance and functional testing by abstracting JMeter, Gatling, Locust.io, and Selenium WebDriver behind a YAML-based configuration interface.
Provides a virtual display wrapper for running browser automation tests in headless environments, particularly when browser headless modes are insufficient (e.g., for Chrome extensions).
See also snappi-ixnetwork · dpkt · ixnetwork-restpy · scapy · genie.trafficgen · pydivert · datadog · pypcap · Pinterest-Generated-Client · PySocks