Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.

Asynchronet (Under Construction)

Inspired by Netmiko, Asynchronet is a multi-vendor library for asynchronously interacting with network devices through the CLI.

Asynchronet is a fork of Netdev, which is no longer maintained. This project was forked to continue to expand and enhance the existing capabilities while enabling community contribution.

The key features are:

  • Asynchronous CLI Interactions: Thanks to asyncssh, which powers asynchronet provides support for multiple SSH connections within a single event loop.
  • Multi-Vendor Support: Currently twelve of the most popular networking hardware vendors are supported, with more to be added in the future.
  • Autodetect Device Type: By porting Netmiko's battle-tested SSHDetect class to work asynchronously with asyncssh, asynchronet makes automatic device type detection a breeze.
  • Simple: Intuitive classes make it easy to interact with your favorite flavor of device.

Requirements

Python 3.10+

Installation

pip install asynchronet

Example

import asyncio

import asynchronet

async def task(param):
    async with asynchronet.create(**param) as ios:
        # Send a simple command
        out = await ios.send_command("show ver")
        print(out)
        # Send a full configuration set
        commands = ["line console 0", "exit"]
        out = await ios.send_config_set(commands)
        print(out)
        # Send a command with a long output
        out = await ios.send_command("show run")
        print(out)
        # Interactive dialog
        out = await ios.send_command(
            "conf", pattern=r"\[terminal\]\?", strip_command=False
        )
        out += await ios.send_command("term", strip_command=False)
        out += await ios.send_command("exit", strip_command=False, strip_prompt=False)
        print(out)


async def run():
    device_1 = {
        "username": "user",
        "password": "pass",
        "device_type": "cisco_ios",
        "host": "ip address",
    }
    device_2 = {
        "username": "user",
        "password": "pass",
        "device_type": "cisco_ios",
        "host": "ip address",
    }
    devices = [device_1, device_2]
    tasks = [task(device) for device in devices]
    await asyncio.wait(tasks)


loop = asyncio.get_event_loop()
loop.run_until_complete(run())

Metadata

Release files for asynchronet 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for asynchronet 0.1.0
File Size Uploaded
asynchronet-0.1.0.tar.gz 29.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for asynchronet 0.1.0
File Interpreter ABI Platform
asynchronet-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 78.5 kB

Release files / asynchronet-0.1.0.tar.gz

Download URL asynchronet-0.1.0.tar.gz
Size 29.3 kB
Tags Source
SHA-256 checksum
How to use checksums
cb3d3410c6d8b0f988ea90dc95f864eb9477a70753c18413554eabafa8ea6696
BLAKE2b-256 checksum
How to use checksums
aeb31f44df0af4c77b93d680e82ed17df376068e614d486125908780dec7d516
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.9.10 Linux/5.10.16.3-microsoft-standard-WSL2

Release files / asynchronet-0.1.0-py3-none-any.whl

Download URL asynchronet-0.1.0-py3-none-any.whl
Size 49.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2b46f705058c557b027cbecb68a21e2cfa06dcd1a2e9dedb23d0dd7b02c28c69
BLAKE2b-256 checksum
How to use checksums
3ad8d3de991d36ade969fd87f513aeffe16d7ba832d14316e2fc815e99964a1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.9.10 Linux/5.10.16.3-microsoft-standard-WSL2

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page