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
Metadata
Release files for nw-ssh 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nw-ssh-1.0.4.tar.gz | 3.5 kB | Without provenance | Details for nw-ssh-1.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nw_ssh-1.0.4-py3-none-any.whl | Python 3 | none | any | Details for nw_ssh-1.0.4-py3-none-any.whl |
Total release size: 7.4 kB
Release files / nw-ssh-1.0.4.tar.gz
| Download URL | nw-ssh-1.0.4.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d6d4ea422c753fe45fcb3c26d6efbdaf4cc1f57fb0015ad575cbc82d0ac48596
|
|
BLAKE2b-256 checksum How to use checksums |
e747806ba57039668749eeb74255b72e2d2c16bae963d97d756b897f587e89c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.8.10 Windows/10
|
Release files / nw_ssh-1.0.4-py3-none-any.whl
| Download URL | nw_ssh-1.0.4-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a7215d01d88a313bc0359b7b02c8060728b460574fccc571498d3eae18531aa5
|
|
BLAKE2b-256 checksum How to use checksums |
601b4c26647ff25286cfd65b17358658b404f4295f0256f48baaf7caf270207e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.8.10 Windows/10
|
Security for nw-ssh 1.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.