gnetclisdk


Namegnetclisdk JSON
Version 1.0.54 PyPI version JSON
download
home_pagehttps://github.com/annetutil/gnetcli
SummaryClient for Gnetcli GRPC-server
upload_time2024-12-23 22:01:12
maintainerNone
docs_urlNone
authorAlexander Balezin
requires_pythonNone
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ## 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](https://annetutil.github.io/gnetcli/).

Example:

```python
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'
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/annetutil/gnetcli",
    "name": "gnetclisdk",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "Alexander Balezin",
    "author_email": "gescheit12@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/99/b7/da5c2467a16d590792c57e03e9370428994f62499a6dd6b7e34cdcd4838c/gnetclisdk-1.0.54.tar.gz",
    "platform": null,
    "description": "## Python client for Gnetcli GRPC server\n\nGnetcli provides a universal way to execute arbitrary commands using a CLI,\neliminating the need for screen scraping with expect.\n\nSee documentation on [gnetcli server](https://annetutil.github.io/gnetcli/).\n\nExample:\n\n```python\nfrom gnetclisdk.client import Credentials, Gnetcli\nimport os, asyncio\n\nasync def example():\n    api = Gnetcli(insecure_grpc=True)\n    dev_creds = Credentials(os.environ.get(\"LOGIN\"), os.environ.get(\"PASSWORD\"))\n    res = await api.cmd(hostname=\"myhost\", device=\"huawei\", cmd=\"dis clock\", credentials=dev_creds)\n    print(\"err=%s status=%s out=%s\" % (res.error, res.status, res.out))\n\nasyncio.run(example())\n```\n\nOutput:\n```\nerr=b'' status=0 out=b'2023-11-10 09:31:58\\nFriday\\nTime Zone(UTC) : UTC'\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Client for Gnetcli GRPC-server",
    "version": "1.0.54",
    "project_urls": {
        "Homepage": "https://github.com/annetutil/gnetcli"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "05aebef3e8c5004d16dd12ab4a1c35d9313c70bbcd9ea5605bb7019625c90151",
                "md5": "39c01218e7a5b11f47b6469f3586bef6",
                "sha256": "4abb1c057b12c3fec7ba0b3be06ee0c434ce2fac6f2986fca41e9c0041c9e5b8"
            },
            "downloads": -1,
            "filename": "gnetclisdk-1.0.54-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "39c01218e7a5b11f47b6469f3586bef6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 14217,
            "upload_time": "2024-12-23T22:01:09",
            "upload_time_iso_8601": "2024-12-23T22:01:09.940567Z",
            "url": "https://files.pythonhosted.org/packages/05/ae/bef3e8c5004d16dd12ab4a1c35d9313c70bbcd9ea5605bb7019625c90151/gnetclisdk-1.0.54-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "99b7da5c2467a16d590792c57e03e9370428994f62499a6dd6b7e34cdcd4838c",
                "md5": "54dd60b2f80820f8fab020296db0cb39",
                "sha256": "fb29e31cc1a8bd415533bc7250ddee36a23a4e9b75bd12c79f0f4509c79b730a"
            },
            "downloads": -1,
            "filename": "gnetclisdk-1.0.54.tar.gz",
            "has_sig": false,
            "md5_digest": "54dd60b2f80820f8fab020296db0cb39",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 13463,
            "upload_time": "2024-12-23T22:01:12",
            "upload_time_iso_8601": "2024-12-23T22:01:12.454900Z",
            "url": "https://files.pythonhosted.org/packages/99/b7/da5c2467a16d590792c57e03e9370428994f62499a6dd6b7e34cdcd4838c/gnetclisdk-1.0.54.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-23 22:01:12",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "annetutil",
    "github_project": "gnetcli",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "gnetclisdk"
}
        
Elapsed time: 0.45929s