Metadata-Version: 2.4
Name: os_script
Version: 0.5.8
Summary: Library for shell scripting in Python
Author-email: heX <hex1625616@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/heX16/os-script
Project-URL: Repository, https://github.com/heX16/os-script
Project-URL: Issues, https://github.com/heX16/os-script/issues
Keywords: shell,scripting,system,files,processes,utils
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.3
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: psutil>=5.5.0
Provides-Extra: dev
Requires-Dist: pytest>=6.0; extra == "dev"
Requires-Dist: black; extra == "dev"
Requires-Dist: isort; extra == "dev"
Dynamic: license-file

# os_script

Library for operation system scripting in Python.

- Run shell commands via `run_command()` or multi-line `run()` (optionally capture output).
- File helpers: find/list, read/write content, copy/move/remove, timestamps.
- Process helpers (via `psutil`).
- Datetime formatting/parsing and small config/text utilities.

## Install

PyPI: [https://pypi.org/project/os-script/](https://pypi.org/project/os-script/)

```bash
pip install os-script
```

## Quick example

```python
from os_script import *

result = run_command('python --version', capture_output=True)
print(result.stdout.getvalue().strip())

for path in find('.', '*.py', recursively=True):
    print(path)

run('echo hello')

# Multiple commands, one per line
run('''
mkdir -p /tmp/os_script_demo
python --version > /tmp/os_script_demo/tmpfile.txt
ls /tmp/os_script_demo
rm /tmp/os_script_demo/tmpfile.txt
''')


```
