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.35.tar.gz
(13.5 kB
view details)
Built Distribution
File details
Details for the file gnetclisdk-1.0.35.tar.gz
.
File metadata
- Download URL: gnetclisdk-1.0.35.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 | c1b08b6d501e9a84be4a1323f8af2571a41969569193bf088e83f550b21a2585 |
|
MD5 | 8cce9b3edfa195895b8c16d98cf15749 |
|
BLAKE2b-256 | e284e78c08374e0bfa6d829133ec9464a2480459397f73d8a248b4901864a1ca |
Provenance
The following attestation bundles were made for gnetclisdk-1.0.35.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.35.tar.gz
- Subject digest:
c1b08b6d501e9a84be4a1323f8af2571a41969569193bf088e83f550b21a2585
- Sigstore transparency entry: 146676821
- Sigstore integration time:
- Predicate type:
File details
Details for the file gnetclisdk-1.0.35-py3-none-any.whl
.
File metadata
- Download URL: gnetclisdk-1.0.35-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 | addbb870131ef884d7360ef06cfecf655b68733877bf11497da992340464f3f1 |
|
MD5 | 4d2242f8e5d3ede3f16a36b27ecd1ae3 |
|
BLAKE2b-256 | ee061976375d3ca1f6da4de2b495aed8b81af929b4827651aee7a7ad48a28b47 |
Provenance
The following attestation bundles were made for gnetclisdk-1.0.35-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.35-py3-none-any.whl
- Subject digest:
addbb870131ef884d7360ef06cfecf655b68733877bf11497da992340464f3f1
- Sigstore transparency entry: 146676823
- Sigstore integration time:
- Predicate type: