Metadata-Version: 2.5
Name: shell-interface
Version: 3.0.1
Summary: Helpful and convenient utilities to interact with UNIX shells
Project-URL: Homepage, https://github.com/MaxG87/shell-interface
Project-URL: Repository, https://github.com/MaxG87/shell-interface
Project-URL: Issues, https://github.com/MaxG87/shell-interface/issues
Project-URL: Changelog, https://github.com/MaxG87/shell-interface/blob/main/CHANGELOG.md
Author-email: Max Görner <5477952+MaxG87@users.noreply.github.com>
License-Expression: GPL-3.0-or-later
License-File: LICENSE
Requires-Python: >=3.9
Description-Content-Type: text/markdown

[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
[![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](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}")
```
