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:
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 |
|---|---|
|
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
|
|
The ID of the key to find. |
required |
Returns:
| Type | Description |
|---|---|
|
The key object (CryptographicKey or Multikey) if found, |
|
otherwise None. |
apmodel.vocab.actor.Person
Bases:
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 |
|---|---|
|
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
|
|
The ID of the key to find. |
required |
Returns:
| Type | Description |
|---|---|
|
The key object (CryptographicKey or Multikey) if found, |
|
otherwise None. |
apmodel.vocab.actor.Application
Bases:
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 |
|---|---|
|
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
|
|
The ID of the key to find. |
required |
Returns:
| Type | Description |
|---|---|
|
The key object (CryptographicKey or Multikey) if found, |
|
otherwise None. |
apmodel.vocab.actor.Group
Bases:
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 |
|---|---|
|
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
|
|
The ID of the key to find. |
required |
Returns:
| Type | Description |
|---|---|
|
The key object (CryptographicKey or Multikey) if found, |
|
otherwise None. |
apmodel.vocab.actor.Organization
Bases:
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 |
|---|---|
|
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
|
|
The ID of the key to find. |
required |
Returns:
| Type | Description |
|---|---|
|
The key object (CryptographicKey or Multikey) if found, |
|
otherwise None. |
apmodel.vocab.actor.Service
Bases:
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 |
|---|---|
|
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
|
|
The ID of the key to find. |
required |
Returns:
| Type | Description |
|---|---|
|
The key object (CryptographicKey or Multikey) if found, |
|
otherwise None. |
Objects
These are the common object types used in activities.
apmodel.vocab.note.Note
Bases:
apmodel.vocab.article.Article
Bases:
apmodel.vocab.document.Document
Bases:
apmodel.vocab.event.Event
Bases:
apmodel.vocab.mention.Mention
Bases:
apmodel.vocab.profile.Profile
Bases:
apmodel.vocab.tombstone.Tombstone
Bases:
Activities
Activity types describe actions that have been performed. This lists all supported activity types from the apmodel.vocab.activity module.