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.0b29

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.0b29
File Size Uploaded Provenance Actions
qodalis_cli_server_abstractions-1.0.0b29.tar.gz 20.4 kB Without provenance Details for qodalis_cli_server_abstractions-1.0.0b29.tar.gz

Built distribution (wheel)

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

Total release size: 52.5 kB

Release files / qodalis_cli_server_abstractions-1.0.0b29.tar.gz

Download URL qodalis_cli_server_abstractions-1.0.0b29.tar.gz
Size 20.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ee3657aa7e591ad15f92d798e6661add45096076912fd211930d35b27d69b181
BLAKE2b-256 checksum
How to use checksums
8fa474ed18341c3280f734ae2673d1ecb3bc2d41c17c134f955076984cffbe16
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.0b29-py3-none-any.whl

Download URL qodalis_cli_server_abstractions-1.0.0b29-py3-none-any.whl
Size 32.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2d16e5ab80cb8aa7a034a62b96ecf7504ae27eedfdfbcec7626ba26c64427944
BLAKE2b-256 checksum
How to use checksums
cc761e9e2702b46cf4954e3b73f61aefeb0546b90b0a483e17d1e1a38b9b8ed3
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.0b29

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