Metadata-Version: 2.1
Name: hapless
Version: 0.13.0
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.8,<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.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Unix Shell
Classifier: Topic :: System
Classifier: Topic :: Utilities
Provides-Extra: dev
Requires-Dist: click (>=8.1.2,<9.0.0)
Requires-Dist: django-environ (>=0.11.2,<0.12.0) ; python_version < "3.9"
Requires-Dist: django-environ (>=0.12.0,<0.13.0) ; python_version >= "3.9"
Requires-Dist: humanize (>=4.1.0,<5.0.0)
Requires-Dist: nox (>=2024.10.9,<2025.0.0) ; extra == "dev"
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: pytest-env (>=1.1.2,<2.0.0) ; extra == "dev"
Requires-Dist: rich (>=13.5.2,<14.0.0)
Requires-Dist: ruff (>=0.9.0,<0.10.0) ; extra == "dev"
Requires-Dist: structlog (>=25.4.0,<26.0.0)
Requires-Dist: typing-extensions (==4.0.0)
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

Changes made in each release can be found on the [Releases](https://github.com/bmwant/hapless/releases) page.

Python versions compatibility:

* `0.11.1` is the last version to support Python `3.7`

### 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!

