mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-28 13:01:38 +00:00
* stash some changes * add more robust testing * mypy * point PR at V5 * introduce spec file * codespell * test fix * fix workflow environment setup * fix workflow environment setup * fix workflow environment setup * add pyyaml to dependencies * split lint jobs * fix workflow environment setup * fix workflow environment setup * workflow env setup * workflow env setup * clean up code comments * add auth hook entrypoints * codespell * add codegen feature * codespell * move _unpack into dispatchers for consistency with codegen packages * surface nested models in the response * fix missing coverage in CI * socrata updates * test fix * detect plotly output * add --include and --exclude flags from generate-extension command * cap test matrix at python 3.14 * no useless comments * platform controller command description split * merge URL overloads from path params * exclude none and unset from model dump --------- Co-authored-by: deeleeramone <> Co-authored-by: Copilot <copilot@github.com>
21 lines
618 B
Python
21 lines
618 B
Python
"""Dispatcher Protocol — the shared interface for Local and Http backends."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import Protocol, runtime_checkable
|
|
|
|
from openbb_cli.dispatchers.protocol import Request, Response
|
|
|
|
|
|
@runtime_checkable
|
|
class Dispatcher(Protocol):
|
|
"""Async dispatcher contract."""
|
|
|
|
async def dispatch(self, request: Request) -> Response:
|
|
"""Resolve and run the command described by ``request``."""
|
|
... # pragma: no cover
|
|
|
|
async def aclose(self) -> None:
|
|
"""Release any held resources (HTTP clients, connection pools)."""
|
|
... # pragma: no cover
|