netscenario
Declarative network scenarios for tests: describe a network (nodes, links, delay, jitter, loss, rate), send traffic through it, measure per packet, and assert on the numbers.
pip install netscenario
netscenario doctor # what this machine can do, and how to fix what it cannot
import netscenario as ns
scenario = ns.Scenario.from_yaml("""
version: 0
name: video-call
seed: 11
duration: 5s
topology:
nodes: [caller, callee]
links:
- id: wifi
between: [caller, callee]
forward: { delay: 30ms, jitter: { amount: 5ms, distribution: normal }, loss: { model: random, p: 1% } }
reverse: { delay: 30ms }
workloads:
- { id: video, kind: udp-cbr, from: caller, to: callee, rate: 1500kbit, packet-size: 1200b }
""")
result = ns.run(scenario, out="video-call-result")
video = result["video"]
print(
f"{video.sent} packets sent, {video.loss_ratio:.1%} lost, p99 delay {video.delay.p99 * 1000:.0f} ms"
)
assert video.delay.p99 < 0.100 # seconds
The wheel carries the extension module and the two programs that a run needs (netscenario and netscenario-agent), and puts the command netscenario on the PATH. It is for Linux (x86_64 and aarch64) with the tools ip, tc, unshare, nsenter and prlimit (packages iproute2 and util-linux). A run creates network namespaces, which Debian and Ubuntu 22.04 allow without root; Ubuntu 24.04 needs one setting, and a container needs more: permissions. If something does not work, start with netscenario doctor and the troubleshooting guide.
The pytest plugin is the package pytest-netscenario.
- Documentation, the scenario format and the feature list: https://github.com/leonkrix/netscenario
- What a version promises: docs/VERSIONING.md. The status is pre-alpha: a minor release may break things, and the changelog says so.
Licensed under either of Apache License 2.0 or MIT, at your option.
Metadata
Release files for netscenario 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| netscenario-0.1.0-cp311-abi3-manylinux_2_28_x86_64.whl | CPython 3.11 | abi3 | Linux glibc 2.28+ x86-64 | Details for netscenario-0.1.0-cp311-abi3-manylinux_2_28_x86_64.whl |
| netscenario-0.1.0-cp311-abi3-manylinux_2_28_aarch64.whl | CPython 3.11 | abi3 | Linux glibc 2.28+ ARM64 | Details for netscenario-0.1.0-cp311-abi3-manylinux_2_28_aarch64.whl |
Total release size: 6.6 MB
Release files / netscenario-0.1.0-cp311-abi3-manylinux_2_28_x86_64.whl
| Download URL | netscenario-0.1.0-cp311-abi3-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 3.4 MB |
| Tags | CPython 3.11 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
ae5e151978d5f79d346c7f51292d023946b259cc1aee45f6148937e9b3d3a252
|
|
BLAKE2b-256 checksum How to use checksums |
e0208df555ae0b1e2b900eaf642176a1dc2f5b54254ebd6ac64aa0aab1f0433f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 31, 2026.
Transparency logRelease files / netscenario-0.1.0-cp311-abi3-manylinux_2_28_aarch64.whl
| Download URL | netscenario-0.1.0-cp311-abi3-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 3.2 MB |
| Tags | CPython 3.11 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
415f98ddf56aeda3c010f7a88ed9a83a863246306573f67d1caf54abd0b06164
|
|
BLAKE2b-256 checksum How to use checksums |
4095ec52cf4bb62977a65b3970913329512b3333df34b942012badc09be231d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 31, 2026.
Transparency logSecurity for netscenario 0.1.0
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
Both files in this release have been uploaded with provenance metadata.
Attestation for netscenario-0.1.0-cp311-abi3-manylinux_2_28_x86_64.whl
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 Oct 31, 2026.
Transparency logA 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.