semvec/pypi-packages huggingface dataset:
TaskLauncher 0.1.0
A cross-platform command and python script task launcher with process management.
Requires Python: >=3.7

# TaskLauncher

> 🛠️ 跨平台进程与 Python 脚本启动、监控与管理工具

TaskLauncher 是一个轻量级的 Python 包，支持在多平台下安全、灵活地启动和管理任意系统命令或 Python 脚本。它支持任务运行时资源监控、进程终止、参数传递、异常保护等特性，专为自动化和系统集成场景设计。

---

## 主要功能

- 支持跨平台启动任意命令或 Python 脚本
- 自动识别主机操作系统信息
- 返回进程号、唯一任务标识（tag）及启动信息
- 实时获取进程资源占用、状态与运行时间
- 支持进程中止、强制杀死
- 支持参数化执行
- 失败时不会影响主进程或系统
- Python 脚本专属执行接口（自动格式化参数）
- 易于集成与扩展

---

## 安装

```bash
pip install tasklauncher
````

或从源码安装：

```bash
git clone https://github.com/yourgithub/TaskLauncher.git
cd TaskLauncher
pip install .
```

---

## 快速上手

### 启动任意命令

```python
from tasklauncher.core import TaskLauncher

launcher = TaskLauncher()
result = launcher.run_command('ls' if launcher.system_info['system'] != 'Windows' else 'dir', shell=True)
print(result)
```

### 启动 Python 脚本（自动参数格式化）

```python
info = launcher.run_python('example.py', 'arg1', 42)
print(info)
```

### 查询任务状态与资源

```python
tag = info['tag']
status = launcher.task_status(tag)
print(status)
```

### 等待任务结束并获取输出

```python
result = launcher.wait_task(tag)
print(result)
```

### 停止/强杀任务

```python
launcher.stop_task(tag)      # 优雅终止
launcher.stop_task(tag, force=True)  # 强制杀死
```

---

## API 参考

### TaskLauncher 类

| 方法                                                  | 说明                |
| --------------------------------------------------- | ----------------- |
| `run_command(cmd, ...)`                             | 启动任意命令，返回tag、pid等 |
| `run_python(pyfile, *args, python_executable, ...)` | 启动Python脚本        |
| `stop_task(tag, force=False)`                       | 停止（或强制终止）任务       |
| `task_status(tag)`                                  | 获取任务运行状态及资源情况     |
| `wait_task(tag, timeout=None)`                      | 等待任务结束，获取输出       |

详见代码注释或文档。

---

## 测试

1. 在 `tests/` 目录中加入 `example.py`：

   ```python
   print("Hello, World!")
   ```
2. 运行测试：

   ```bash
   pip install pytest
   pytest tests/
   ```

---

## 如何贡献

1. Fork 本项目并创建分支
2. 提交 PR（合并请求）前请确保单元测试通过
3. 欢迎修复bug、新增特性或优化文档

---

## License

MIT License

---

## 联系

如有建议、需求或 bug，欢迎 issue 或 PR！
coherent.licensed 0.5.2
License management tooling for Coherent System and skeleton projects
Requires Python: >=3.9

[![](https://img.shields.io/pypi/v/coherent.licensed)](https://pypi.org/project/coherent.licensed)

![](https://img.shields.io/pypi/pyversions/coherent.licensed)

[![](https://github.com/coherent-oss/coherent.licensed/actions/workflows/main.yml/badge.svg)](https://github.com/coherent-oss/coherent.licensed/actions?query=workflow%3A%22tests%22)

[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)

[![Coherent Software Development System](https://img.shields.io/badge/coherent%20system-informational)](https://github.com/coherent-oss/system)

This library was built for [coherent.build](https://github.com/coherent-oss/coherent.build) and [skeleton](https://blog.jaraco.com/skeleton) projects to inject a license file at build time to reflect the license declared in the License Expression.

## Setuptools Plugin

### Installation

This plugin is intended only to be installed as a build requirement. Avoid installing it except temporarily for a build that requires it. If it is installed to a shared/system environment, it will be activated for all Setuptools builds and emit a warning. If the target ecosystem expects build artifacts to be installed to a shared environment, the warning can be disabled by setting `COHERENT_LICENSED_UNUSED_ACTION=ignore`.
utilsx 0.0.0a5
A collection of useful constants and generic functions for Python
Requires Python: >=3.10

# UtilsX

[![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
![mypy](https://img.shields.io/badge/mypy-checked-brightgreen)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)
![Python 3.12](https://img.shields.io/badge/python-3.12-blue.svg)

A collection of useful constants and generic functions for Python.

**Available utilities:**

* 🪨 **Constants**: `MINUTES_IN_HOUR`, `GRAMS_IN_LBS`...
* 📋 **Dictionary operations**: filtering, sorting, summation...
* 🧮 **Math operations**: safe division, scaling, normalization...
* 🗄️ **Collections utils**: get duplicates, check all elements are equal...
* ⛔ **Common exceptions**: raise if any negative values, `KeyError` with fix suggestions...
* 📝 **Text**: add suffix with a delimiter...
* 🇹 [**Type variables**](https://docs.python.org/3/library/typing.html#typing.TypeVar) for you to use in custom generic functions.

**Great developer experience:**

* 🐍 Installable via `pip`
* 🤝 Supports all Python versions >= 3.10
* ⛓️ Compatible with type checkers (`mypy`, ...)
* 🪶 Lightweight: has no dependencies

UtilsX aims to provide convenient machinery for generic operations,
so you can focus on the domain logic of your projects.

## Getting started

### Installation

UtilsX is available as `utilsx` on PyPI:

```shell
# With uv's pip interface
uv pip install utilsx

# With uv's project management interface
uv add utilsx

# With plain pip
pip install utilsx
```

### Usage

Import components of UtilsX into your Python files and use just like any other library:

```python
from utilsx import safe_divide

profit = 12
capital = 0

roe = safe_divide(profit, capital)
print(f"Return on equity: {roe:.0%}")
# Output: Return on equity: 0%
```