Metadata-Version: 2.1
Name: hapless
Version: 0.7.1
Summary: Run and track processes in background
Home-page: https://github.com/bmwant/hapless
License: MIT
Keywords: cli,job,runner,background,process
Author: Misha Behersky
Author-email: bmwant@gmail.com
Requires-Python: >=3.7,<4.0
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: Unix
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Unix Shell
Classifier: Topic :: System
Classifier: Topic :: Utilities
Provides-Extra: dev
Requires-Dist: backports.cached-property (>=1.0.2,<2.0.0) ; python_version < "3.8"
Requires-Dist: click (>=8.1.2,<9.0.0)
Requires-Dist: humanize (>=4.1.0,<5.0.0)
Requires-Dist: importlib-metadata (>=4.11.3,<5.0.0) ; python_version < "3.8"
Requires-Dist: nox (>=2024.10.9,<2025.0.0) ; python_version >= "3.8"
Requires-Dist: psutil (>=6.1.0,<7.0.0)
Requires-Dist: pytest (>=7.4.4,<8.0.0) ; extra == "dev"
Requires-Dist: pytest-cov (>=3.0.0,<4.0.0) ; extra == "dev"
Requires-Dist: rich (>=13.5.2,<14.0.0)
Requires-Dist: ruff (>=0.9.0,<0.10.0) ; extra == "dev"
Project-URL: Blog post, https://bmwant.link/hapless-easily-run-and-manage-background-processes/
Project-URL: Repository, https://github.com/bmwant/hapless
Description-Content-Type: text/markdown

## hapless

![Checks](https://github.com/bmwant/hapless/actions/workflows/tests.yml/badge.svg)
[![PyPI](https://img.shields.io/pypi/v/hapless)](https://pypi.org/project/hapless/)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/hapless)


[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![EditorConfig](https://img.shields.io/badge/-EditorConfig-grey?logo=editorconfig)](https://editorconfig.org/)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)

> **hapless** (*adjective*) - (especially of a person) unfortunate. A developer who accidentally launched long-running process in the foreground.

Simplest way of running and tracking processes in the background.

[![asciicast](https://asciinema.org/a/489924.svg)](https://asciinema.org/a/489924?speed=2)

### Installation

```bash
$ pip install hapless

# or to make sure proper pip is used for the given python executable
$ python -m pip install hapless
```

Install into user-specific directory in case of any permissions-related issues.

```bash
$ pip install --user hapless
$ python -m pip install --user hapless
```

### Usage

```bash
# Run arbitrary script
$ hap run -- python long_running.py

# Show summary table
$ hap

# Display status of the specific process
$ hap status 1
```

See [USAGE.md](https://github.com/bmwant/hapless/blob/main/USAGE.md) for the complete list of commands and available parameters.

### Contribute

See [DEVELOP.md](https://github.com/bmwant/hapless/blob/main/DEVELOP.md) to setup your local development environment and feel free to create a pull request with a new feature.

### Releases changelog

Changelog file was removed; you can now view the changes made in each release on the [Releases](https://github.com/bmwant/hapless/releases) page.

### See also

* [Rich](https://rich.readthedocs.io/en/stable/introduction.html) console UI library.
* [Supervisor](http://supervisord.org/) full-fledged process manager.
* [podmena](https://github.com/bmwant/podmena) provides nice emoji icons to commit messages.

### Support 🇺🇦 Ukraine in the war!

🇺🇦 Donate to [this foundation](https://prytulafoundation.org/en) in case you want to help. Every donation matter!

