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

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

Built distribution (wheel)

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

Total release size: 52.5 kB

Release files / qodalis_cli_server_abstractions-1.0.0b28.tar.gz

Download URL qodalis_cli_server_abstractions-1.0.0b28.tar.gz
Size 20.3 kB
Tags Source
SHA-256 checksum
How to use checksums
12221a8ece0d8e30cb291495841059576841812502ef46e5d7f48598167d7c87
BLAKE2b-256 checksum
How to use checksums
1d78b33d2ea64e9995e5c0c3c6b353b33283570e0e1a65654463e00fb60c3437
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.0b28-py3-none-any.whl

Download URL qodalis_cli_server_abstractions-1.0.0b28-py3-none-any.whl
Size 32.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
932c655214cae57a563393059282d37cc96d5479e4b1d55d6fd3aa41a15d0e53
BLAKE2b-256 checksum
How to use checksums
5651061c0e063573a13bf5fa49d27169971b0009778541744e2d1066cc78fb37
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.0b28

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