Snappi is an open-source Python library for generating and testing network traffic. The current version is 1.53.0, with regular releases approximately every 2-3 weeks. It supports Python >=3.8,<4 and integrates with various traffic generator backends (e.g., IxNetwork, Traffic Server). Snappi provides a unified API to configure traffic flows, endpoints, and capture settings.
pip install snappiVerified import paths — ran on the pinned version, not inferred.
Instantiate the API, create a config, and add a simple IPv4 flow.
Always specify full URL: api = snappi.Api(address='https://10.10.10.10:8443')
Use config = api.config() then api.set_config(config)
Update API address to https:// or set ssl=False explicitly.
Use .packet().ethernet().ipv4() for separate layers or .eth_ipv4() for convenience.
Use config.port instead of config.ports.
Check docstring: e.g., ipv4.src.increment.start = '10.0.0.1'; ipv4.src.value = '10.0.0.1'
Run 'pip install snappi' in the correct environment.
Use 'import snappi' then 'snappi.Api(...)'.
Verify the API address (e.g., 'https://localhost:11009') and ensure the snappi server is running.
Upgrade both client and server to the latest version, or pin to compatible versions.
Ensure you have added flows to config, e.g., config.flows.flow(name='test')...
No dependency data recorded yet.