This release is a pre-release and may not be stable for production use.
qodalis-cli-server-abstractions
Shared interfaces and base classes for building Qodalis CLI command processors in Python. Zero framework dependencies — install this package when writing plugins, without pulling in FastAPI, uvicorn, or websockets.
Install
pip install qodalis-cli-server-abstractions
Quick Start
Create a custom command processor by subclassing CliCommandProcessor:
from qodalis_cli_server_abstractions import (
CliCommandProcessor,
CliProcessCommand,
CliCommandParameterDescriptor,
)
class GreetCommandProcessor(CliCommandProcessor):
@property
def command(self) -> str:
return "greet"
@property
def description(self) -> str:
return "Greets a user by name"
@property
def parameters(self):
return [
CliCommandParameterDescriptor("--name", "Name to greet", required=True),
]
async def handle_async(self, command: CliProcessCommand) -> str:
name = command.args.get("name", "World")
return f"Hello, {name}!"
Then register the processor with the server package. See qodalis-cli-server for server setup.
API Reference
Abstract Base Classes
| Class | Description |
|---|---|
ICliCommandProcessor |
Abstract base defining the processor contract: command, description, author, parameters, sub-processors, and handle_async() |
CliCommandProcessor |
Convenience subclass of ICliCommandProcessor with sensible defaults |
Protocols
| Protocol | Description |
|---|---|
ICliCommandAuthor |
Author metadata: name and email (runtime-checkable) |
ICliCommandParameterDescriptor |
Parameter declaration: name, type, required, aliases, default value (runtime-checkable) |
Data Classes
| Class | Description |
|---|---|
CliProcessCommand |
Parsed command input: command, value, args, chain_commands, raw_command, data |
CliCommandAuthor |
Simple implementation of ICliCommandAuthor |
CliCommandParameterDescriptor |
Simple implementation of ICliCommandParameterDescriptor |
Constants
| Constant | Description |
|---|---|
DEFAULT_LIBRARY_AUTHOR |
Default CliCommandAuthor instance used when no author is specified |
ICliCommandProcessor Properties
| Property | Type | Default | Description |
|---|---|---|---|
command |
str |
(abstract) | The command name users type to invoke this processor |
description |
str |
(abstract) | Human-readable description shown in help |
author |
ICliCommandAuthor |
DEFAULT_LIBRARY_AUTHOR |
Author metadata |
version |
str |
"1.0.0" |
Processor version |
api_version |
int |
1 |
Minimum API version this processor targets |
allow_unlisted_commands |
bool | None |
None |
Accept sub-commands not in processors list |
value_required |
bool | None |
None |
Whether a positional value argument is required |
processors |
list | None |
None |
Nested sub-command processors |
parameters |
list | None |
None |
Declared parameters for autocompletion and validation |
handle_async(command) |
method | (abstract) | Execute the command, return result string |
License
MIT
Metadata
Release files for qodalis-cli-server-abstractions 1.0.0b6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| qodalis_cli_server_abstractions-1.0.0b6.tar.gz | 8.3 kB | Without provenance | Details for qodalis_cli_server_abstractions-1.0.0b6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| qodalis_cli_server_abstractions-1.0.0b6-py3-none-any.whl | Python 3 | none | any | Details for qodalis_cli_server_abstractions-1.0.0b6-py3-none-any.whl |
Total release size: 24.0 kB
Release files / qodalis_cli_server_abstractions-1.0.0b6.tar.gz
| Download URL | qodalis_cli_server_abstractions-1.0.0b6.tar.gz |
|---|---|
| Size | 8.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fccb19ce25b2c933460d4a9ac42f2241a444e6cea452042d55b605bb9c35f516
|
|
BLAKE2b-256 checksum How to use checksums |
8f540cf97be3ed63a83b47fbeea92f5bf47883fd96e096c4f1d42cdc658cfdbc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / qodalis_cli_server_abstractions-1.0.0b6-py3-none-any.whl
| Download URL | qodalis_cli_server_abstractions-1.0.0b6-py3-none-any.whl |
|---|---|
| Size | 15.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8a602784c3861be51f350dc709a1d45551feced0058f3225bf483228e0224ad6
|
|
BLAKE2b-256 checksum How to use checksums |
0aad7e9529b660b597ac54f421243d07b4ffd8c1db217b34f403944f7542cd8e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for qodalis-cli-server-abstractions 1.0.0b6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.