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

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

Built distribution (wheel)

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

Total release size: 45.8 kB

Release files / qodalis_cli_server_abstractions-1.0.0b27.tar.gz

Download URL qodalis_cli_server_abstractions-1.0.0b27.tar.gz
Size 17.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d9a29ede6c61cc8e58f2f7bc7be3a21e012c06d7c3eadb43c72a57c0874a1ece
BLAKE2b-256 checksum
How to use checksums
e032cc3321eae371b36869648bb2b910eb07912b3bf3902129f5abd59aca1bf2
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.0b27-py3-none-any.whl

Download URL qodalis_cli_server_abstractions-1.0.0b27-py3-none-any.whl
Size 28.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5abd2e8247c4a643aa1245e8c737bb2eb6b4b126be70f7c9cdf1f01248f4eb75
BLAKE2b-256 checksum
How to use checksums
3e102da62adf89372744fdd26a6f16035079c41ffcdd4b46bb492fe49c0206e0
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.0b27

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