A multi-console TTY framework for complex CLI/TTY apps
Project description
Command Line Framework (V2: Web/RPC-ready)
V2 extends the TTY core toward Web + RPC, while keeping the current codebase focused on the TTY runtime. At the moment, Web/RPC is planned but not yet implemented.
Quick Start (TTY Core)
- Define your consoles and commands (see examples in
python_tty/consoles/examplesandpython_tty/commands/examples). - Ensure console modules are imported so decorators can register them:
- Update
DEFAULT_CONSOLE_MODULESinpython_tty/consoles/loader.py, or - Call
load_consoles([...])manually.
- Update
- Start the factory:
from python_tty.console_factory import ConsoleFactory
factory = ConsoleFactory(service=my_business_core)
factory.start()
The service instance is available in all consoles via console.service, and in commands via self.console.service. If service does not inherit UIEventSpeaker, a warning is emitted at startup.
Current Capabilities (TTY Core)
Console layer:
python_tty/consoles/core.py:BaseConsole,MainConsole,SubConsolepython_tty/consoles/manager.pyandpython_tty/consoles/registry.pyfor lifecycle and registration
Commands layer:
python_tty/commands/core.py:BaseCommands,CommandValidatorpython_tty/commands/registry.py:CommandRegistry,ArgSpecpython_tty/commands/general.py:GeneralValidator,GeneralCompleterpython_tty/commands/mixins.py:CommandMixinand built-in mixins
UI and utilities:
python_tty/core/events.py:UIEvent,UIEventLevel,UIEventSpeakerpython_tty/ui/output.py:proxy_printpython_tty/utils/:tokenize.py,table.py,ui_logger.py
Roadmap (V2)
Planned milestones for Web + RPC:
- M1: Meta Descriptor v1 + Exporter
- M2: RPC proto v1 + local (de)serialization
- M3: Meta Web Server (HTTP + WS)
- M4: RPC Server (mTLS + allowlist + audit)
- M5: Unified execution system (CommandExecutor)
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 python_tty-0.1.2rc2.tar.gz.
File metadata
- Download URL: python_tty-0.1.2rc2.tar.gz
- Upload date:
- Size: 25.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd41d6ffd6af80bbd98b6178bd1d1ad79153f959aea267c798dcf6ce3a4e714e
|
|
| MD5 |
64153ce65a165c5f4310738941a66232
|
|
| BLAKE2b-256 |
810f7d0fd7da9b31e79ef29588a118832164169599ec29ffc8677f56cd503d6f
|
Provenance
The following attestation bundles were made for python_tty-0.1.2rc2.tar.gz:
Publisher:
python-publish.yml on ROOKIEMIE/python-tty
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_tty-0.1.2rc2.tar.gz -
Subject digest:
bd41d6ffd6af80bbd98b6178bd1d1ad79153f959aea267c798dcf6ce3a4e714e - Sigstore transparency entry: 848482036
- Sigstore integration time:
-
Permalink:
ROOKIEMIE/python-tty@e03376f79b0e735e6cd2c86dae6860ab9310eecc -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/ROOKIEMIE
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@e03376f79b0e735e6cd2c86dae6860ab9310eecc -
Trigger Event:
push
-
Statement type:
File details
Details for the file python_tty-0.1.2rc2-py3-none-any.whl.
File metadata
- Download URL: python_tty-0.1.2rc2-py3-none-any.whl
- Upload date:
- Size: 32.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a48fffbfdef7059318bbc09b744dee593cb492a9e0781cec2b1b5d3c092d2d5
|
|
| MD5 |
7cac73cd5d232ffe1186b97a2ff9b54c
|
|
| BLAKE2b-256 |
12c8e2842546f46afd9651a5d09f36ef0e3f05529bd22c62855c6c8ded8bb216
|
Provenance
The following attestation bundles were made for python_tty-0.1.2rc2-py3-none-any.whl:
Publisher:
python-publish.yml on ROOKIEMIE/python-tty
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_tty-0.1.2rc2-py3-none-any.whl -
Subject digest:
7a48fffbfdef7059318bbc09b744dee593cb492a9e0781cec2b1b5d3c092d2d5 - Sigstore transparency entry: 848482052
- Sigstore integration time:
-
Permalink:
ROOKIEMIE/python-tty@e03376f79b0e735e6cd2c86dae6860ab9310eecc -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/ROOKIEMIE
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@e03376f79b0e735e6cd2c86dae6860ab9310eecc -
Trigger Event:
push
-
Statement type: