ActivityStream Vocabulary Activities
vultron.wire.as2.vocab.base.objects.activities
vultron.wire.as2.vocab.base.objects.activities.base
This module provides base activity classes
as_Activity
Bases: as_Object
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-activity An Activity is a subtype of Object that describes some form of action that may happen, is currently happening, or has already happened. The Activity type itself serves as an abstract base type for all types of activities. It is important to note that an Activity is not a representation of a currently executing process, but rather a statement about that process. For example, a person walking down the street is not an Activity unless they are posting a picture of themselves walking down the street. The Activity in that case would be the posting of the picture, not the person walking down the street.
received_evidence
property
A fresh copy of the received JSON, or None if none was sealed.
Every call decodes a new dict, so what a caller does to the result
cannot reach the sealed evidence or any other caller's copy.
received_evidence_json
property
The received JSON as the text it was sealed with, or None.
verified_proofs
property
The proofs the inbox verified on this activity's received body.
inlined_as_received()
A copy of this received activity whose AS2 form is the body received.
For a reply that embeds the activity it answers (an embargo
Accept of an Invite, a refusal notice, a case proposal's
inline report Offer). The Actor Knowledge Model asks for the
activity as its sender sent it, and the parsed graph is not that: the
parse sets aside a key the vocabulary does not name (MV-11-003), and
a dump renders defaults the sender did not send. So the copy's
by_alias dump is the sealed received evidence itself, every key
and value as it arrived (VM-08-002), while the copy is still the
validated activity for the reply's own construction. A storage dump
(by_alias=False) is unchanged.
Raises:
| Type | Description |
|---|---|
ValueError
|
When this activity carries no received evidence, so there is no body to embed. |
seal_received_evidence(evidence_json)
Attach the received JSON to this activity, exactly once.
Pydantic leaves private attributes writable on a frozen model, so the write-once rule is enforced here: resealing with the same text is a no-op (a routing copy inheriting its artifact's evidence), and any other text raises, because two different claims about what arrived cannot both be the evidence.
Raises:
| Type | Description |
|---|---|
ValueError
|
If different evidence is already sealed. |
seal_verified_proofs(proofs)
Attach the proofs the inbox verified on this activity, once.
Sealing the same proofs again, or none, is a no-op; other proofs raise, since two accounts of what verified cannot both be true.
Raises:
| Type | Description |
|---|---|
ValueError
|
If different proofs are already sealed. |
vultron.wire.as2.vocab.base.objects.activities.transitive
This module provides transitive activity classes
as_Accept
Bases: as_TransitiveActivity
The actor accepts the object. The target property can be used in certain circumstances to indicate the context into which the object has been accepted.
as_Add
Bases: as_TransitiveActivity
The actor is adding the object to the target. If the target is not specified, it must be determined by context. The origin indicates the context from which the object originated. See definition in ActivityStreams Vocabulary https://www.w3.org/TR/activitystreams-vocabulary/#dfn-add
as_Announce
Bases: as_TransitiveActivity
The actor is calling the target's attention to the object. The origin typically has no defined meaning. See definition in ActivityStreams Vocabulary https://www.w3.org/TR/activitystreams-vocabulary/#dfn-announce
as_Block
Bases: as_Ignore
The actor is blocking the object. The target and origin typically have no defined meaning. See definition in ActivityStreams Vocabulary https://www.w3.org/TR/activitystreams-vocabulary/#dfn-block
as_Create
Bases: as_TransitiveActivity
The actor is creating the object. If specified, the origin indicates the context from which the object originated. See definition in ActivityStreams Vocabulary https://www.w3.org/TR/activitystreams-vocabulary/#dfn-create
as_Delete
Bases: as_TransitiveActivity
The actor is deleting the object. If specified, the origin indicates the context from which the object was deleted. See definition in ActivityStreams Vocabulary https://www.w3.org/TR/activitystreams-vocabulary/#dfn-delete
as_Dislike
Bases: as_TransitiveActivity
The actor dislikes the object. See definition in ActivityStreams Vocabulary https://www.w3.org/TR/activitystreams-vocabulary/#dfn-dislike
as_Flag
Bases: as_TransitiveActivity
The actor is flagging the object. The target and origin typically have no defined meaning. See definition in ActivityStreams Vocabulary https://www.w3.org/TR/activitystreams-vocabulary/#dfn-flag
as_Follow
Bases: as_TransitiveActivity
The actor is "following" the object. Following is defined in the sense commonly used in Social systems in which the actor is interested in any activity performed by or on the object. The target and origin typically have no defined meaning. See definition in ActivityStreams Vocabulary https://www.w3.org/TR/activitystreams-vocabulary/#dfn-follow
as_Ignore
Bases: as_TransitiveActivity
The actor is ignoring the object. The target and origin typically have no defined meaning. See definition in ActivityStreams Vocabulary https://www.w3.org/TR/activitystreams-vocabulary/#dfn-ignore
as_Invite
Bases: as_Offer
The actor is requesting that the target accept the object. The origin indicates the context from which the object originated. See definition in ActivityStreams Vocabulary https://www.w3.org/TR/activitystreams-vocabulary/#dfn-invite
as_Join
Bases: as_TransitiveActivity
The actor has joined the object. The target and origin typically have no defined meaning. See definition in ActivityStreams Vocabulary https://www.w3.org/TR/activitystreams-vocabulary/#dfn-join
as_Leave
Bases: as_TransitiveActivity
The actor has left the object. The target and origin typically have no defined meaning. See definition in ActivityStreams Vocabulary https://www.w3.org/TR/activitystreams-vocabulary/#dfn-leave
as_Like
Bases: as_TransitiveActivity
The actor likes, recommends or endorses the object. The target and origin typically have no defined meaning. See definition in ActivityStreams Vocabulary https://www.w3.org/TR/activitystreams-vocabulary/#dfn-like
as_Listen
Bases: as_TransitiveActivity
The actor has listened to the object. See definition in ActivityStreams Vocabulary https://www.w3.org/TR/activitystreams-vocabulary/#dfn-listen
as_Move
Bases: as_TransitiveActivity
The actor is moving the object from the origin to the target. If the origin or target are not specified, either can be determined by context. See definition in ActivityStreams Vocabulary https://www.w3.org/TR/activitystreams-vocabulary/#dfn-move
as_Offer
Bases: as_TransitiveActivity
The actor is offering the object. If specified, the origin indicates the context from which the object originated. The target indicates the entity to which the object is being offered. See definition in ActivityStreams Vocabulary https://www.w3.org/TR/activitystreams-vocabulary/#dfn-offer
as_Read
Bases: as_TransitiveActivity
The actor has read the object. See definition in ActivityStreams Vocabulary https://www.w3.org/TR/activitystreams-vocabulary/#dfn-read
as_Reject
Bases: as_TransitiveActivity
The actor rejects the object. The target and origin typically have no defined meaning. See definition in ActivityStreams Vocabulary https://www.w3.org/TR/activitystreams-vocabulary/#dfn-reject
as_Remove
Bases: as_TransitiveActivity
The actor removes the object from the target. If specified, the origin indicates the context from which the object originated. See definition in ActivityStreams Vocabulary https://www.w3.org/TR/activitystreams-vocabulary/#dfn-remove
as_TentativeAccept
Bases: as_Accept
The actor tentatively accepts the object. A specialization of Accept indicating that the acceptance is tentative.
as_TentativeReject
Bases: as_Reject
A specialization of Reject indicating that the rejection is tentative. See definition in ActivityStreams Vocabulary https://www.w3.org/TR/activitystreams-vocabulary/#dfn-tentativereject
as_TransitiveActivity
Bases: as_Activity
A transitive activity is an activity that has an object. ActivityPub doesn't define transitive activities separately from activities, but we do it here for convenience. See definition in ActivityStreams Vocabulary https://www.w3.org/TR/activitystreams-vocabulary/#dfn-activity
set_name()
Set a default name if none is provided
as_Undo
Bases: as_TransitiveActivity
The actor is undoing the object. The target and origin typically have no defined meaning. See definition in ActivityStreams Vocabulary https://www.w3.org/TR/activitystreams-vocabulary/#dfn-undo
as_Update
Bases: as_TransitiveActivity
The actor has updated the object. The target and origin typically have no defined meaning. See definition in ActivityStreams Vocabulary https://www.w3.org/TR/activitystreams-vocabulary/#dfn-update
as_View
Bases: as_TransitiveActivity
The actor has viewed the object. See definition in ActivityStreams Vocabulary https://www.w3.org/TR/activitystreams-vocabulary/#dfn-view
vultron.wire.as2.vocab.base.objects.activities.intransitive
This module provides intransitive activity classes
as_Arrive
Bases: as_IntransitiveActivity
The actor arrives at the target. The origin can be used to specify the previous location from which the actor arrived. See definition in ActivityStreams Vocabulary https://www.w3.org/TR/activitystreams-vocabulary/#dfn-arrive
as_IntransitiveActivity
Bases: as_Activity
Base class for all ActivityPub intransitive activities. See definition in ActivityStreams Vocabulary https://www.w3.org/TR/activitystreams-vocabulary/#intransitiveactivity
as_Question
Bases: as_IntransitiveActivity
The actor poses a question to the target. The origin can be used to specify the context from which the question was posed. See definition in ActivityStreams Vocabulary https://www.w3.org/TR/activitystreams-vocabulary/#dfn-question
as_Travel
Bases: as_IntransitiveActivity
The actor travels from the origin to the target. See definition in ActivityStreams Vocabulary https://www.w3.org/TR/activitystreams-vocabulary/#dfn-travel