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.events

class FactoryBindEvent[source]

Bases: Event

«Factory Bind» event happens before the service container is resolved.

It is the right place to define services that may not be resolvable yet (because their dependencies may, or may not, be defined already).

__init__(container, settings)[source]
Parameters:
  • container (Container)

  • settings (Configuration)

name = 'harp.config.bind'

Event name placeholder, will be set by dispatcher.

class FactoryBoundEvent[source]

Bases: Event

«Factory Bound» event happens after the service container is resolved, before the kernel creation.

It is the right place to setup things that needs the container to be resolved (thus, you get a provider instead of a container).

__init__(provider, resolver)[source]
Parameters:
name = 'harp.config.bound'

Event name placeholder, will be set by dispatcher.

class FactoryBuildEvent[source]

Bases: Event

«Factory Build» event happens after the asgi kernel is created.

It is the right place to decorate the kernel with middlewares.

__init__(kernel, binds)[source]
name = 'harp.config.build'

Event name placeholder, will be set by dispatcher.