muck_out.sub_types
ActorAttachment
module-attribute
ActorAttachment = Annotated[
Annotated[PropertyValue, Tag("PropertyValue")]
| Annotated[dict, Tag("unknown")],
Discriminator(discriminator_actor_attachment),
]
Discriminates between the possible values of an attachment to an actor
Hashtag
Bases: BaseModel
Represents a hashtag
>>> m = Hashtag(name="#cow")
>>> m.model_dump(exclude_none=True)
{'type': 'Hashtag', 'name': '#cow'}
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
type
|
Literal['Hashtag']
|
|
'Hashtag'
|
href
|
str | None
|
A location related to the hashtag |
None
|
name
|
str
|
The actual hashtag |
required |
Source code in muck_out/sub_types/tag.py
Mention
Bases: BaseModel
Represents a mention
>>> m = Mention(href="http://actor.example/alice", name="@alice@actor.example")
>>> m.model_dump()
{'type': 'Mention',
'href': 'http://actor.example/alice',
'name': '@alice@actor.example'}
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
type
|
Literal['Mention']
|
|
'Mention'
|
href
|
str
|
The location the mentioned party can be retrieved at. In the Fediverse usually an actor URI |
required |
name
|
str | None
|
|
None
|
Source code in muck_out/sub_types/tag.py
ObjectLink
Bases: BaseModel
Represents a FEP-e232: Object Link
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
type
|
Literal['Link']
|
|
'Link'
|
href
|
str
|
The location of the object |
required |
mediaType
|
str
|
The media type of the object |
required |
name
|
str | None
|
The microsyntax used to represent the object |
None
|
rel
|
str | None
|
Relation to the object |
None
|
Source code in muck_out/sub_types/tag.py
PropertyValue
Bases: BaseModel
Key value pairs in the attachment of an actor as used by Mastodon
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
type
|
str
|
Fixed type for serialization |
'PropertyValue'
|
name
|
str
|
Key of the value |
required |
value
|
str
|
Value |
required |