thorn.generic.models¶
thorn.models¶
Generic base model mixins.
-
class
thorn.generic.models.AbstractSubscriber[source]¶ -
-
event¶ Event pattern this subscriber is subscribed to (e.g.
article.*).
-
from_dict(*args, **kwargs)[source]¶ Create subscriber from dictionary representation.
Accept the same arguments as
dict.
-
hmac_digest¶ HMAC digest type (e.g.
"sha512").The value used must be a member of
hashlib.algorithms_available.
-
hmac_secret¶ HMAC secret key, of arbitrary length.
-
sign(message)[source]¶ Sign (HMAC) message using
hmac_secretand the currenthmac_digesttype.
-
url¶ Destination URL to dispatch this event.
-
user¶ User filter: when set only dispatch if the event sender matches.
-
uuid¶ Unique identifier.
-