coarnotify.patterns¶
All the COAR Notify pattern objects are defined in this module.
Some of the pattern objects have supporting objects in their individual submodules
Submodules¶
- coarnotify.patterns.accept
- coarnotify.patterns.announce_endorsement
- coarnotify.patterns.announce_relationship
- coarnotify.patterns.announce_review
- coarnotify.patterns.announce_service_result
- coarnotify.patterns.reject
- coarnotify.patterns.request_endorsement
- coarnotify.patterns.request_review
- coarnotify.patterns.tentatively_accept
- coarnotify.patterns.tentatively_reject
- coarnotify.patterns.undo_offer
- coarnotify.patterns.unprocessable_notification
Classes¶
Class to represent an Accept notification |
|
Class to represent an Announce Endorsement pattern |
|
Class to represent an Announce Relationship notification |
|
Class to represent Announce Review pattern |
|
Class to represent the Announce Service Result Pattern |
|
Class to represent a Reject notification |
|
Class to represent a Request Endorsement notification |
|
Class to represent a Request Review notification |
|
Class to represent a Tentative Accept notification |
|
Class to represent a Tentative Reject notification |
|
Class to represent the Undo Offer notification |
|
Class to represent the Unprocessable Notification notification |
Package Contents¶
- class coarnotify.patterns.Accept(stream: coarnotify.core.activitystreams2.ActivityStream | dict = None, validate_stream_on_construct=True, validate_properties=True, validators=None, validation_context=None, properties_by_reference=True)¶
Bases:
coarnotify.core.notify.NestedPatternObjectMixin
,coarnotify.core.notify.NotifyPattern
Class to represent an Accept notification
- validate() bool ¶
Validate the Accept pattern.
In addition to the base validation, this:
Makes
inReplyTo
requiredRequires the
inReplyTo
value to be the same as theobject.id
value
- Returns:
True
if valid, otherwise raises acoarnotify.exceptions.ValidationError
- TYPE¶
The Accept type
- class coarnotify.patterns.AnnounceEndorsement(stream: coarnotify.core.activitystreams2.ActivityStream | dict = None, validate_stream_on_construct=True, validate_properties=True, validators=None, validation_context=None, properties_by_reference=True)¶
Bases:
coarnotify.core.notify.NotifyPattern
Class to represent an Announce Endorsement pattern
- validate() bool ¶
Extends the base validation to make context required
- Returns:
True
if valid, otherwise raisescoarnotify.exceptions.ValidationError
- TYPE¶
Announce Endorsement type, consisting of Activity Streams Announce and Notify Endorsement Action
- property context: AnnounceEndorsementContext | None¶
Get a context specific to Announce Endorsement
- Returns:
The Announce Endorsement context object
- class coarnotify.patterns.AnnounceRelationship(stream: coarnotify.core.activitystreams2.ActivityStream | dict = None, validate_stream_on_construct=True, validate_properties=True, validators=None, validation_context=None, properties_by_reference=True)¶
Bases:
coarnotify.core.notify.NotifyPattern
Class to represent an Announce Relationship notification
- validate() bool ¶
Extends the base validation to make context required
- Returns:
True
if valid, otherwise raisescoarnotify.exceptions.ValidationError
- TYPE¶
Announce Relationship types, including an ActivityStreams announce and a COAR Notify Relationship Action
- property object: AnnounceRelationshipObject | None¶
Custom getter to retrieve the object property as an AnnounceRelationshipObject
- class coarnotify.patterns.AnnounceReview(stream: coarnotify.core.activitystreams2.ActivityStream | dict = None, validate_stream_on_construct=True, validate_properties=True, validators=None, validation_context=None, properties_by_reference=True)¶
Bases:
coarnotify.core.notify.NotifyPattern
Class to represent Announce Review pattern
- validate() bool ¶
Extends the base validation to make context required
- Returns:
True
if valid, otherwise raisescoarnotify.exceptions.ValidationError
- TYPE¶
Announce Review type, including Acitivity Streams Announce and Notify Review Action
- property context: AnnounceReviewContext | None¶
Custom getter to retrieve AnnounceReview Context
- Returns:
AnnounceReviewContext
- property object: AnnounceReviewObject | None¶
Custom getter to retrieve Announce Review object
- Returns:
Announce Review Object
- class coarnotify.patterns.AnnounceServiceResult(stream: coarnotify.core.activitystreams2.ActivityStream | dict = None, validate_stream_on_construct=True, validate_properties=True, validators=None, validation_context=None, properties_by_reference=True)¶
Bases:
coarnotify.core.notify.NotifyPattern
Class to represent the Announce Service Result Pattern
- validate() bool ¶
Extends the base validation to make context required
- Returns:
True
if valid, otherwise raisescoarnotify.exceptions.ValidationError
- TYPE¶
Announce Service Result type, the ActivityStreams Announce type
- property context: AnnounceServiceResultContext | None¶
Custom getter to retrieve the context property as an AnnounceServiceResultContext
- Returns:
AnnounceSericeResultCOntext
- property object: AnnounceServiceResultObject | None¶
Custom getter to retrieve the object property as an AnnounceServiceResultObject
- Returns:
AnnounceServiceResultObject
- class coarnotify.patterns.Reject(stream: coarnotify.core.activitystreams2.ActivityStream | dict = None, validate_stream_on_construct=True, validate_properties=True, validators=None, validation_context=None, properties_by_reference=True)¶
Bases:
coarnotify.core.notify.NestedPatternObjectMixin
,coarnotify.core.notify.NotifyPattern
,coarnotify.core.notify.SummaryMixin
Class to represent a Reject notification
- validate() bool ¶
In addition to the base validation apply the following constraints:
The
inReplyTo
property is requiredThe
inReplyTo
value must match theobject.id
value
- Returns:
True
if the validation passes, otherwise raise aValidationError
- TYPE¶
Reject type, the ActivityStreams Reject type
- class coarnotify.patterns.RequestEndorsement(stream: coarnotify.core.activitystreams2.ActivityStream | dict = None, validate_stream_on_construct=True, validate_properties=True, validators=None, validation_context=None, properties_by_reference=True)¶
Bases:
coarnotify.core.notify.NotifyPattern
Class to represent a Request Endorsement notification
- TYPE¶
Request Endorsement types, including an ActivityStreams offer and a COAR Notify Endorsement Action
- property object: RequestEndorsementObject | None¶
Custom getter to retrieve the object property as a RequestEndorsementObject
- Returns:
- class coarnotify.patterns.RequestReview(stream: coarnotify.core.activitystreams2.ActivityStream | dict = None, validate_stream_on_construct=True, validate_properties=True, validators=None, validation_context=None, properties_by_reference=True)¶
Bases:
coarnotify.core.notify.NotifyPattern
Class to represent a Request Review notification
- TYPE¶
Request Review types, including an ActivityStreams offer and a COAR Notify Review Action
- property object: RequestReviewObject | None¶
Custom getter to retrieve the object property as a RequestReviewObject :return:
- class coarnotify.patterns.TentativelyAccept(stream: coarnotify.core.activitystreams2.ActivityStream | dict = None, validate_stream_on_construct=True, validate_properties=True, validators=None, validation_context=None, properties_by_reference=True)¶
Bases:
coarnotify.core.notify.NestedPatternObjectMixin
,coarnotify.core.notify.NotifyPattern
,coarnotify.core.notify.SummaryMixin
Class to represent a Tentative Accept notification
- validate() bool ¶
In addition to the base validation apply the following constraints:
The
inReplyTo
property is requiredThe
inReplyTo
value must match theobject.id
value
- Returns:
- TYPE¶
Tentative Accept type, the ActivityStreams Tentative Accept type
- class coarnotify.patterns.TentativelyReject(stream: coarnotify.core.activitystreams2.ActivityStream | dict = None, validate_stream_on_construct=True, validate_properties=True, validators=None, validation_context=None, properties_by_reference=True)¶
Bases:
coarnotify.core.notify.NestedPatternObjectMixin
,coarnotify.core.notify.NotifyPattern
,coarnotify.core.notify.SummaryMixin
Class to represent a Tentative Reject notification
- validate() bool ¶
In addition to the base validation apply the following constraints:
The
inReplyTo
property is requiredThe
inReplyTo
value must match theobject.id
value
- Returns:
- TYPE¶
Tentative Reject type, the ActivityStreams Tentative Reject type
- class coarnotify.patterns.UndoOffer(stream: coarnotify.core.activitystreams2.ActivityStream | dict = None, validate_stream_on_construct=True, validate_properties=True, validators=None, validation_context=None, properties_by_reference=True)¶
Bases:
coarnotify.core.notify.NestedPatternObjectMixin
,coarnotify.core.notify.NotifyPattern
,coarnotify.core.notify.SummaryMixin
Class to represent the Undo Offer notification
- validate() bool ¶
In addition to the base validation apply the following constraints:
The
inReplyTo
property is requiredThe
inReplyTo
value must match theobject.id
value
- Returns:
- TYPE¶
Undo Offer type, the ActivityStreams Undo type
- class coarnotify.patterns.UnprocessableNotification(stream: coarnotify.core.activitystreams2.ActivityStream | dict = None, validate_stream_on_construct=True, validate_properties=True, validators=None, validation_context=None, properties_by_reference=True)¶
Bases:
coarnotify.core.notify.NotifyPattern
,coarnotify.core.notify.SummaryMixin
Class to represent the Unprocessable Notification notification
- validate() bool ¶
In addition to the base validation apply the following constraints:
The
inReplyTo
property is requiredThe
summary
property is required
- Returns:
- TYPE¶
Unprocessable Notification types, including an ActivityStreams Flag and a COAR Notify Unprocessable Notification