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.37.tar.gz
(13.4 kB
view details)
Built Distribution
File details
Details for the file gnetclisdk-1.0.37.tar.gz
.
File metadata
- Download URL: gnetclisdk-1.0.37.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 | 3d277940fb94281cb9bb36369ea379c34b4c4eed2bef482e99506b5b88c40e99 |
|
MD5 | c67ac59bc48e34178796d14b25759304 |
|
BLAKE2b-256 | 7a48e3266ba0ddbc91b32887da3d31bc28c8772c38194e5abc9b7cd4143253f6 |
Provenance
The following attestation bundles were made for gnetclisdk-1.0.37.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.37.tar.gz
- Subject digest:
3d277940fb94281cb9bb36369ea379c34b4c4eed2bef482e99506b5b88c40e99
- Sigstore transparency entry: 146842297
- Sigstore integration time:
- Predicate type:
File details
Details for the file gnetclisdk-1.0.37-py3-none-any.whl
.
File metadata
- Download URL: gnetclisdk-1.0.37-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 | 06ec4619f6cc06a927d09ea19917195a8a08a07db73eb2ece5d1cbb98666c9ea |
|
MD5 | a9848552ba74c372e757333b35804a2d |
|
BLAKE2b-256 | 4ee708eb5b7e89731a913c79240e4e40539c9b1d7a37ab4cbff97b43b6336a95 |
Provenance
The following attestation bundles were made for gnetclisdk-1.0.37-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.37-py3-none-any.whl
- Subject digest:
06ec4619f6cc06a927d09ea19917195a8a08a07db73eb2ece5d1cbb98666c9ea
- Sigstore transparency entry: 146842298
- Sigstore integration time:
- Predicate type: