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.38.tar.gz
(13.4 kB
view details)
Built Distribution
File details
Details for the file gnetclisdk-1.0.38.tar.gz
.
File metadata
- Download URL: gnetclisdk-1.0.38.tar.gz
- Upload date:
- Size: 13.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c4919db5f269b29752a10554e4e5acc1d24bd1ae47c8b0ee18a3770dd3ab863 |
|
MD5 | f1c81af563dd13102234b2538a8ac9ff |
|
BLAKE2b-256 | d7ba6033f3c23cedce0aceca51f23a7543db0f8b1bb651ffc709daab135ceda3 |
Provenance
The following attestation bundles were made for gnetclisdk-1.0.38.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.38.tar.gz
- Subject digest:
0c4919db5f269b29752a10554e4e5acc1d24bd1ae47c8b0ee18a3770dd3ab863
- Sigstore transparency entry: 147576369
- Sigstore integration time:
- Predicate type:
File details
Details for the file gnetclisdk-1.0.38-py3-none-any.whl
.
File metadata
- Download URL: gnetclisdk-1.0.38-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 | f53ac90e306e8f44307a59a08380788b91e96b24e414c222bcae958c663c1a6a |
|
MD5 | 051e879621446fe7b3930ef4093a0305 |
|
BLAKE2b-256 | 2bb799d875852e1463ac2271ebdb14cd46bba8fa06fa83d255a2bbdf2c45d54c |
Provenance
The following attestation bundles were made for gnetclisdk-1.0.38-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.38-py3-none-any.whl
- Subject digest:
f53ac90e306e8f44307a59a08380788b91e96b24e414c222bcae958c663c1a6a
- Sigstore transparency entry: 147576370
- Sigstore integration time:
- Predicate type: