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.42.tar.gz
(13.5 kB
view details)
Built Distribution
File details
Details for the file gnetclisdk-1.0.42.tar.gz
.
File metadata
- Download URL: gnetclisdk-1.0.42.tar.gz
- Upload date:
- Size: 13.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71b07a8f596a8cfd1e00be8bb9e0ecfd13e4f6a7677f9fe851d89cd1cd8d207f |
|
MD5 | dafaf2b684e6270cde5128feb60dd521 |
|
BLAKE2b-256 | 96c71df369861d6aa075a81d5a4e3ac943edf2ef3075b3148d1fb8b5592ffc36 |
Provenance
The following attestation bundles were made for gnetclisdk-1.0.42.tar.gz
:
Publisher:
publish-to-pypi.yml
on annetutil/gnetcli
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
gnetclisdk-1.0.42.tar.gz
- Subject digest:
71b07a8f596a8cfd1e00be8bb9e0ecfd13e4f6a7677f9fe851d89cd1cd8d207f
- Sigstore transparency entry: 149246205
- Sigstore integration time:
- Predicate type:
File details
Details for the file gnetclisdk-1.0.42-py3-none-any.whl
.
File metadata
- Download URL: gnetclisdk-1.0.42-py3-none-any.whl
- Upload date:
- Size: 14.2 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 | dd52b80bcb4f32505a61094dc85ed8711e51d1ad4183857da360ee1cd3ad7cf1 |
|
MD5 | 77c27df3579bfd22fc923b40c075d9c5 |
|
BLAKE2b-256 | 46913a64ce1ee0782b2371687e4ab04c433028e70d183708b02e99434493f2a6 |
Provenance
The following attestation bundles were made for gnetclisdk-1.0.42-py3-none-any.whl
:
Publisher:
publish-to-pypi.yml
on annetutil/gnetcli
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
gnetclisdk-1.0.42-py3-none-any.whl
- Subject digest:
dd52b80bcb4f32505a61094dc85ed8711e51d1ad4183857da360ee1cd3ad7cf1
- Sigstore transparency entry: 149246206
- Sigstore integration time:
- Predicate type: