thorn.generic.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.
Note
Accepts 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_secret
and the currenthmac_digest
type.
-
url
¶ Destination URL to dispatch this event.
-
user
¶ User filter – when set only dispatch if the event sender matches.
-
uuid
¶ Unique identifier.
-