Metadata-Version: 2.1
Name: nw-ssh
Version: 1.0.4
Summary: Simple ssh client with asyncssh for network devices
Home-page: https://github.com/kthrdei/nw-ssh
License: MIT
Keywords: ssh,network
Author: dei
Requires-Python: >=3.7,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: asyncssh (>=2.4.2,<3.0.0)
Project-URL: Repository, https://github.com/kthrdei/nw-ssh
Description-Content-Type: text/markdown

# nw-ssh
Simple ssh client with asyncssh for network devices.

```
import asyncio
import nw_ssh

async def main() -> None:
    async with nw_ssh.SSHConnection(
        host='169.254.0.1',
        port=22,
        username='root',
        password='password',
        client_keys=[],
        passphrase=None,
        known_hosts_file=None,
        delimiter=r'#',
        timeout=10,
    ) as conn:

        print(conn.login_message)

        output = await conn.send(input='cli', delimiter=r'>')
        print(output)

        output = await conn.send(input='show interfaces fxp0 | no-more', delimiter=r'>')
        print(output)

        output = await conn.send(input='configure', delimiter=r'#')
        print(output)

        output = await conn.send(input='show interfaces', delimiter=r'#')
        print(output)

        output = await conn.send(input='commit', delimiter=r'#', timeout=10)
        print(output)

asyncio.run(main())
```

# Requirements
- Python >= 3.7
- asyncssh


# Installation
```
pip install nw-ssh
```


# License
MIT

