Skip to content

API Docs

Wheke

Wheke(settings=None)

The Wheke class is the entry point to build an application.

pods instance-attribute

pods = []

The list of pods plugged to Wheke.

add_pod

add_pod(pod_to_add)

Programatically plug a Pod into Wheke.

create_app

create_app()

Create a FastAPI app with all plugged pods.

create_cli

create_cli()

Create a Typer cli with all plugged pods.

WhekeSettings

Bases: BaseSettings

Pod

Pod(name, *, router=None, static_url=None, static_path=None, services=None, cli=None)

A Pod is the base unity that controls a funcionality.

name instance-attribute

name = name

The name of the Pod.

router instance-attribute

router = router

The router from fastapi.APIRouter that contains all the routes for the Pod.

static_url instance-attribute

static_url = static_url

The url prefix for the Pod static files.

static_path instance-attribute

static_path

The path to the Pod static files.

services instance-attribute

services = services or []

The list of services provided by the Pod.

It consists of a tuple of the service class and the service factory callable.

cli instance-attribute

cli = cli

The Typer cli of the Pod

ServiceConfig dataclass

ServiceConfig(service_type, service_factory, as_value=False)

aget_service async

aget_service(service_type)

get_service

get_service(service_type)

get_settings

get_settings(cls)