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

class ControllerEvent[source]

Bases: RequestEvent

__init__(request, controller)[source]
Parameters:

request (HttpRequest)

name = 'core.controller'

Event name placeholder, will be set by dispatcher.

class ControllerViewEvent[source]

Bases: RequestEvent

The view event allows to transform controller return values into response objects.

__init__(request, value)[source]
Parameters:
set_response(response)[source]
Parameters:

response (HttpResponse)

name = 'controller.view'

Event name placeholder, will be set by dispatcher.

response: HttpResponse | None
value: Any
class MessageEvent[source]

Bases: TransactionEvent

__init__(transaction, message)[source]
Parameters:
class RequestEvent[source]

Bases: Event

__init__(request)[source]
Parameters:

request (HttpRequest)

set_controller(controller)[source]
property controller
name = 'core.request'

Event name placeholder, will be set by dispatcher.

property request
class ResponseEvent[source]

Bases: RequestEvent

__init__(request, response)[source]
Parameters:

request (HttpRequest)

name = 'core.response'

Event name placeholder, will be set by dispatcher.

class TransactionEvent[source]

Bases: Event

__init__(transaction)[source]
Parameters:

transaction (Transaction)