Metadata-Version: 2.4
Name: termux-api-stc
Version: 3.1.0a5
Summary: Strict Python consumer of the pinned official Termux:API command interface
License-Expression: MIT
Project-URL: Homepage, https://github.com/specter327/termux-api-stc
Project-URL: Repository, https://github.com/specter327/termux-api-stc
Project-URL: Issues, https://github.com/specter327/termux-api-stc/issues
Keywords: termux,android,termux-api,python
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
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.14
Classifier: Operating System :: Android
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: test
Requires-Dist: pytest>=8; extra == "test"
Requires-Dist: pytest-asyncio>=0.23; extra == "test"
Dynamic: license-file

# termux-api-stc

`termux-api-stc` is a Python 3 library that consumes the official Termux:API
command interface. The 3.x development line is rebuilt from a pinned upstream
baseline rather than from historical wrapper behavior.

## Baseline

- Termux:API application baseline: `v0.53.0`
- `termux/termux-api-package` pinned tree:
  `0e3f9222eea7760c76ea6368dadbdf884ab85fbf`
- Official command inventory: 57 installed scripts

## Architecture

```text
Python wrapper
    -> Command
        -> Executor
            -> official termux-* executable
                -> Termux:API backend
                    -> Android
```

The subprocess boundary never invokes a shell. `argv`, stdin, stdout, stderr,
return code and duration are preserved by `ExecutionResult`.

## API levels

Every command in the pinned baseline is available through the raw facade:

```python
from termux_api_stc import TermuxAPI
api = TermuxAPI()
result = api["termux-battery-status"].json()
```

Inspected commands additionally receive richer sync/async wrappers. Version
`3.1.0a5` consolidates the evidence-first 3.1 line: explicit empty/non-empty
payload state, conservative capability observation, richer Termux/Android
environment reporting, notification and notification-channel support, and
runtime/distribution version-consistency checks.

## Portable tests

```bash
./tests/run-tests.sh
```

Portable tests validate Python logic and command contracts with fake binaries;
they do not prove Android behavior.

## Real Termux conformance

```bash
./tests/run-device-tests.sh readonly
```

Release qualification on a real device is risk-tiered:

```bash
./tests/run-device-tests.sh readonly
./tests/run-device-tests.sh safe-effects
./tests/run-device-tests.sh qualification
```

Interactive and sensitive/stateful actions are separate explicit campaigns; they are
never silently folded into the default qualification gate. See `tests/device/README.md`
and `PRE_RELEASE.md`.
