mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-29 21:42:22 +00:00
* merge branch develop with main * bump desktop version * fix the merge * sync Cargo.lock to desktop 2.0.0 * fix cli conftest.py --------- Co-authored-by: deeleeramone <>
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
|