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
Supported install strategies:
standalone-binaryfor tagged release bundles that contain<app>/<app>python-sourcefor tagged source bundles that containmain.pyand_version.py
Source installers may also inline small app-specific hook snippets through
optional install_*_path keys in cli_contract.toml.
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
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.2.tar.gz.
File metadata
- Download URL: rgw_cli_contract-0.1.2.tar.gz
- Upload date:
- Size: 12.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef108c7f53e1ee9a1c45ae7038e13fd01428c15599ce4984ffd62e9348dfe8fe
|
|
| MD5 |
371d834f93cca1e7e664aae702c509ca
|
|
| BLAKE2b-256 |
1e326f9a78e9d93a62a07d783a650e78175d68bc0678f2c5cf0f184a04e42537
|
File details
Details for the file rgw_cli_contract-0.1.2-py3-none-any.whl.
File metadata
- Download URL: rgw_cli_contract-0.1.2-py3-none-any.whl
- Upload date:
- Size: 17.2 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 |
9745bf22514080372d2bb964460d20b2f1bc4b3d9585d42bf01b0fff2c36e13c
|
|
| MD5 |
d5435d0de68ebcd66bacc0ee8428ca0f
|
|
| BLAKE2b-256 |
63d2e1ec4fb66cada71b7b7f49dacc2490926155bbca2d36b029b6ff37f7eb94
|