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

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

Built distribution (wheel)

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

Total release size: 37.6 kB

Release files / qodalis_cli_server_abstractions-1.0.0b20.tar.gz

Download URL qodalis_cli_server_abstractions-1.0.0b20.tar.gz
Size 13.8 kB
Tags Source
SHA-256 checksum
How to use checksums
1514317e1c5b649ef1eb2d3a0d170e4f7ed869faff2ba594997dcae54e639ebb
BLAKE2b-256 checksum
How to use checksums
118e0a0af7e6a188f499763a91595fe1e223acdba003456a940528d92379575d
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.0b20-py3-none-any.whl

Download URL qodalis_cli_server_abstractions-1.0.0b20-py3-none-any.whl
Size 23.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cef08d0ebff2509a92767772522473e440833c7d2712530382bd3f8c79d5fb7b
BLAKE2b-256 checksum
How to use checksums
f12e1dd8c5d8b2aa1078562077f1b307007342a12fd53a0518d408596d8f0301
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.0b20

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