Name | shell-interface JSON |
Version |
1.0.0
JSON |
| download |
home_page | None |
Summary | Helpful and convenient utilities to interact with UNIX shells |
upload_time | 2025-02-15 17:13:31 |
maintainer | None |
docs_url | None |
author | Max Görner |
requires_python | >=3.9 |
license | GPL-3.0-or-later |
keywords |
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
[](https://github.com/psf/black)
[](https://pycqa.github.io/isort/)
[](http://mypy-lang.org/)
[](http://www.gnu.org/licenses/gpl-3.0)
# Shell Interface
A lightweight Python library providing convenient utilities to interact with UNIX shells.
## Features
- Execute shell commands safely with error handling
- Pipe the output of one command to another
- Retrieve system user and group information
- Logging support with `loguru` (if installed)
## Usage
### Running Shell Commands
```python
from shell_interface import run_cmd
result = run_cmd(cmd=["ls", "-l"], capture_output=True)
print(result.stdout.decode())
```
### Piping Commands
```python
from shell_interface import pipe_pass_cmd_to_real_cmd
result = pipe_pass_cmd_to_real_cmd("echo Hello", ["grep", "Hello"])
print(result.stdout.decode())
```
### Getting User and Group Information
```python
from shell_interface import get_user, get_group
user = get_user()
group = get_group(user)
print(f"User: {user}, Group: {group}")
```
Raw data
{
"_id": null,
"home_page": null,
"name": "shell-interface",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": null,
"author": "Max G\u00f6rner",
"author_email": "5477952+MaxG87@users.noreply.github.com",
"download_url": "https://files.pythonhosted.org/packages/9e/28/92f4692b4df100e049884ed2b69a0cfa98c3d5c4a02729017e6f395efaf2/shell_interface-1.0.0.tar.gz",
"platform": null,
"description": "[](https://github.com/psf/black)\n[](https://pycqa.github.io/isort/)\n[](http://mypy-lang.org/)\n[](http://www.gnu.org/licenses/gpl-3.0)\n\n# Shell Interface\n\nA lightweight Python library providing convenient utilities to interact with UNIX shells.\n\n## Features\n\n- Execute shell commands safely with error handling\n- Pipe the output of one command to another\n- Retrieve system user and group information\n- Logging support with `loguru` (if installed)\n\n## Usage\n\n### Running Shell Commands\n\n```python\nfrom shell_interface import run_cmd\n\nresult = run_cmd(cmd=[\"ls\", \"-l\"], capture_output=True)\nprint(result.stdout.decode())\n```\n\n### Piping Commands\n\n```python\nfrom shell_interface import pipe_pass_cmd_to_real_cmd\n\nresult = pipe_pass_cmd_to_real_cmd(\"echo Hello\", [\"grep\", \"Hello\"])\nprint(result.stdout.decode())\n```\n\n### Getting User and Group Information\n\n```python\nfrom shell_interface import get_user, get_group\n\nuser = get_user()\ngroup = get_group(user)\nprint(f\"User: {user}, Group: {group}\")\n```\n\n",
"bugtrack_url": null,
"license": "GPL-3.0-or-later",
"summary": "Helpful and convenient utilities to interact with UNIX shells",
"version": "1.0.0",
"project_urls": {
"Changelog": "https://github.com/MaxG87/shell-interface/blob/main/CHANGELOG.md",
"Homepage": "https://github.com/MaxG87/shell-interface",
"Issues": "https://github.com/MaxG87/shell-interface/issues",
"Repository": "https://github.com/MaxG87/shell-interface"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "6e016bee8855eacb0bdd54084f77737e42ab246af72ee189a910b95bdf9ee338",
"md5": "9bc98808843cee20d769792475526ee4",
"sha256": "0144bb397ae1b11f8840fae8ca2bc69ed102e349887ef6b1a84d29cedef1b6cf"
},
"downloads": -1,
"filename": "shell_interface-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9bc98808843cee20d769792475526ee4",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 16190,
"upload_time": "2025-02-15T17:13:29",
"upload_time_iso_8601": "2025-02-15T17:13:29.346685Z",
"url": "https://files.pythonhosted.org/packages/6e/01/6bee8855eacb0bdd54084f77737e42ab246af72ee189a910b95bdf9ee338/shell_interface-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "9e2892f4692b4df100e049884ed2b69a0cfa98c3d5c4a02729017e6f395efaf2",
"md5": "d92c987f3d904038b329b0c6c9f6dfa1",
"sha256": "3055cfc96b5208d4cda75cea49c4436465a7504c7a2b0f5018057d4f21e036f7"
},
"downloads": -1,
"filename": "shell_interface-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "d92c987f3d904038b329b0c6c9f6dfa1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 15374,
"upload_time": "2025-02-15T17:13:31",
"upload_time_iso_8601": "2025-02-15T17:13:31.385246Z",
"url": "https://files.pythonhosted.org/packages/9e/28/92f4692b4df100e049884ed2b69a0cfa98c3d5c4a02729017e6f395efaf2/shell_interface-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-15 17:13:31",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "MaxG87",
"github_project": "shell-interface",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "shell-interface"
}