A python asyncio implementation for VTY protocol
Project description
Description
aiovty
is an asynchronous implementation of the VTY protocol.
Installation
Install the last released version using pip
:
python3 -m pip install --user -U aiovty
Or install the latest version from sources:
git clone git@github.com:matan1008/aiovty.git
cd aiovty
python3 -m pip install --user -U -e .
Usage
To create a client, you need to supply the server's prompt name (e.g. 'Router'
):
from aiovty import AioVtyClient
vty = AioVtyClient('Router')
Then you can connect giving address:
connection_string = await vty.connect('127.0.0.1', 23)
Note that connecting returns the "connection string", which is the data sent before the first prompt.
After connection you can send your command:
command_response = await vty.command(b'show ip')
You can also enter enabled mode:
await vty.enable()
And initialize a configure terminal:
await vty.configure_terminal()
await vty.command(b'router rip')
print(vty.node) # Prints `config-router`
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aiovty-0.0.3.tar.gz
(14.7 kB
view details)
Built Distribution
aiovty-0.0.3-py3-none-any.whl
(14.8 kB
view details)
File details
Details for the file aiovty-0.0.3.tar.gz
.
File metadata
- Download URL: aiovty-0.0.3.tar.gz
- Upload date:
- Size: 14.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e863c5090869dc499ef0a377abbf14ebf99dda96719b4d10803014d176eca91 |
|
MD5 | 4f07f60bba42560239bf54dcff09a926 |
|
BLAKE2b-256 | e304480787470776ace45233e3dff1da155f826b3d18bb64f987eef5b2670fb6 |
File details
Details for the file aiovty-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: aiovty-0.0.3-py3-none-any.whl
- Upload date:
- Size: 14.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 198f026de8999740b3c555eb50aa11f06c246368b5c963b783436400a820a78b |
|
MD5 | 25e7781c9c86be6e64979af7a1beedb0 |
|
BLAKE2b-256 | 04c72614da31e8664b5d93bf8271138b2f549038f0140a4e0c2d59502f8caf0b |