Metadata-Version: 2.3
Name: cisco_telnet
Version: 0.1.1
Summary: A Python module for applying Telnet configurations to Cisco devices.
License: MIT
Author: Yaroslav WWFyb3NsYXYg
Author-email: minestrim13@gmail.com
Requires-Python: >=3.11,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: asyncio (>=3.4.3,<4.0.0)
Requires-Dist: telnetlib3 (>=2.0.4,<3.0.0)
Description-Content-Type: text/markdown

# 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

```sh
pip install cisco_telnet
```

## Usage

```python
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:

```python
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
