Skip to main content

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


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.39.tar.gz (13.5 kB view details)

Uploaded Source

Built Distribution

gnetclisdk-1.0.39-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

Details for the file gnetclisdk-1.0.39.tar.gz.

File metadata

  • Download URL: gnetclisdk-1.0.39.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

Hashes for gnetclisdk-1.0.39.tar.gz
Algorithm Hash digest
SHA256 3475e12df1f536a3bfd503725e2db2df73935a2db249ac5bca459f491f83b472
MD5 e722e62f2946f61a68ef1317c3a21560
BLAKE2b-256 198a7501d68410a077ddc4c0d9900a874904db999e33f46c3387d73602d13aff

See more details on using hashes here.

Provenance

The following attestation bundles were made for gnetclisdk-1.0.39.tar.gz:

Publisher: publish-to-pypi.yml on annetutil/gnetcli

Attestations:

File details

Details for the file gnetclisdk-1.0.39-py3-none-any.whl.

File metadata

  • Download URL: gnetclisdk-1.0.39-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

Hashes for gnetclisdk-1.0.39-py3-none-any.whl
Algorithm Hash digest
SHA256 17656f9cb1e09a55e707ae4a619de22aa53cde68f39bebc80344f49406914c1d
MD5 d22fc2b0dc8118bd96dce0fcc8988772
BLAKE2b-256 b9b579ce1cf661bde6f522d9a1872e0a77716368314cdb11e71b727bf56e0a70

See more details on using hashes here.

Provenance

The following attestation bundles were made for gnetclisdk-1.0.39-py3-none-any.whl:

Publisher: publish-to-pypi.yml on annetutil/gnetcli

Attestations:

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page