Module activitypubdantic.models.link

LINK PYDANTIC MODELS FOR VALIDATION

Documentation: https://www.w3.org/TR/activitystreams-vocabulary/#object-types

Expand source code
# -*- coding: utf-8 -*-
"""
LINK PYDANTIC MODELS FOR VALIDATION \n
Documentation: https://www.w3.org/TR/activitystreams-vocabulary/#object-types
"""
# Import Pydantic models and types
from typing import Literal

# Import core models that are required for the actor definition
# Not all will be directly called
from activitypubdantic.models.core import LinkModel, ObjectModel

"""
OBJECT TYPES
"""


class MentionModel(LinkModel):
    """
    A specialized Link that represents an @mention.
    """

    # Type
    type: Literal["Mention"] = "Mention"

Classes

class MentionModel (href: HttpUrl = None, **kwargs)

A specialized Link that represents an @mention.

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

Uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

Expand source code
class MentionModel(LinkModel):
    """
    A specialized Link that represents an @mention.
    """

    # Type
    type: Literal["Mention"] = "Mention"

Ancestors

Class variables

var model_config
var model_fields
var type : Literal['Mention']