Skip to content

Vocabulary Models

This section covers the specific models defined by the ActivityStreams 2.0 vocabulary.

Actors

Actor types represent entities that can perform activities.

Bases: Object

Represents an ActivityStreams Actor.

Actors are entities that can perform activities.

keys property

Provides a unified list of all keys associated with the actor.

This property combines public_key and assertion_method into a single list for easier access.

Returns:

Type Description
List[CryptographicKey | Multikey]

A list containing CryptographicKey and/or Multikey objects.

get_key(key_id)

Finds a key by its ID from all keys associated with the actor.

Parameters:

Name Type Description Default
key_id str

The ID of the key to find.

required

Returns:

Type Description
Optional[CryptographicKey | Multikey]

The key object (CryptographicKey or Multikey) if found,

Optional[CryptographicKey | Multikey]

otherwise None.

apmodel.vocab.actor.Person

Bases: Actor

keys property

Provides a unified list of all keys associated with the actor.

This property combines public_key and assertion_method into a single list for easier access.

Returns:

Type Description
List[CryptographicKey | Multikey]

A list containing CryptographicKey and/or Multikey objects.

get_key(key_id)

Finds a key by its ID from all keys associated with the actor.

Parameters:

Name Type Description Default
key_id str

The ID of the key to find.

required

Returns:

Type Description
Optional[CryptographicKey | Multikey]

The key object (CryptographicKey or Multikey) if found,

Optional[CryptographicKey | Multikey]

otherwise None.

apmodel.vocab.actor.Application

Bases: Actor

keys property

Provides a unified list of all keys associated with the actor.

This property combines public_key and assertion_method into a single list for easier access.

Returns:

Type Description
List[CryptographicKey | Multikey]

A list containing CryptographicKey and/or Multikey objects.

get_key(key_id)

Finds a key by its ID from all keys associated with the actor.

Parameters:

Name Type Description Default
key_id str

The ID of the key to find.

required

Returns:

Type Description
Optional[CryptographicKey | Multikey]

The key object (CryptographicKey or Multikey) if found,

Optional[CryptographicKey | Multikey]

otherwise None.

apmodel.vocab.actor.Group

Bases: Actor

keys property

Provides a unified list of all keys associated with the actor.

This property combines public_key and assertion_method into a single list for easier access.

Returns:

Type Description
List[CryptographicKey | Multikey]

A list containing CryptographicKey and/or Multikey objects.

get_key(key_id)

Finds a key by its ID from all keys associated with the actor.

Parameters:

Name Type Description Default
key_id str

The ID of the key to find.

required

Returns:

Type Description
Optional[CryptographicKey | Multikey]

The key object (CryptographicKey or Multikey) if found,

Optional[CryptographicKey | Multikey]

otherwise None.

apmodel.vocab.actor.Organization

Bases: Actor

keys property

Provides a unified list of all keys associated with the actor.

This property combines public_key and assertion_method into a single list for easier access.

Returns:

Type Description
List[CryptographicKey | Multikey]

A list containing CryptographicKey and/or Multikey objects.

get_key(key_id)

Finds a key by its ID from all keys associated with the actor.

Parameters:

Name Type Description Default
key_id str

The ID of the key to find.

required

Returns:

Type Description
Optional[CryptographicKey | Multikey]

The key object (CryptographicKey or Multikey) if found,

Optional[CryptographicKey | Multikey]

otherwise None.

apmodel.vocab.actor.Service

Bases: Actor

keys property

Provides a unified list of all keys associated with the actor.

This property combines public_key and assertion_method into a single list for easier access.

Returns:

Type Description
List[CryptographicKey | Multikey]

A list containing CryptographicKey and/or Multikey objects.

get_key(key_id)

Finds a key by its ID from all keys associated with the actor.

Parameters:

Name Type Description Default
key_id str

The ID of the key to find.

required

Returns:

Type Description
Optional[CryptographicKey | Multikey]

The key object (CryptographicKey or Multikey) if found,

Optional[CryptographicKey | Multikey]

otherwise None.

Objects

These are the common object types used in activities.

apmodel.vocab.note.Note

Bases: Object

apmodel.vocab.article.Article

Bases: Object

apmodel.vocab.document.Document

Bases: Object

apmodel.vocab.event.Event

Bases: Object

apmodel.vocab.mention.Mention

Bases: Link

apmodel.vocab.profile.Profile

Bases: Object

apmodel.vocab.tombstone.Tombstone

Bases: Object

Activities

Activity types describe actions that have been performed. This lists all supported activity types from the apmodel.vocab.activity module.