Skip to content

ActivityStreams Vocabulary Objects

vultron.wire.as2.vocab.base.objects

vultron.wire.as2.vocab.base.objects.base

This module provides activity streams object classes

as_Object

Bases: as_Base

Base class for all ActivityPub objects. See definition in ActivityStreams Vocabulary https://www.w3.org/TR/activitystreams-vocabulary/#object

validate_datetime(value) classmethod

Coerce a wire timestamp, reading a blank string as absence.

One validator covers all four timestamp fields, so the "if present, then non-empty" invariant (CS-08-001) is expressed here once rather than as four per-field stubs (CS-08-002). The blank test comes from vocab.base.utils.is_blank, the wire layer's single definition of blank, shared with parser.parse_activity's required-field guards (CS-22-001).

A blank string is absence, not a malformed value: it carries no time, and the alternative — raising — is not available to a nested object. parser._expand_inline_value refuses an inline object that fails its own class's validation, so treating a cosmetic blank as a fault would reject the whole message over a field the nested object is allowed to omit outright.

Absence here means None. published and updated are required, with no default (ADR-0176): an object this process authors states the act's instant, and a received one carries the sender's claim. as_Base.carry_absent_times_on_inbound reads an omitted key as None under the inbound validation context, so omission, null and blank all arrive as the same None (ISSUE-3257, ADR-0103).

A non-blank string that is not a timestamp stays an error: blank means "not provided", and reporting corrupt data as missing data would tell the sender to supply a field they already sent (ISSUE-3217).

vultron.wire.as2.vocab.base.objects.actors

This module provides actor classes

as_Actor

Bases: as_Object

Base class for all ActivityPub actors. Describes one or more entities that performed or are expected to perform an activity. Any single activity can have multiple actors. The actor may be specified using an indirect Link or as an embedded Object. See definition in ActivityStreams Vocabulary https://www.w3.org/TR/activitystreams-vocabulary/#dfn-actor

as_Application

Bases: as_Actor

A special kind of actor representing a software application. See definition in ActivityStreams Vocabulary https://www.w3.org/TR/activitystreams-vocabulary/#dfn-application

as_Group

Bases: as_Actor

A special kind of actor representing a logical group of persons or other actors. See definition in ActivityStreams Vocabulary https://www.w3.org/TR/activitystreams-vocabulary/#dfn-group

as_Organization

Bases: as_Actor

A special kind of actor representing a logical group of persons or other actors. See definition in ActivityStreams Vocabulary https://www.w3.org/TR/activitystreams-vocabulary/#dfn-organization

as_Person

Bases: as_Actor

A special kind of actor representing an individual person. See definition in ActivityStreams Vocabulary https://www.w3.org/TR/activitystreams-vocabulary/#dfn-person

as_Service

Bases: as_Actor

A special kind of actor representing a service. See definition in ActivityStreams Vocabulary https://www.w3.org/TR/activitystreams-vocabulary/#dfn-service A service is a kind of actor that represents a non-human actor.

actor_reference(actor_id)

Return the actor reference for an actor known only by actor_id.

An inline object with exactly the actor's id and a type (AKM-05-017, ADR-0159): enough for a receiver to route the activity by its object's type, and nothing the sender does not know. as_Object would stamp published/updated from this process's clock, so both are cleared; the actor did not publish them (AKM-02-006).

vultron.wire.as2.vocab.base.objects.object_types

This module provides activity streams object classes

as_Article

Bases: as_Object

Base class for all ActivityPub articles. See definition in ActivityStreams Vocabulary https://www.w3.org/TR/activitystreams-vocabulary/#dfn-article

as_Event

Bases: as_Object

Base class for all ActivityPub events. See definition in ActivityStreams Vocabulary https://www.w3.org/TR/activitystreams-vocabulary/#dfn-event

as_Note

Bases: as_Object

Base class for all ActivityPub notes. See definition in ActivityStreams Vocabulary https://www.w3.org/TR/activitystreams-vocabulary/#dfn-note

as_Page

Bases: as_Object

Base class for all ActivityPub pages. See definition in ActivityStreams Vocabulary https://www.w3.org/TR/activitystreams-vocabulary/#dfn-page

as_Place

Bases: as_Object

Base class for all ActivityPub places. See definition in ActivityStreams Vocabulary https://www.w3.org/TR/activitystreams-vocabulary/#dfn-place

as_Profile

Bases: as_Object

Base class for all ActivityPub profiles. See definition in ActivityStreams Vocabulary https://www.w3.org/TR/activitystreams-vocabulary/#dfn-profile

as_Relationship

Bases: as_Object

Base class for all ActivityPub relationships. See definition in ActivityStreams Vocabulary https://www.w3.org/TR/activitystreams-vocabulary/#dfn-relationship

as_Tombstone

Bases: as_Object

Base class for all ActivityPub tombstones. See definition in ActivityStreams Vocabulary https://www.w3.org/TR/activitystreams-vocabulary/#dfn-tombstone

vultron.wire.as2.vocab.base.objects.collections

The AS2 collection types on the wire.

Core owns them (ADR-0208): as_Collection and as_OrderedCollection are aliases of the core classes, as ADR-0099 made the domain types, and the wire registers them under the type values a received body names.