A Python module for applying Telnet configurations to Cisco devices.
Project description
cisco_telnet
A Python module for applying Telnet configurations to Cisco devices.
Features
- Connects to Cisco devices via Telnet
- Authenticates with username and password
- Enters enable and configuration modes
- Sends a list of configuration commands
- Prints device responses
Installation
pip install cisco_telnet
Usage
import asyncio
from cisco_telnet import apply_telnet_config
commands = [
"interface FastEthernet0/1",
"description Connected to Server",
"no shutdown"
]
async def main():
await apply_telnet_config(
commands,
host="192.168.1.1",
username="admin",
password="your_password",
enable_pass="your_enable_password" # Optional, if required
)
asyncio.run(main())
Example integration
You can also use this module as part of a larger automation script, for example:
from cisco_telnet import apply_telnet_config
import asyncio
commands = [
"hostname TestRouter",
"interface Loopback0",
"ip address 10.1.1.1 255.255.255.255"
]
asyncio.run(apply_telnet_config(commands, "10.0.0.1", "admin", "password"))
Parameter explanation:
username="admin"— username for Telnet login to the Cisco device.password="your_password"— password for Telnet login.enable_pass="your_enable_password"— enable mode password (optional, if required).
License
MIT License
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
cisco_telnet-0.1.1.tar.gz
(1.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cisco_telnet-0.1.1.tar.gz.
File metadata
- Download URL: cisco_telnet-0.1.1.tar.gz
- Upload date:
- Size: 1.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13d859e05a9ea8a29544d0def5b890215c31a0a660b4386b7bd9b151a63f48dc
|
|
| MD5 |
f1c0ad7569cde228b145905cfe75a269
|
|
| BLAKE2b-256 |
d1e273d0c215120e53788577643f9e9b9149632db4c0140ad6e102e35797671b
|
File details
Details for the file cisco_telnet-0.1.1-py3-none-any.whl.
File metadata
- Download URL: cisco_telnet-0.1.1-py3-none-any.whl
- Upload date:
- Size: 2.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
05df18776838b4e20291f4ff04d87fa03ace318b81d1ea5ae1cf181ab2c2603a
|
|
| MD5 |
32aa01fe3cc888720cbb44402432ac5b
|
|
| BLAKE2b-256 |
f1509e26cf344d7c552a1c0b190d60a86d07c4a217bb1af6a9904f853308ed82
|