scrapli_replay
Documentation: https://scrapli.github.io/scrapli_replay
Source Code: https://github.com/scrapli/scrapli_replay
Examples: https://github.com/scrapli/scrapli_replay/tree/main/examples/simple_test_case
scrapli_replay: Tools to enable easy testing of scrapli programs and to create semi-interactive SSH servers that look and feel like "real" network devices!
Key Features:
- Easy: Easily test scrapli code with Pytest, or create mock SSH servers to play with!
- Pytest: Love scrapli and Pytest? Want to test your code that contains scrapli components, but can't test against real devices in your CI? scrapli_replay is a Pytest plugin to help you with exactly this -- its like VCR.py and pytest-vcr, but for scrapli!
- Offline: Want to be able to have the look and feel of a network device without having a network device? Create a mock SSH server based on real network device behavior and run it in your CI or a Raspberry Pi (or whatever)!
- Lightweight: Want to spin up a bunch of test servers, but don't have the resources for real device images? Asyncssh is fast and lightweight so you can run loads of mock SSH servers with very little resources!
Installation
pip install scrapli_replay
See the docs for other installation methods/details.
A Simple (Pytest) Example
@pytest.mark.scrapli_replay
def test_something_else():
with IOSXEDriver(**MY_DEVICE) as conn:
result = conn.send_command("show run | i hostname")
Metadata
Release files for scrapli-replay 2024.7.30
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| scrapli_replay-2024.7.30.tar.gz | 27.3 kB | Without provenance | Details for scrapli_replay-2024.7.30.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| scrapli_replay-2024.7.30-py3-none-any.whl | Python 3 | none | any | Details for scrapli_replay-2024.7.30-py3-none-any.whl |
Total release size: 54.4 kB
Release files / scrapli_replay-2024.7.30.tar.gz
| Download URL | scrapli_replay-2024.7.30.tar.gz |
|---|---|
| Size | 27.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4ec3e5facf161b69d383e5680b87cf66b8a6c79079e4d077b6237e0011127b03
|
|
BLAKE2b-256 checksum How to use checksums |
f588088555d521e590a08c739a476693c50ba7f53419867d61c88f88cb8940f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.9
|
Release files / scrapli_replay-2024.7.30-py3-none-any.whl
| Download URL | scrapli_replay-2024.7.30-py3-none-any.whl |
|---|---|
| Size | 27.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e703cbb0cd846bfcaab494679d78a48066a1a2d3ef7a6aa46de589824d752ad0
|
|
BLAKE2b-256 checksum How to use checksums |
9b60669a081127725dbb16bf2d286eb27870c2942a2d1feefd29438e7e9beee2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.9
|
Security for scrapli-replay 2024.7.30
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.