oembedpy.types module

Register content data structure.

All typed classes are based from oEmbed specs. Please see https://oembed.com/

class oembedpy.types.CachedContent(expired, content)

Bases: NamedTuple

content: Photo | Video | Link | Rich

Alias for field number 1

expired: float

Alias for field number 0

oembedpy.types.Content

Collection of oEmbed content types.

alias of Photo | Video | Link | Rich

Bases: _Optionals, _Required

oEmbed content for generic object.

class oembedpy.types.Photo(type: str, version: str, _extra: Dict[str, Any], url: str, width: int, height: int, title: str | None = None, author_name: str | None = None, author_url: str | None = None, provider_name: str | None = None, provider_url: str | None = None, cache_age: int | None = None, thumbnail_url: str | None = None, thumbnail_width: int | None = None, thumbnail_height: int | None = None)

Bases: _Optionals, _Photo, _Required

oEmbed content for photo object.

class oembedpy.types.Rich(type: str, version: str, _extra: Dict[str, Any], html: str, width: int, height: int, title: str | None = None, author_name: str | None = None, author_url: str | None = None, provider_name: str | None = None, provider_url: str | None = None, cache_age: int | None = None, thumbnail_url: str | None = None, thumbnail_width: int | None = None, thumbnail_height: int | None = None)

Bases: _Optionals, _Rich, _Required

oEmbed content for rich HTML object.

class oembedpy.types.Video(type: str, version: str, _extra: Dict[str, Any], html: str, width: int, height: int, title: str | None = None, author_name: str | None = None, author_url: str | None = None, provider_name: str | None = None, provider_url: str | None = None, cache_age: int | None = None, thumbnail_url: str | None = None, thumbnail_width: int | None = None, thumbnail_height: int | None = None)

Bases: _Optionals, _Video, _Required

oEmbed content for vhoto object.