Skip to content

http ¤

Integration of Dispatch functions with http.

BaseFunctionService ¤

BaseFunctionService(
    registry: Optional[Registry] = None,
    verification_key: Optional[
        Union[Ed25519PublicKey, str, bytes]
    ] = None,
)

FunctionService is an abstract class intended to be inherited by objects that integrate dispatch with other server application frameworks.

An application encapsulates a function Registry, and implements the API common to all dispatch integrations.

batch ¤

batch() -> Batch

Create a new batch.

BlockingFunctionService ¤

BlockingFunctionService(
    registry: Optional[Registry] = None,
    verification_key: Optional[
        Union[Ed25519PublicKey, str, bytes]
    ] = None,
)

Bases: BaseFunctionService

BlockingFunctionService is a variant of FunctionService which decorates dispatch functions with a synchronous API instead of using asyncio.

batch ¤

batch() -> Batch

Create a new batch.

Dispatch ¤

Dispatch(
    registry: Registry,
    verification_key: Optional[
        Union[Ed25519PublicKey, str, bytes]
    ] = None,
)

Bases: Application

A Dispatch instance servicing as a http server.

Parameters:

Name Type Description Default
registry Registry

The registry of functions to be serviced.

required
verification_key Optional[Union[Ed25519PublicKey, str, bytes]]

The verification key to use for requests.

None