Shared runtime and scaffolding contract for Python CLI/TUI apps
Project description
rgw-cli-contract
rgw-cli-contract is the shared runtime and scaffolding contract for Ryan's
Python CLI/TUI apps.
It has two jobs:
- provide a small runtime layer for exact
-h,-v,-u, andconf - sync canonical root files such as
install.sh,push_release_upgrade.sh, and baseline contract tests into app repos
Runtime
from pathlib import Path
from rgw_cli_contract import AppSpec, run_app
APP_SPEC = AppSpec(
app_name="demo",
version="0.0.0",
help_text="demo\n",
install_script_path=Path(__file__).resolve().with_name("install.sh"),
no_args_mode="dispatch",
)
def dispatch(argv: list[str]) -> int:
print(argv)
return 0
raise SystemExit(run_app(APP_SPEC, ["-h"], dispatch))
Sync
Create cli_contract.toml in an app repo, then run:
PYTHONPATH=src python -m rgw_cli_contract.sync /path/to/app
Use --check to fail when managed files have drifted.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rgw_cli_contract-0.1.0.tar.gz
(10.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rgw_cli_contract-0.1.0.tar.gz.
File metadata
- Download URL: rgw_cli_contract-0.1.0.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ceb8aff4c2b8d286e28123227b2a24c0f64ca4809c551fe765590dbeb505be3
|
|
| MD5 |
f25dea3a5b1e50065f1e3dca0c81682f
|
|
| BLAKE2b-256 |
332718c054a3d2fb27d9109075e00cbfe11ed446c6e95dabdf6eeaa608ddaa98
|
File details
Details for the file rgw_cli_contract-0.1.0-py3-none-any.whl.
File metadata
- Download URL: rgw_cli_contract-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
598e1b7dd3cea749d643a6ddee90b1416d16dc2c5b99116244f5191030fdde33
|
|
| MD5 |
18ac5426adf8c84cbc95f3526baa1ae7
|
|
| BLAKE2b-256 |
7c0b6766161f333c960d5ad372e9c73e7fb931ace94c527ee7acc37ed78eaf59
|