Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

qodalis-cli-server-abstractions

Zero-dependency base types for writing Qodalis CLI server plugins in Python.

PyPI License: MIT

Depend on this package from a plugin (command processors, modules, jobs, data explorer providers) without pulling in FastAPI, uvicorn or websockets. The server, qodalis-cli-server, re-exports the same types.

Install

pip install qodalis-cli-server-abstractions

Example

from qodalis_cli_server_abstractions import (
    CliCommandParameterDescriptor,
    CliCommandProcessor,
    CliModule,
    CliProcessCommand,
)


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", aliases=["-n"])]

    async def handle_async(self, command: CliProcessCommand, cancellation_event=None) -> str:
        return f"Hello, {command.args.get('name', 'World')}!"


class GreetingsModule(CliModule):
    @property
    def name(self) -> str:
        return "greetings"

    @property
    def version(self) -> str:
        return "1.0.0"

    @property
    def description(self) -> str:
        return "Greeting commands"

    @property
    def processors(self):
        return [GreetCommandProcessor()]

Register it on the server with builder.add_module(GreetingsModule()); see the server README.

Contents

Area Types
Processors ICliCommandProcessor, CliCommandProcessor, ICliStreamCommandProcessor, is_stream_capable, ICliProcessorFilter
Input CliProcessCommand, ICliCommandParameterDescriptor, CliCommandParameterDescriptor, split_shell_words, join_shell_words, get_positionals, get_positional_text
Paging CliPaging (parameters(), from_command()), CliPageRequest (skip, take), DEFAULT_TAKE, MAX_TAKE
Modules and metadata ICliModule, CliModule, ICliCommandAuthor, CliCommandAuthor, DEFAULT_LIBRARY_AUTHOR
Jobs ICliJob, ICliJobExecutionContext, ICliJobLogger, CliJobOptions, ICliJobStorageProvider, JobExecution, JobState, JobLogEntry
Data explorer IDataExplorerProvider, DataExplorerProviderOptions, DataExplorerExecutionContext, DataExplorerResult, DataExplorerLanguage, DataExplorerOutputFormat, DataExplorerTemplate, DataExplorerParameterDescriptor, schema types

Processor properties

Property Type Default Description
command str abstract Name users type
description str abstract Help text
handle_async(command, cancellation_event=None) method abstract Runs the command, returns text
handle_structured_async(command, cancellation_event=None) method falls back to handle_async Return a structured server response
parameters list | None None Declared parameters (help, autocompletion, MCP schemas)
processors list | None None Sub-commands
allow_unlisted_commands bool | None None Accept sub-commands not in processors
value_required bool | None None Whether a positional value is required
required_permissions list[str] | None None Enforced when the users plugin protects the server
version str "1.0.0" Processor version
author ICliCommandAuthor DEFAULT_LIBRARY_AUTHOR Author metadata

License

MIT

Metadata

Release files for qodalis-cli-server-abstractions 1.0.0b26

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qodalis-cli-server-abstractions 1.0.0b26
File Size Uploaded Provenance Actions
qodalis_cli_server_abstractions-1.0.0b26.tar.gz 16.9 kB Without provenance Details for qodalis_cli_server_abstractions-1.0.0b26.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for qodalis-cli-server-abstractions 1.0.0b26
File Interpreter ABI Platform Actions
qodalis_cli_server_abstractions-1.0.0b26-py3-none-any.whl Python 3 none any Details for qodalis_cli_server_abstractions-1.0.0b26-py3-none-any.whl

Total release size: 44.8 kB

Release files / qodalis_cli_server_abstractions-1.0.0b26.tar.gz

Download URL qodalis_cli_server_abstractions-1.0.0b26.tar.gz
Size 16.9 kB
Tags Source
SHA-256 checksum
How to use checksums
aebb4d4d325b257a787f5cc3eeb07517701a6d4f68580a7a37d41cfd5b4223b0
BLAKE2b-256 checksum
How to use checksums
e262f916829007947d72bd2117e39588da511c9d1b31f9a9f9b2b2240b3b8b87
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / qodalis_cli_server_abstractions-1.0.0b26-py3-none-any.whl

Download URL qodalis_cli_server_abstractions-1.0.0b26-py3-none-any.whl
Size 27.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
741567ff41aec10985b304993ddff04dc4d484bc3c60f7b23e0165bf536a8147
BLAKE2b-256 checksum
How to use checksums
3f2548fb3af4518563dda76ceb8751f95a7431dfb0b76d5118bb234fb2fda84f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for qodalis-cli-server-abstractions 1.0.0b26

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.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page