Plain is headed towards 1.0! Subscribe for development updates →

Signals

Run code when certain events happen.

from plain.signals import request_finished


def on_request_finished(sender, **kwargs):
    print("Request finished!")


request_finished.connect(on_request_finished)
1from plain.signals.dispatch import Signal
2
3request_started = Signal()
4request_finished = Signal()
5got_request_exception = Signal()