sharkey_crawler.types package

Module contents

This provides access to all types.

Classes:

AvatarDecoration(**data)

BadgeRole(**data)

Channel(**data)

DriveFile(**data)

DriveFileProperties(**data)

DriveFolder(**data)

Instance(**data)

OnlineStatus(value)

An enumeration.

Poll(**data)

PollChoice(**data)

Post(**data)

Represents a post as returned by Sharkey.

SharkeyId

alias of str

UserLite(**data)

Represents a user lite as returned by Sharkey.

Visibility(value)

An enumeration.

class sharkey_crawler.types.AvatarDecoration(**data)[source]

Bases: BaseModel

Attributes:

id

angle

flip_h

url

offset_x

offset_y

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Parameters:
  • id (str)

  • angle (float | int | None)

  • flip_h (bool | None)

  • url (str)

  • offset_x (float | int | None)

  • offset_y (float | int | None)

id: SharkeyId
angle: float | int | None
flip_h: bool | None
url: str
offset_x: float | int | None
offset_y: float | int | None
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class sharkey_crawler.types.BadgeRole(**data)[source]

Bases: BaseModel

Attributes:

name

icon_url

display_order

behavior

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Parameters:
  • name (str)

  • icon_url (str | None)

  • display_order (int)

  • behavior (str | None)

name: str
icon_url: str | None
display_order: int
behavior: str | None
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class sharkey_crawler.types.Channel(**data)[source]

Bases: BaseModel

Attributes:

id

name

color

is_sensitive

allow_renote_to_external

user_id

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Parameters:
  • id (str)

  • name (str)

  • color (str)

  • is_sensitive (bool)

  • allow_renote_to_external (bool)

  • user_id (str | None)

id: SharkeyId
name: str
color: str
is_sensitive: bool
allow_renote_to_external: bool
user_id: SharkeyId | None
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class sharkey_crawler.types.DriveFile(**data)[source]

Bases: BaseModel

Attributes:

id

created_at

name

type

md5

size

is_sensitive

blurhash

properties

url

thumbnail_url

comment

folder_id

folder

user_id

user

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Parameters:
  • data (Any)

  • id (str)

  • created_at (datetime | None)

  • name (str)

  • type (str)

  • md5 (str)

  • size (int | float)

  • is_sensitive (bool | None)

  • blurhash (str | None)

  • properties (DriveFileProperties | None)

  • url (str)

  • thumbnail_url (str | None)

  • comment (str | None)

  • folder_id (str | None)

  • folder (DriveFolder | None)

  • user_id (str | None)

  • user (UserLite | None)

id: SharkeyId
created_at: datetime | None
name: str
type: str
md5: str
size: int | float
is_sensitive: bool | None
blurhash: str | None
properties: DriveFileProperties | None
url: str
thumbnail_url: str | None
comment: str | None
folder_id: SharkeyId | None
folder: DriveFolder | None
user_id: SharkeyId | None
user: UserLite | None
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class sharkey_crawler.types.DriveFileProperties(**data)[source]

Bases: BaseModel

Attributes:

width

height

orientation

avg_color

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Parameters:
  • width (int | float | None)

  • height (int | float | None)

  • orientation (int | float | None)

  • avg_color (str | None)

width: int | float | None
height: int | float | None
orientation: int | float | None
avg_color: str | None
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class sharkey_crawler.types.DriveFolder(**data)[source]

Bases: BaseModel

Attributes:

id

created_at

name

parent_id

folders_count

files_count

parent

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Parameters:
  • id (str)

  • created_at (datetime)

  • name (str)

  • parent_id (str | None)

  • folders_count (int)

  • files_count (int)

  • parent (DriveFolder)

id: SharkeyId
created_at: datetime
name: str
parent_id: SharkeyId | None
folders_count: int
files_count: int
parent: DriveFolder
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class sharkey_crawler.types.Instance(**data)[source]

Bases: BaseModel

Attributes:

id

name

software_name

software_version

icon_url

favicon_url

theme_color

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Parameters:
  • id (str | None)

  • name (str | None)

  • software_name (str | None)

  • software_version (str | None)

  • icon_url (str | None)

  • favicon_url (str | None)

  • theme_color (str | None)

id: SharkeyId | None
name: str | None
software_name: str | None
software_version: str | None
icon_url: str | None
favicon_url: str | None
theme_color: str | None
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class sharkey_crawler.types.OnlineStatus(value)[source]

Bases: str, Enum

An enumeration.

Attributes:

unknown

online

active

offline

unknown = 'unknown'
online = 'online'
active = 'active'
offline = 'offline'
class sharkey_crawler.types.Poll(**data)[source]

Bases: BaseModel

Attributes:

expires_at

multiple

choices

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Parameters:
  • data (Any)

  • expires_at (datetime | None)

  • multiple (bool)

  • choices (list[PollChoice])

