Attention

This is the documentation for HARP Proxy, actually published as an early preview. Both the software and documentation are a work in progress, and although we already use it on various production servers, they may contain inaccuracies, typographical errors, huge mistakes and empty pages. We work hard to eradicate all mistakes and implement stuff, but it is a long and tedious process. We appreciate your patience and understanding. Of course, any help will be greatly appreciated.

harp.config.application

class Application[source]

Bases: object

Base class for writing harp applications, which are basically python packages with auto-registration superpowers.

TODO: - use settings instead of settings_type, with type annotation ? - namespace instead of settings namespace ? autodetect from settings ?

__init__(settings=None, /)[source]
static defaults(settings=None)[source]
Parameters:

settings (dict | None)

Return type:

dict

register_events(dispatcher)[source]
Parameters:

dispatcher (IAsyncEventDispatcher)

register_services(container)[source]
Parameters:

container (Container)

classmethod supports(settings)[source]
Parameters:

settings (dict)

Return type:

bool

validate(*, secure=False)[source]
name = None
on_bind = None

Placeholder for factory bind event, happening before the container is built. If set, it will be attached to the factory dispatcher automatically.

on_bound = None

Placeholder for factory bound event, happening after the container is built. If set, it will be attached to the factory dispatcher automatically.

on_build = None

Placeholder for factory build event, happening after the kernel is built. If set, it will be attached to the factory dispatcher automatically.

settings_namespace = None
settings_type = None