Client for Gnetcli GRPC-server
Project description
Python client for Gnetcli GRPC server
Gnetcli provides a universal way to execute arbitrary commands using a CLI, eliminating the need for screen scraping with expect.
See documentation on gnetcli server.
Example:
from gnetclisdk.client import Credentials, Gnetcli
import os, asyncio
async def example():
api = Gnetcli(insecure_grpc=True)
dev_creds = Credentials(os.environ.get("LOGIN"), os.environ.get("PASSWORD"))
res = await api.cmd(hostname="myhost", device="huawei", cmd="dis clock", credentials=dev_creds)
print("err=%s status=%s out=%s" % (res.error, res.status, res.out))
asyncio.run(example())
Output:
err=b'' status=0 out=b'2023-11-10 09:31:58\nFriday\nTime Zone(UTC) : UTC'
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
gnetclisdk-1.0.32.tar.gz
(13.3 kB
view details)
Built Distribution
File details
Details for the file gnetclisdk-1.0.32.tar.gz
.
File metadata
- Download URL: gnetclisdk-1.0.32.tar.gz
- Upload date:
- Size: 13.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88789ed9b74d587b17d037da39fb3bb446b7145e02b09c3070b4b216bf433988 |
|
MD5 | 6a017f805d83fa6619e1c0f96b1c7252 |
|
BLAKE2b-256 | 2a86767f291e2fcfda210a78bce9f0a5c3ca6766d275b0580a3970e2b4952162 |
File details
Details for the file gnetclisdk-1.0.32-py3-none-any.whl
.
File metadata
- Download URL: gnetclisdk-1.0.32-py3-none-any.whl
- Upload date:
- Size: 14.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 421a0952dde63734c6e519891cd4fd487ddad2d5f4feb0f742a105a519773719 |
|
MD5 | d581eb3be8085beff5dea0ad8be0f97f |
|
BLAKE2b-256 | 179b03d6fdf76e004d3b897dcb8dd1b9620dc794c2af44ca5b00ee563d693575 |