expires_at: datetime | None
multiple: bool
choices: list[PollChoice]
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class sharkey_crawler.types.PollChoice(**data)[source]

Bases: BaseModel

Attributes:

is_voted

text

votes

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Parameters:
  • is_voted (bool)

  • text (str)

  • votes (int)

is_voted: bool
text: str
votes: int
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class sharkey_crawler.types.Post(**data)[source]

Bases: BaseModel

Represents a post as returned by Sharkey.

Attributes:

id

created_at

updated_at

deleted_at

text

cw

user_id

user

reply_id

renote_id

reply

renote

is_hidden

visibility

mentions

visible_user_ids

file_ids

files

tags

poll

emojis

channel_id

channel

local_only

reaction_acceptance

reaction_emojis

reactions

reaction_count

renote_count

replies_count

uri

url

reaction_and_user_pair_cache

clipped_count

my_reaction

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Parameters:
  • data (Any)

  • id (str)

  • created_at (datetime)

  • updated_at (datetime | None)

  • deleted_at (datetime | None)

  • text (str | None)

  • cw (str | None)

  • user_id (str)

  • user (UserLite)

  • reply_id (str | None)

  • renote_id (str | None)

  • reply (Post | None)

  • renote (Post | None)

  • is_hidden (bool | None)

  • visibility (Visibility)

  • mentions (list[str])

  • visible_user_ids (list[str])

  • file_ids (list[str])

  • files (list[DriveFile])

  • tags (list[str])

  • poll (Poll | None)

  • emojis (dict[str, str])

  • channel_id (str | None)

  • channel (Channel | None)

  • local_only (bool | None)

  • reaction_acceptance (str | None)

  • reaction_emojis (dict[str, str])

  • reactions (dict[str, int])

  • reaction_count (int)

  • renote_count (int)

  • replies_count (int)

  • uri (str | None)

  • url (str | None)

  • reaction_and_user_pair_cache (list[str])

  • clipped_count (int | None)

  • my_reaction (str | None)

id: SharkeyId
created_at: datetime
updated_at: datetime | None
deleted_at: datetime | None
text: str | None
cw: str | None
user_id: SharkeyId
user: UserLite
reply_id: SharkeyId | None
renote_id: SharkeyId | None
reply: Post | None
renote: Post | None
is_hidden: bool | None
visibility: Visibility
mentions: list[SharkeyId]
visible_user_ids: list[SharkeyId]
file_ids: list[SharkeyId]
files: list[DriveFile]
tags: list[str]
poll: Poll | None
emojis: dict[str, str]
channel_id: SharkeyId | None
channel: Channel | None
local_only: bool | None
reaction_acceptance: str | None
reaction_emojis: dict[str, str]
reactions: dict[str, int]
reaction_count: int
renote_count: int
replies_count: int
uri: str | None
url: str | None
reaction_and_user_pair_cache: list[str]
clipped_count: int | None
my_reaction: str | None
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

sharkey_crawler.types.SharkeyId

alias of str

class sharkey_crawler.types.UserLite(**data)[source]

Bases: BaseModel

Represents a user lite as returned by Sharkey.

Attributes:

id

name

description

username

host

created_at

avatar_url

avatar_blurhash

avatar_decorations

is_bot

is_cat

instance

emojis

online_status

badge_roles

noindex

is_silenced

speak_as_cat

approved

followers_count

following_count

notes_count

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Parameters:
  • data (Any)

  • id (str)

  • name (str | None)

  • description (str | None)

  • username (str)

  • host (str | None)

  • created_at (datetime | None)

  • avatar_url (str | None)

  • avatar_blurhash (str | None)

  • avatar_decorations (list[AvatarDecoration])

  • is_bot (bool | None)

  • is_cat (bool | None)

  • instance (Instance | None)

  • emojis (dict[str, str])

  • online_status (OnlineStatus)

  • badge_roles (list[BadgeRole])

  • noindex (bool)

  • is_silenced (bool)

  • speak_as_cat (bool)

  • approved (bool)

  • followers_count (int)

  • following_count (int)

  • notes_count (int)

id: SharkeyId
name: str | None
description: str | None
username: str
host: str | None
created_at: datetime | None
avatar_url: str | None
avatar_blurhash: str | None
avatar_decorations: list[AvatarDecoration]
is_bot: bool | None
is_cat: bool | None
instance: Instance | None
emojis: dict[str, str]
online_status: OnlineStatus
badge_roles: list[BadgeRole]
noindex: bool
is_silenced: bool
speak_as_cat: bool
approved: bool
followers_count: int
following_count: int
notes_count: int
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class sharkey_crawler.types.Visibility(value)[source]

Bases: str, Enum

An enumeration.

Attributes:

public

home

followers

specified

public = 'public'
home = 'home'
followers = 'followers'
specified = 'specified'