Model Reference
Linked Data
These are model classes that are used to map Linked Data resources as Django model Objects
activitypub.models.LinkedDataModel
Bases: Model
An abstract model class that can handle conversion to/from JSON-LD to the Django model
serialize(*args, **kw)
Serializes the model class into a dictionary just with its attributes. This is the method that most classes will be interested in overriding.
to_jsonld()
Takes the serialized data and enriches with the entries related to associated JSON-lD contexts
activitypub.models.Reference
Bases: StatusModel
ActivityStreams Vocabulary
These models are to hold the "proper" data objects that according to ActivityStreams:
Core Types
activitypub.models.CoreType
Bases: LinkedDataModel
activitypub.models.Link
Bases: CoreType
activitypub.models.BaseActivityStreamsObject
Bases: CoreType
activitypub.models.Collection
Bases: BaseActivityStreamsObject
activitypub.models.CollectionItem
Bases: Model
activitypub.models.Object
Bases: BaseActivityStreamsObject
activitypub.models.Actor
Bases: BaseActivityStreamsObject
activitypub.models.Activity
Bases: BaseActivityStreamsObject
Helper / Extended attributes
Model Classes that hold data from AS types that extend the basic Object/Link attributes
activitypub.models.LinkRelation
Bases: Model
activitypub.models.QuestionExtraData
Bases: LinkedDataModel
activitypub.models.RelationshipProperties
Bases: Model
Keypair Management
The integrity of the messages being exchanged between servers rely on cryptographically signed messages. To exchange information about keys and who owns them, the Security Vocabulary is used by ActivityPub.
activitypub.models.CryptographicKeyPair
Bases: LinkedDataModel
verify_document(document)
Verifies a document