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

Uploaded Source

Built Distribution

gnetclisdk-0.0-py3-none-any.whl (14.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

Hashes for gnetclisdk-0.0.tar.gz
Algorithm Hash digest
SHA256 c06a46f600d67a67987300946e3e4a343d3b1be6437b043a9e3643f884844fa7
MD5 ca3d963239ba5002cd19a8aeedbf3b12
BLAKE2b-256 e6fa71e9d186aff7edbf8dc4651cb25f4c2feec1324ae65e3db36315e4eac97f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gnetclisdk-0.0-py3-none-any.whl
  • Upload date:
  • Size: 14.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for gnetclisdk-0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 157dd923e8a1769932499abf1f7eff4a3f1606e47f5279c3266ced775e735382
MD5 62f6c2afdd97910276c8a1c35c3d0f8e
BLAKE2b-256 46bb3da54a0e9b6a4a5dd31e3c024d765a9eaee572f005ae6c493be5c4cfc481

See more details on using hashes here.

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