## 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/45/c5/6bd152d3e00c093f62be60a44cf918ae575a7773acd529b8c060ea298dd0/gnetclisdk-1.0.46.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.46",
"project_urls": {
"Homepage": "https://github.com/annetutil/gnetcli"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e025fc97c3aa1af3d976071218b83c45a52de4b33ad09085509a16141d6f3fcd",
"md5": "a86a505299a7e7a72bf356117aa5c3bf",
"sha256": "dfbf9f33b8dba96be73dacb034f6c3ac1e47376523a6e510e707fbad408a80db"
},
"downloads": -1,
"filename": "gnetclisdk-1.0.46-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a86a505299a7e7a72bf356117aa5c3bf",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 14216,
"upload_time": "2024-12-05T23:59:16",
"upload_time_iso_8601": "2024-12-05T23:59:16.560032Z",
"url": "https://files.pythonhosted.org/packages/e0/25/fc97c3aa1af3d976071218b83c45a52de4b33ad09085509a16141d6f3fcd/gnetclisdk-1.0.46-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "45c56bd152d3e00c093f62be60a44cf918ae575a7773acd529b8c060ea298dd0",
"md5": "d40693693751abbb81152dd7d4e544cb",
"sha256": "98b7bc767b0435581815006982f320273b38569703e8eb2c8dc8f4cd27a8ad73"
},
"downloads": -1,
"filename": "gnetclisdk-1.0.46.tar.gz",
"has_sig": false,
"md5_digest": "d40693693751abbb81152dd7d4e544cb",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 13472,
"upload_time": "2024-12-05T23:59:18",
"upload_time_iso_8601": "2024-12-05T23:59:18.434676Z",
"url": "https://files.pythonhosted.org/packages/45/c5/6bd152d3e00c093f62be60a44cf918ae575a7773acd529b8c060ea298dd0/gnetclisdk-1.0.46.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-05 23:59:18",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "annetutil",
"github_project": "gnetcli",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "gnetclisdk"
}