![Ver/TestedPython](https://img.shields.io/pypi/pyversions/cli_user)
![Ver/Os](https://img.shields.io/badge/os_development-Windows-blue)
![repo/Created](https://img.shields.io/github/created-at/centroid457/cli_user)
![Commit/Last](https://img.shields.io/github/last-commit/centroid457/cli_user)
![Tests/GitHubWorkflowStatus](https://github.com/centroid457/cli_user/actions/workflows/test_linux.yml/badge.svg)
![Tests/GitHubWorkflowStatus](https://github.com/centroid457/cli_user/actions/workflows/test_windows.yml/badge.svg)
![repo/Size](https://img.shields.io/github/repo-size/centroid457/cli_user)
![Commit/Count/t](https://img.shields.io/github/commit-activity/t/centroid457/cli_user)
![Commit/Count/y](https://img.shields.io/github/commit-activity/y/centroid457/cli_user)
![Commit/Count/m](https://img.shields.io/github/commit-activity/m/centroid457/cli_user)
# cli_user (current v0.1.3/![Ver/Pypi Latest](https://img.shields.io/pypi/v/cli_user?label=pypi%20latest))
## DESCRIPTION_SHORT
send commands into system terminal
## DESCRIPTION_LONG
Designed to send commands into OS terminal
## Features
1. send commands into OS terminal
2. check if cli commands are accessible (special utilities is installed)
3. access to standard parts of result in a simple ready-to-use form (stdout/stderr/retcode/full state)
4. use batch timeout for list
5. till_first_true
6. counter/counter_in_list
********************************************************************************
## License
See the [LICENSE](LICENSE) file for license rights and limitations (MIT).
## Release history
See the [HISTORY.md](HISTORY.md) file for release history.
## Installation
```commandline
pip install cli-user
```
## Import
```python
from cli_user import *
```
********************************************************************************
## USAGE EXAMPLES
See tests, sourcecode and docstrings for other examples.
------------------------------
### 1. example1.py
```python
from cli_user import *
print()
print()
print()
print()
victim = CliUser()
victim.send("ping localhost", timeout=0.1)
print()
# victim.print_state()
"""
[CLI_SEND] [ping localhost]
....
==================================================
[#####################ERROR#####################]
self.counter=1
self.counter_in_list=0
self.last_cmd='ping localhost'
self.last_duration=1.041
self.last_finished=True
self.last_finished_success=False
self.last_retcode=None
--------------------------------------------------
self.last_stdout=
|''
|'Обмен пакетами с starichenko.corp.element-t.ru [::1] с 32 байтами данных:'
|'Ответ от ::1: время<1мс '
|'Ответ от ::1: время<1мс '
|''
--------------------------------------------------
self.last_stderr=
--------------------------------------------------
self.last_exx_timeout=Exx_CliTimeout()
==================================================
"""
print()
print()
print()
print()
victim.send(["python --version", ("ping localhost", 0.1), ])
"""
[CLI_SEND] [python --version]
.
[CLI_SEND] [('ping localhost', 0.1)]
....
==================================================
[#####################ERROR#####################]
self.counter=3
self.counter_in_list=2
self.last_cmd='ping localhost'
self.last_duration=1.042
self.last_finished=True
self.last_finished_success=False
self.last_retcode=None
--------------------------------------------------
self.last_stdout=
|''
|'Обмен пакетами с starichenko.corp.element-t.ru [::1] с 32 байтами данных:'
|'Ответ от ::1: время<1мс '
|'Ответ от ::1: время<1мс '
|''
--------------------------------------------------
self.last_stderr=
--------------------------------------------------
self.last_exx_timeout=Exx_CliTimeout()
==================================================
[ERROR] cmd_item=('ping localhost', 0.1) in full sequence cmd=['python --version', ('ping localhost', 0.1)]
"""
```
********************************************************************************
Raw data
{
"_id": null,
"home_page": "https://github.com/centroid457/",
"name": "cli-user",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "cli, cli user, cli sender, os terminal, os terminal sender, os terminal user",
"author": "Andrei Starichenko",
"author_email": "centroid@mail.ru",
"download_url": "https://files.pythonhosted.org/packages/87/39/cb0ea9629394ab05b6598be42df8891251627914c5c8a43a3ee4a8f9ce22/cli_user-0.1.3.tar.gz",
"platform": null,
"description": "![Ver/TestedPython](https://img.shields.io/pypi/pyversions/cli_user)\r\n![Ver/Os](https://img.shields.io/badge/os_development-Windows-blue) \r\n![repo/Created](https://img.shields.io/github/created-at/centroid457/cli_user)\r\n![Commit/Last](https://img.shields.io/github/last-commit/centroid457/cli_user)\r\n![Tests/GitHubWorkflowStatus](https://github.com/centroid457/cli_user/actions/workflows/test_linux.yml/badge.svg)\r\n![Tests/GitHubWorkflowStatus](https://github.com/centroid457/cli_user/actions/workflows/test_windows.yml/badge.svg) \r\n![repo/Size](https://img.shields.io/github/repo-size/centroid457/cli_user)\r\n![Commit/Count/t](https://img.shields.io/github/commit-activity/t/centroid457/cli_user)\r\n![Commit/Count/y](https://img.shields.io/github/commit-activity/y/centroid457/cli_user)\r\n![Commit/Count/m](https://img.shields.io/github/commit-activity/m/centroid457/cli_user)\r\n\r\n# cli_user (current v0.1.3/![Ver/Pypi Latest](https://img.shields.io/pypi/v/cli_user?label=pypi%20latest))\r\n\r\n## DESCRIPTION_SHORT\r\nsend commands into system terminal\r\n\r\n## DESCRIPTION_LONG\r\nDesigned to send commands into OS terminal\r\n\r\n\r\n## Features\r\n1. send commands into OS terminal \r\n2. check if cli commands are accessible (special utilities is installed) \r\n3. access to standard parts of result in a simple ready-to-use form (stdout/stderr/retcode/full state) \r\n4. use batch timeout for list \r\n5. till_first_true \r\n6. counter/counter_in_list \r\n\r\n\r\n********************************************************************************\r\n## License\r\nSee the [LICENSE](LICENSE) file for license rights and limitations (MIT).\r\n\r\n\r\n## Release history\r\nSee the [HISTORY.md](HISTORY.md) file for release history.\r\n\r\n\r\n## Installation\r\n```commandline\r\npip install cli-user\r\n```\r\n\r\n\r\n## Import\r\n```python\r\nfrom cli_user import *\r\n```\r\n\r\n\r\n********************************************************************************\r\n## USAGE EXAMPLES\r\nSee tests, sourcecode and docstrings for other examples. \r\n\r\n------------------------------\r\n### 1. example1.py\r\n```python\r\nfrom cli_user import *\r\n\r\nprint()\r\nprint()\r\nprint()\r\nprint()\r\nvictim = CliUser()\r\nvictim.send(\"ping localhost\", timeout=0.1)\r\nprint()\r\n# victim.print_state()\r\n\"\"\"\r\n[CLI_SEND] [ping localhost]\r\n....\r\n==================================================\r\n[#####################ERROR#####################]\r\nself.counter=1\r\nself.counter_in_list=0\r\nself.last_cmd='ping localhost'\r\nself.last_duration=1.041\r\nself.last_finished=True\r\nself.last_finished_success=False\r\nself.last_retcode=None\r\n--------------------------------------------------\r\nself.last_stdout=\r\n\t|''\r\n\t|'\u0420\u045b\u0420\u00b1\u0420\u0458\u0420\u00b5\u0420\u0405 \u0420\u0457\u0420\u00b0\u0420\u0454\u0420\u00b5\u0421\u201a\u0420\u00b0\u0420\u0458\u0420\u0451 \u0421\u0403 starichenko.corp.element-t.ru [::1] \u0421\u0403 32 \u0420\u00b1\u0420\u00b0\u0420\u2116\u0421\u201a\u0420\u00b0\u0420\u0458\u0420\u0451 \u0420\u0491\u0420\u00b0\u0420\u0405\u0420\u0405\u0421\u2039\u0421\u2026:'\r\n\t|'\u0420\u045b\u0421\u201a\u0420\u0406\u0420\u00b5\u0421\u201a \u0420\u0455\u0421\u201a ::1: \u0420\u0406\u0421\u0402\u0420\u00b5\u0420\u0458\u0421\u040f<1\u0420\u0458\u0421\u0403 '\r\n\t|'\u0420\u045b\u0421\u201a\u0420\u0406\u0420\u00b5\u0421\u201a \u0420\u0455\u0421\u201a ::1: \u0420\u0406\u0421\u0402\u0420\u00b5\u0420\u0458\u0421\u040f<1\u0420\u0458\u0421\u0403 '\r\n\t|''\r\n--------------------------------------------------\r\nself.last_stderr=\r\n--------------------------------------------------\r\nself.last_exx_timeout=Exx_CliTimeout()\r\n==================================================\r\n\"\"\"\r\n\r\nprint()\r\nprint()\r\nprint()\r\nprint()\r\nvictim.send([\"python --version\", (\"ping localhost\", 0.1), ])\r\n\"\"\"\r\n[CLI_SEND] [python --version]\r\n.\r\n[CLI_SEND] [('ping localhost', 0.1)]\r\n....\r\n==================================================\r\n[#####################ERROR#####################]\r\nself.counter=3\r\nself.counter_in_list=2\r\nself.last_cmd='ping localhost'\r\nself.last_duration=1.042\r\nself.last_finished=True\r\nself.last_finished_success=False\r\nself.last_retcode=None\r\n--------------------------------------------------\r\nself.last_stdout=\r\n\t|''\r\n\t|'\u0420\u045b\u0420\u00b1\u0420\u0458\u0420\u00b5\u0420\u0405 \u0420\u0457\u0420\u00b0\u0420\u0454\u0420\u00b5\u0421\u201a\u0420\u00b0\u0420\u0458\u0420\u0451 \u0421\u0403 starichenko.corp.element-t.ru [::1] \u0421\u0403 32 \u0420\u00b1\u0420\u00b0\u0420\u2116\u0421\u201a\u0420\u00b0\u0420\u0458\u0420\u0451 \u0420\u0491\u0420\u00b0\u0420\u0405\u0420\u0405\u0421\u2039\u0421\u2026:'\r\n\t|'\u0420\u045b\u0421\u201a\u0420\u0406\u0420\u00b5\u0421\u201a \u0420\u0455\u0421\u201a ::1: \u0420\u0406\u0421\u0402\u0420\u00b5\u0420\u0458\u0421\u040f<1\u0420\u0458\u0421\u0403 '\r\n\t|'\u0420\u045b\u0421\u201a\u0420\u0406\u0420\u00b5\u0421\u201a \u0420\u0455\u0421\u201a ::1: \u0420\u0406\u0421\u0402\u0420\u00b5\u0420\u0458\u0421\u040f<1\u0420\u0458\u0421\u0403 '\r\n\t|''\r\n--------------------------------------------------\r\nself.last_stderr=\r\n--------------------------------------------------\r\nself.last_exx_timeout=Exx_CliTimeout()\r\n==================================================\r\n[ERROR] cmd_item=('ping localhost', 0.1) in full sequence cmd=['python --version', ('ping localhost', 0.1)]\r\n\"\"\"\r\n```\r\n\r\n********************************************************************************\r\n",
"bugtrack_url": null,
"license": null,
"summary": "send commands into system terminal",
"version": "0.1.3",
"project_urls": {
"Homepage": "https://github.com/centroid457/",
"Source": "https://github.com/centroid457/cli_user"
},
"split_keywords": [
"cli",
" cli user",
" cli sender",
" os terminal",
" os terminal sender",
" os terminal user"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b30e8eb53101e0dd458c4f2354c92bacf4b95730cad7a10fbdce9381b5deb5d3",
"md5": "0ff0ed5b05cd2d8868e85a017af7bf32",
"sha256": "46a901564b180418e577555de31c53d194b0e7dab143c0b5c0153e26e3e699f9"
},
"downloads": -1,
"filename": "cli_user-0.1.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0ff0ed5b05cd2d8868e85a017af7bf32",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 6995,
"upload_time": "2024-07-17T14:48:53",
"upload_time_iso_8601": "2024-07-17T14:48:53.403505Z",
"url": "https://files.pythonhosted.org/packages/b3/0e/8eb53101e0dd458c4f2354c92bacf4b95730cad7a10fbdce9381b5deb5d3/cli_user-0.1.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8739cb0ea9629394ab05b6598be42df8891251627914c5c8a43a3ee4a8f9ce22",
"md5": "54ec9fc95538fb17cd262e1267611d61",
"sha256": "fc2c079715c27a20d4469af5f4a7b691719ea34f690d9e2f98163ff564d29005"
},
"downloads": -1,
"filename": "cli_user-0.1.3.tar.gz",
"has_sig": false,
"md5_digest": "54ec9fc95538fb17cd262e1267611d61",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 8207,
"upload_time": "2024-07-17T14:48:54",
"upload_time_iso_8601": "2024-07-17T14:48:54.422340Z",
"url": "https://files.pythonhosted.org/packages/87/39/cb0ea9629394ab05b6598be42df8891251627914c5c8a43a3ee4a8f9ce22/cli_user-0.1.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-17 14:48:54",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "centroid457",
"github_project": "cli_user",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "pytest",
"specs": []
},
{
"name": "requirements-checker",
"specs": []
},
{
"name": "object-info",
"specs": []
},
{
"name": "funcs-aux",
"specs": []
},
{
"name": "classes-aux",
"specs": []
},
{
"name": "logger-aux",
"specs": []
},
{
"name": "pytest-aux",
"specs": []
},
{
"name": "annot_attrs",
"specs": []
},
{
"name": "numpy",
"specs": []
}
],
"lcname": "cli-user"
}