moviewyrm/bookwyrm/activitypub/person.py

24 lines
591 B
Python
Raw Normal View History

''' actor serializer '''
from dataclasses import dataclass, field
from typing import Dict
2020-11-28 01:58:21 +00:00
from .base_activity import ActivityObject, PublicKey
from .image import Image
@dataclass(init=False)
class Person(ActivityObject):
''' actor activitypub json '''
preferredUsername: str
name: str
inbox: str
outbox: str
followers: str
summary: str
publicKey: PublicKey
endpoints: Dict
icon: Image = field(default_factory=lambda: {})
2020-10-31 20:06:22 +00:00
bookwyrmUser: bool = False
manuallyApprovesFollowers: str = False
discoverable: str = True
type: str = 'Person'