Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

scrapli-replay

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scrapli-replay

Tools to enable easy testing of scrapli programs

  • 2024.7.30
  • PyPI
  • Socket score

Maintainers
1

Supported Versions PyPI version Weekly Build Code Style License: MIT

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")

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc