Skip to main content

Network device Asynchronous python library

Project description

netscud

netscud is an SSH and Telnet python library for network devices (mainly network switches and routers). It uses async techniques to speed up concurrent connections.

As an overview here is an example of netscud code for a Cisco IOS device:

# Python library import
import asyncio, netscud

async def main():

   # Device parameters
   my_device = {
      "ip": "192.168.0.16",
      "username": "cisco",
      "password": "cisco",
      "device_type": "cisco_ios",
   }

   # Creation of a device
   async with netscud.ConnectDevice(**my_device) as sw1:

      # Sending command
      output = await sw1.send_command("show interfaces description")

      # Display message
      print(output)

# Main function call
if __name__ == "__main__":

   # Main async loop
   asyncio.run(main())

The result of this script is:

c:\>script.py
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        192.168.0.16    YES NVRAM  up                    up
FastEthernet0/1        unassigned      YES manual up                    up
FastEthernet1/0        unassigned      YES manual administratively down down
FastEthernet1/1        unassigned      YES DHCP   up                    up
Ethernet2/0            unassigned      YES DHCP   up                    up
Ethernet2/1            unassigned      YES NVRAM  up                    up
Ethernet2/2            unassigned      YES NVRAM  up                    up
Ethernet2/3            unassigned      YES NVRAM  up                    up

c:\>

Documentation can be found here: https://netscud.readthedocs.io/en/latest/

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

netscud-1.1.0.tar.gz (51.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

netscud-1.1.0-py3-none-any.whl (23.1 kB view details)

Uploaded Python 3

File details

Details for the file netscud-1.1.0.tar.gz.

File metadata

  • Download URL: netscud-1.1.0.tar.gz
  • Upload date:
  • Size: 51.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.3 CPython/3.8.2 Windows/10

File hashes

Hashes for netscud-1.1.0.tar.gz
Algorithm Hash digest
SHA256 b5e6a45dcd875af61606ac9e8085ba15764db9e062618fccb774576ffa13165a
MD5 bbafd71c1d2a044ecf803806a8204c75
BLAKE2b-256 616ea8a4da014cd54792b09c9ad6a1643adffcc8fb8de2200321261620ed31b0

See more details on using hashes here.

File details

Details for the file netscud-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: netscud-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 23.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.3 CPython/3.8.2 Windows/10

File hashes

Hashes for netscud-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 79dd452c2c58c810528afa05b037994f2a1b85e0d4d34c3b7006c86dad7bc86b
MD5 d54d517e052c61ee3bb27869457b8a43
BLAKE2b-256 c523f94571bd2f4c299f78aa36f656ad00b11f4ca4b463d5f2fbb9621f6b6c6a

See more details on using hashes here.

Supported by

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