swh.coarnotify.client module#
COAR Notify clients.
- class swh.coarnotify.client.COARNotifyClient[source]#
Bases:
objectA basic CN client.
- send(notification: OutboundNotification) bool[source]#
Send the notification using requests.
- Parameters:
notification – an outbound notification
- Raises:
request.HTTPError – the inbox rejected our notification
- Returns:
True if the inbox accepted the notification
- class swh.coarnotify.client.DevCOARNotifyClient[source]#
Bases:
COARNotifyClientCN client that sends notification to a single inbox URL.
- class swh.coarnotify.client.DummyCOARNotifyClient[source]#
Bases:
COARNotifyClientDummy CN client that does nothing.
- send(notification: OutboundNotification) bool[source]#
Pretends to send the notification.
- Parameters:
notification – an outbound notification
- Returns:
Always returns True
- class swh.coarnotify.client.ConsoleCOARNotifyClient[source]#
Bases:
COARNotifyClientCN client that sends notification to the console.
- send(notification: OutboundNotification) bool[source]#
Send the notification using requests.
- Parameters:
notification – an outbound notification
- Raises:
request.HTTPError – the inbox rejected our notification
- Returns:
True if the inbox accepted the notification