Skip to main content

async networking SDK

Project description

Asynchronous multi-vendor library for interacting with network devices

this is a fork from netdev, with code refactor and new features added.

Requires:

  • asyncio

  • AsyncSSH

  • Python >=3.5

  • pyYAML

  • asyncssh

Supports:

  • Cisco IOS

  • Cisco IOS XE

  • Cisco IOS XR

  • Cisco ASA

  • Cisco NX-OS

  • HP Comware

  • Fujitsu Blade Switches

  • Mikrotik RouterOS

  • Arista EOS

  • Juniper JunOS

  • Aruba AOS 6.X

  • Aruba AOS 8.X

  • Terminal

Features:

  • SSH

  • Telnet

  • TextFSM

Examples:

Example of interacting with Cisco IOS devices:

import asyncio
import aionet

async def task(device):
    async with aionet.ConnectionHandler(**device) as conn:

        out = await conn.send_command("show ver")
        print(out)

        commands = ["interface vlan2", "no shut"]
        out = await conn.send_config_set(commands)



async def run():
    dev1 = { 'username' : 'user',
             'password' : 'pass',
             'device_type': 'cisco_ios',
             'ip': 'ip address',
    }
    dev2 = { 'username' : 'user',
             'password' : 'pass',
             'device_type': 'cisco_ios',
             'ip': 'ip address',
    }
    devices = [dev1, dev2]
    tasks = [task(dev) for dev in devices]
    await asyncio.wait(tasks)


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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aionet-0.0.43.tar.gz (18.6 kB view details)

Uploaded Source

Built Distribution

aionet-0.0.43-py3-none-any.whl (38.6 kB view details)

Uploaded Python 3

File details

Details for the file aionet-0.0.43.tar.gz.

File metadata

  • Download URL: aionet-0.0.43.tar.gz
  • Upload date:
  • Size: 18.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.5

File hashes

Hashes for aionet-0.0.43.tar.gz
Algorithm Hash digest
SHA256 20dc0896581239c81fd58f7200850d771b8a48d58aeba02287b4bb850dccd919
MD5 db9d2d101634b9fe3ebce4092e2e52de
BLAKE2b-256 ec3817d548b82e4ea4442efda8defa41d5de4babeafb247d613a24c440eda294

See more details on using hashes here.

File details

Details for the file aionet-0.0.43-py3-none-any.whl.

File metadata

  • Download URL: aionet-0.0.43-py3-none-any.whl
  • Upload date:
  • Size: 38.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.5

File hashes

Hashes for aionet-0.0.43-py3-none-any.whl
Algorithm Hash digest
SHA256 72b5b2364e8483240a53f00b5994ad6a89b9cbf0ed8cf5319a44ad6d1bfb61df
MD5 ab64e36d9214eea9d035182651f454c0
BLAKE2b-256 684cdbbcd4e796a14dc0804357237ea6fbaf4f450655ea36e85e882bfac0df06

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page