Models
Response model definitions for client.
Responses are parsed into Pydantic models. This allows accessing parts of the response directly as attributes. Further documentation on specific attribute values can be viewed in the Web API reference.
import tekore as tk
# Call the API
spotify = tk.Spotify(token)
album = spotify.album('3RBULTZJ97bvVzZLpxcB0j')
# Use the response
for track in album.tracks.items:
print(track.track_number, track.name)
Using Pydantic models means that responses are easy to work with.
They provide a readable repr
(particularly with devtools) for quick inspection,
and it is also possible to convert models to builtin and JSON representations:
from pprint import pprint
print(album)
pprint(album, depth=2)
album.dict()
album.json()
Responses will sometimes contain unknown attributes when the API changes.
They are ignored when parsing the response model, but a
UnknownModelAttributeWarning
is issued when encountering one.
Please consider upgrading Tekore if a newer version documents and handles it.
Models are made available in the tekore.models
namespace.
Album
Album base. |
|
Relationship between artist and album. |
|
Type of album. |
|
Simplified album object. |
|
Paging containing simplified albums. |
|
Complete album object. |
|
Album saved to library. |
|
Paging of albums in library. |
- class tekore.model.Album(*, id, href, type, uri, album_type, artists, external_urls, images, name, total_tracks, release_date, release_date_precision, available_markets=None, is_playable=None)
Bases:
Item
Album base.
- Parameters:
id (str) –
href (str) –
type (str) –
uri (str) –
album_type (AlbumType) –
artists (List[SimpleArtist]) –
external_urls (dict) –
images (List[Image]) –
name (str) –
total_tracks (int) –
release_date (str) –
release_date_precision (ReleaseDatePrecision) –
available_markets (List[str] | None) –
is_playable (bool | None) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'album_type': FieldInfo(annotation=AlbumType, required=True), 'artists': FieldInfo(annotation=List[SimpleArtist], required=True), 'available_markets': FieldInfo(annotation=Union[List[str], NoneType], required=False, default=None), 'external_urls': FieldInfo(annotation=dict, required=True), 'href': FieldInfo(annotation=str, required=True), 'id': FieldInfo(annotation=str, required=True), 'images': FieldInfo(annotation=List[Image], required=True), 'is_playable': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'name': FieldInfo(annotation=str, required=True), 'release_date': FieldInfo(annotation=str, required=True), 'release_date_precision': FieldInfo(annotation=ReleaseDatePrecision, required=True), 'total_tracks': FieldInfo(annotation=int, required=True), 'type': FieldInfo(annotation=str, required=True), 'uri': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.AlbumGroup(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
StrEnum
Relationship between artist and album.
- album = 'album'
- appears_on = 'appears_on'
- compilation = 'compilation'
- single = 'single'
- class tekore.model.AlbumType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
StrEnum
Type of album.
- album = 'album'
- compilation = 'compilation'
- ep = 'ep'
- single = 'single'
- class tekore.model.SimpleAlbum(*, id, href, type, uri, album_type, artists, external_urls, images, name, total_tracks, release_date, release_date_precision, available_markets=None, is_playable=None, album_group=None)
Bases:
Album
Simplified album object.
album_group
is available when getting an artist’s albums.available_markets
is available when market is not specified.The presence of
is_playable
is undocumented and it appears to only beTrue
when it is present.- Parameters:
id (str) –
href (str) –
type (str) –
uri (str) –
album_type (AlbumType) –
artists (List[SimpleArtist]) –
external_urls (dict) –
images (List[Image]) –
name (str) –
total_tracks (int) –
release_date (str) –
release_date_precision (ReleaseDatePrecision) –
available_markets (List[str] | None) –
is_playable (bool | None) –
album_group (AlbumGroup | None) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'album_group': FieldInfo(annotation=Union[AlbumGroup, NoneType], required=False, default=None), 'album_type': FieldInfo(annotation=AlbumType, required=True), 'artists': FieldInfo(annotation=List[SimpleArtist], required=True), 'available_markets': FieldInfo(annotation=Union[List[str], NoneType], required=False, default=None), 'external_urls': FieldInfo(annotation=dict, required=True), 'href': FieldInfo(annotation=str, required=True), 'id': FieldInfo(annotation=str, required=True), 'images': FieldInfo(annotation=List[Image], required=True), 'is_playable': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'name': FieldInfo(annotation=str, required=True), 'release_date': FieldInfo(annotation=str, required=True), 'release_date_precision': FieldInfo(annotation=ReleaseDatePrecision, required=True), 'total_tracks': FieldInfo(annotation=int, required=True), 'type': FieldInfo(annotation=str, required=True), 'uri': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.SimpleAlbumPaging(*, href, items, limit, next, total, offset, previous)
Bases:
OffsetPaging
Paging containing simplified albums.
- Parameters:
href (str) –
items (List[SimpleAlbum]) –
limit (int) –
next (str | None) –
total (int) –
offset (int) –
previous (str | None) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'href': FieldInfo(annotation=str, required=True), 'items': FieldInfo(annotation=List[SimpleAlbum], required=True), 'limit': FieldInfo(annotation=int, required=True), 'next': FieldInfo(annotation=Union[str, NoneType], required=True), 'offset': FieldInfo(annotation=int, required=True), 'previous': FieldInfo(annotation=Union[str, NoneType], required=True), 'total': FieldInfo(annotation=int, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.FullAlbum(*, id, href, type, uri, album_type, artists, external_urls, images, name, total_tracks, release_date, release_date_precision, available_markets=None, is_playable=None, copyrights, external_ids, genres, label, popularity, tracks)
Bases:
Album
Complete album object.
available_markets
is available when market is not specified.The presence of
is_playable
is undocumented and it appears to only beTrue
when it is present.- Parameters:
id (str) –
href (str) –
type (str) –
uri (str) –
album_type (AlbumType) –
artists (List[SimpleArtist]) –
external_urls (dict) –
images (List[Image]) –
name (str) –
total_tracks (int) –
release_date (str) –
release_date_precision (ReleaseDatePrecision) –
available_markets (List[str] | None) –
is_playable (bool | None) –
copyrights (List[Copyright]) –
external_ids (dict) –
genres (List[str]) –
label (str | None) –
popularity (int) –
tracks (SimpleTrackPaging) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'album_type': FieldInfo(annotation=AlbumType, required=True), 'artists': FieldInfo(annotation=List[SimpleArtist], required=True), 'available_markets': FieldInfo(annotation=Union[List[str], NoneType], required=False, default=None), 'copyrights': FieldInfo(annotation=List[Copyright], required=True), 'external_ids': FieldInfo(annotation=dict, required=True), 'external_urls': FieldInfo(annotation=dict, required=True), 'genres': FieldInfo(annotation=List[str], required=True), 'href': FieldInfo(annotation=str, required=True), 'id': FieldInfo(annotation=str, required=True), 'images': FieldInfo(annotation=List[Image], required=True), 'is_playable': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'label': FieldInfo(annotation=Union[str, NoneType], required=True), 'name': FieldInfo(annotation=str, required=True), 'popularity': FieldInfo(annotation=int, required=True), 'release_date': FieldInfo(annotation=str, required=True), 'release_date_precision': FieldInfo(annotation=ReleaseDatePrecision, required=True), 'total_tracks': FieldInfo(annotation=int, required=True), 'tracks': FieldInfo(annotation=SimpleTrackPaging, required=True), 'type': FieldInfo(annotation=str, required=True), 'uri': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.SavedAlbum(*, added_at, album)
Bases:
Model
Album saved to library.
- Parameters:
added_at (datetime) –
album (FullAlbum) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'added_at': FieldInfo(annotation=datetime, required=True), 'album': FieldInfo(annotation=FullAlbum, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.SavedAlbumPaging(*, href, items, limit, next, total, offset, previous)
Bases:
OffsetPaging
Paging of albums in library.
- Parameters:
href (str) –
items (List[SavedAlbum]) –
limit (int) –
next (str | None) –
total (int) –
offset (int) –
previous (str | None) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'href': FieldInfo(annotation=str, required=True), 'items': FieldInfo(annotation=List[SavedAlbum], required=True), 'limit': FieldInfo(annotation=int, required=True), 'next': FieldInfo(annotation=Union[str, NoneType], required=True), 'offset': FieldInfo(annotation=int, required=True), 'previous': FieldInfo(annotation=Union[str, NoneType], required=True), 'total': FieldInfo(annotation=int, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
Artist
Artist base. |
|
Simplified artist object. |
|
Complete artist object. |
|
Paging of full artists. |
|
Paging of full artists. |
- class tekore.model.Artist(*, id, href, type, uri, external_urls, name)
Bases:
Item
Artist base.
- Parameters:
id (str) –
href (str) –
type (str) –
uri (str) –
external_urls (dict) –
name (str) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'external_urls': FieldInfo(annotation=dict, required=True), 'href': FieldInfo(annotation=str, required=True), 'id': FieldInfo(annotation=str, required=True), 'name': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=str, required=True), 'uri': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.SimpleArtist(*, id, href, type, uri, external_urls, name)
Bases:
Artist
Simplified artist object.
- Parameters:
id (str) –
href (str) –
type (str) –
uri (str) –
external_urls (dict) –
name (str) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'external_urls': FieldInfo(annotation=dict, required=True), 'href': FieldInfo(annotation=str, required=True), 'id': FieldInfo(annotation=str, required=True), 'name': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=str, required=True), 'uri': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.FullArtist(*, id, href, type, uri, external_urls, name, followers, genres, images, popularity)
Bases:
Artist
Complete artist object.
- Parameters:
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'external_urls': FieldInfo(annotation=dict, required=True), 'followers': FieldInfo(annotation=Followers, required=True), 'genres': FieldInfo(annotation=List[str], required=True), 'href': FieldInfo(annotation=str, required=True), 'id': FieldInfo(annotation=str, required=True), 'images': FieldInfo(annotation=List[Image], required=True), 'name': FieldInfo(annotation=str, required=True), 'popularity': FieldInfo(annotation=int, required=True), 'type': FieldInfo(annotation=str, required=True), 'uri': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.FullArtistCursorPaging(*, href, items, limit, next, cursors, total)
Bases:
CursorPaging
Paging of full artists.
- Parameters:
href (str) –
items (List[FullArtist]) –
limit (int) –
next (str | None) –
cursors (Cursor) –
total (int) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'cursors': FieldInfo(annotation=Cursor, required=True), 'href': FieldInfo(annotation=str, required=True), 'items': FieldInfo(annotation=List[FullArtist], required=True), 'limit': FieldInfo(annotation=int, required=True), 'next': FieldInfo(annotation=Union[str, NoneType], required=True), 'total': FieldInfo(annotation=int, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.FullArtistOffsetPaging(*, href, items, limit, next, total, offset, previous)
Bases:
OffsetPaging
Paging of full artists.
- Parameters:
href (str) –
items (List[FullArtist]) –
limit (int) –
next (str | None) –
total (int) –
offset (int) –
previous (str | None) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'href': FieldInfo(annotation=str, required=True), 'items': FieldInfo(annotation=List[FullArtist], required=True), 'limit': FieldInfo(annotation=int, required=True), 'next': FieldInfo(annotation=Union[str, NoneType], required=True), 'offset': FieldInfo(annotation=int, required=True), 'previous': FieldInfo(annotation=Union[str, NoneType], required=True), 'total': FieldInfo(annotation=int, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
Audiobook
Audiobook base. |
|
Simplified audiobook. |
|
Paging of simplified audiobooks. |
|
Complete audiobook object. |
|
Audiobook author. |
|
Audiobook narrator. |
- class tekore.model.Audiobook(*, id, href, type, uri, authors, available_markets=None, copyrights, description, edition, explicit, external_urls, html_description, images, is_externally_hosted=None, languages, media_type, name, narrators, publisher, total_chapters)
Bases:
Item
Audiobook base.
- Parameters:
id (str) –
href (str) –
type (str) –
uri (str) –
authors (List[Author]) –
available_markets (List[str] | None) –
copyrights (List[Copyright]) –
description (str) –
edition (str | None) –
explicit (bool) –
external_urls (dict) –
html_description (str) –
images (List[Image]) –
is_externally_hosted (bool | None) –
languages (List[str]) –
media_type (str) –
name (str) –
narrators (List[Narrator]) –
publisher (str) –
total_chapters (int | None) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'authors': FieldInfo(annotation=List[Author], required=True), 'available_markets': FieldInfo(annotation=Union[List[str], NoneType], required=False, default=None), 'copyrights': FieldInfo(annotation=List[Copyright], required=True), 'description': FieldInfo(annotation=str, required=True), 'edition': FieldInfo(annotation=Union[str, NoneType], required=True), 'explicit': FieldInfo(annotation=bool, required=True), 'external_urls': FieldInfo(annotation=dict, required=True), 'href': FieldInfo(annotation=str, required=True), 'html_description': FieldInfo(annotation=str, required=True), 'id': FieldInfo(annotation=str, required=True), 'images': FieldInfo(annotation=List[Image], required=True), 'is_externally_hosted': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'languages': FieldInfo(annotation=List[str], required=True), 'media_type': FieldInfo(annotation=str, required=True), 'name': FieldInfo(annotation=str, required=True), 'narrators': FieldInfo(annotation=List[Narrator], required=True), 'publisher': FieldInfo(annotation=str, required=True), 'total_chapters': FieldInfo(annotation=Union[int, NoneType], required=True), 'type': FieldInfo(annotation=str, required=True), 'uri': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.SimpleAudiobook(*, id, href, type, uri, authors, available_markets=None, copyrights, description, edition, explicit, external_urls, html_description, images, is_externally_hosted=None, languages, media_type, name, narrators, publisher, total_chapters, chapters=None)
Bases:
Audiobook
Simplified audiobook.
May contain
chapters
, but that is likely an error.- Parameters:
id (str) –
href (str) –
type (str) –
uri (str) –
authors (List[Author]) –
available_markets (List[str] | None) –
copyrights (List[Copyright]) –
description (str) –
edition (str | None) –
explicit (bool) –
external_urls (dict) –
html_description (str) –
images (List[Image]) –
is_externally_hosted (bool | None) –
languages (List[str]) –
media_type (str) –
name (str) –
narrators (List[Narrator]) –
publisher (str) –
total_chapters (int | None) –
chapters (dict | None) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'authors': FieldInfo(annotation=List[Author], required=True), 'available_markets': FieldInfo(annotation=Union[List[str], NoneType], required=False, default=None), 'chapters': FieldInfo(annotation=Union[dict, NoneType], required=False, default=None), 'copyrights': FieldInfo(annotation=List[Copyright], required=True), 'description': FieldInfo(annotation=str, required=True), 'edition': FieldInfo(annotation=Union[str, NoneType], required=True), 'explicit': FieldInfo(annotation=bool, required=True), 'external_urls': FieldInfo(annotation=dict, required=True), 'href': FieldInfo(annotation=str, required=True), 'html_description': FieldInfo(annotation=str, required=True), 'id': FieldInfo(annotation=str, required=True), 'images': FieldInfo(annotation=List[Image], required=True), 'is_externally_hosted': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'languages': FieldInfo(annotation=List[str], required=True), 'media_type': FieldInfo(annotation=str, required=True), 'name': FieldInfo(annotation=str, required=True), 'narrators': FieldInfo(annotation=List[Narrator], required=True), 'publisher': FieldInfo(annotation=str, required=True), 'total_chapters': FieldInfo(annotation=Union[int, NoneType], required=True), 'type': FieldInfo(annotation=str, required=True), 'uri': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.SimpleAudiobookPaging(*, href, items, limit, next, total, offset, previous)
Bases:
OffsetPaging
Paging of simplified audiobooks.
- Parameters:
href (str) –
items (List[SimpleAudiobook]) –
limit (int) –
next (str | None) –
total (int) –
offset (int) –
previous (str | None) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'href': FieldInfo(annotation=str, required=True), 'items': FieldInfo(annotation=List[SimpleAudiobook], required=True), 'limit': FieldInfo(annotation=int, required=True), 'next': FieldInfo(annotation=Union[str, NoneType], required=True), 'offset': FieldInfo(annotation=int, required=True), 'previous': FieldInfo(annotation=Union[str, NoneType], required=True), 'total': FieldInfo(annotation=int, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.FullAudiobook(*, id, href, type, uri, authors, available_markets=None, copyrights, description, edition, explicit, external_urls, html_description, images, is_externally_hosted=None, languages, media_type, name, narrators, publisher, total_chapters, chapters, is_playable=None)
Bases:
Audiobook
Complete audiobook object.
- Parameters:
id (str) –
href (str) –
type (str) –
uri (str) –
authors (List[Author]) –
available_markets (List[str] | None) –
copyrights (List[Copyright]) –
description (str) –
edition (str | None) –
explicit (bool) –
external_urls (dict) –
html_description (str) –
images (List[Image]) –
is_externally_hosted (bool | None) –
languages (List[str]) –
media_type (str) –
name (str) –
narrators (List[Narrator]) –
publisher (str) –
total_chapters (int | None) –
chapters (SimpleChapterPaging) –
is_playable (bool | None) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'authors': FieldInfo(annotation=List[Author], required=True), 'available_markets': FieldInfo(annotation=Union[List[str], NoneType], required=False, default=None), 'chapters': FieldInfo(annotation=SimpleChapterPaging, required=True), 'copyrights': FieldInfo(annotation=List[Copyright], required=True), 'description': FieldInfo(annotation=str, required=True), 'edition': FieldInfo(annotation=Union[str, NoneType], required=True), 'explicit': FieldInfo(annotation=bool, required=True), 'external_urls': FieldInfo(annotation=dict, required=True), 'href': FieldInfo(annotation=str, required=True), 'html_description': FieldInfo(annotation=str, required=True), 'id': FieldInfo(annotation=str, required=True), 'images': FieldInfo(annotation=List[Image], required=True), 'is_externally_hosted': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'is_playable': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'languages': FieldInfo(annotation=List[str], required=True), 'media_type': FieldInfo(annotation=str, required=True), 'name': FieldInfo(annotation=str, required=True), 'narrators': FieldInfo(annotation=List[Narrator], required=True), 'publisher': FieldInfo(annotation=str, required=True), 'total_chapters': FieldInfo(annotation=Union[int, NoneType], required=True), 'type': FieldInfo(annotation=str, required=True), 'uri': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.Author(*, name)
Bases:
Model
Audiobook author.
- Parameters:
name (str) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'name': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.Narrator(*, name)
Bases:
Model
Audiobook narrator.
- Parameters:
name (str) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'name': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
Category
Spotify tag category. |
|
Paging of categories. |
- class tekore.model.Category(*, id, href, icons, name)
Bases:
Identifiable
Spotify tag category.
- Parameters:
id (str) –
href (str) –
icons (List[Image]) –
name (str) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'href': FieldInfo(annotation=str, required=True), 'icons': FieldInfo(annotation=List[Image], required=True), 'id': FieldInfo(annotation=str, required=True), 'name': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.CategoryPaging(*, href, items, limit, next, total, offset, previous)
Bases:
OffsetPaging
Paging of categories.
- Parameters:
href (str) –
items (List[Category]) –
limit (int) –
next (str | None) –
total (int) –
offset (int) –
previous (str | None) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'href': FieldInfo(annotation=str, required=True), 'items': FieldInfo(annotation=List[Category], required=True), 'limit': FieldInfo(annotation=int, required=True), 'next': FieldInfo(annotation=Union[str, NoneType], required=True), 'offset': FieldInfo(annotation=int, required=True), 'previous': FieldInfo(annotation=Union[str, NoneType], required=True), 'total': FieldInfo(annotation=int, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
Chapter
Audiobook chapter base. |
|
Simplified chapter. |
|
Paging of simplified chapters. |
|
Complete chapter object. |
- class tekore.model.Chapter(*, id, href, type, uri, audio_preview_url, available_markets=None, chapter_number, description, duration_ms, explicit, external_urls, html_description, images, is_playable=None, languages, name, release_date_precision, release_date, restrictions=None, resume_point=None)
Bases:
Item
Audiobook chapter base.
- Parameters:
id (str) –
href (str) –
type (str) –
uri (str) –
audio_preview_url (str | None) –
available_markets (List[str] | None) –
chapter_number (int) –
description (str) –
duration_ms (int) –
explicit (bool) –
external_urls (dict) –
html_description (str) –
images (List[Image]) –
is_playable (bool | None) –
languages (List[str]) –
name (str) –
release_date_precision (ReleaseDatePrecision) –
release_date (str) –
restrictions (Restrictions | None) –
resume_point (ResumePoint | None) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'audio_preview_url': FieldInfo(annotation=Union[str, NoneType], required=True), 'available_markets': FieldInfo(annotation=Union[List[str], NoneType], required=False, default=None), 'chapter_number': FieldInfo(annotation=int, required=True), 'description': FieldInfo(annotation=str, required=True), 'duration_ms': FieldInfo(annotation=int, required=True), 'explicit': FieldInfo(annotation=bool, required=True), 'external_urls': FieldInfo(annotation=dict, required=True), 'href': FieldInfo(annotation=str, required=True), 'html_description': FieldInfo(annotation=str, required=True), 'id': FieldInfo(annotation=str, required=True), 'images': FieldInfo(annotation=List[Image], required=True), 'is_playable': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'languages': FieldInfo(annotation=List[str], required=True), 'name': FieldInfo(annotation=str, required=True), 'release_date': FieldInfo(annotation=str, required=True), 'release_date_precision': FieldInfo(annotation=ReleaseDatePrecision, required=True), 'restrictions': FieldInfo(annotation=Union[Restrictions, NoneType], required=False, default=None), 'resume_point': FieldInfo(annotation=Union[ResumePoint, NoneType], required=False, default=None), 'type': FieldInfo(annotation=str, required=True), 'uri': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.SimpleChapter(*, id, href, type, uri, audio_preview_url, available_markets=None, chapter_number, description, duration_ms, explicit, external_urls, html_description, images, is_playable=None, languages, name, release_date_precision, release_date, restrictions=None, resume_point=None)
Bases:
Chapter
Simplified chapter.
- Parameters:
id (str) –
href (str) –
type (str) –
uri (str) –
audio_preview_url (str | None) –
available_markets (List[str] | None) –
chapter_number (int) –
description (str) –
duration_ms (int) –
explicit (bool) –
external_urls (dict) –
html_description (str) –
images (List[Image]) –
is_playable (bool | None) –
languages (List[str]) –
name (str) –
release_date_precision (ReleaseDatePrecision) –
release_date (str) –
restrictions (Restrictions | None) –
resume_point (ResumePoint | None) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'audio_preview_url': FieldInfo(annotation=Union[str, NoneType], required=True), 'available_markets': FieldInfo(annotation=Union[List[str], NoneType], required=False, default=None), 'chapter_number': FieldInfo(annotation=int, required=True), 'description': FieldInfo(annotation=str, required=True), 'duration_ms': FieldInfo(annotation=int, required=True), 'explicit': FieldInfo(annotation=bool, required=True), 'external_urls': FieldInfo(annotation=dict, required=True), 'href': FieldInfo(annotation=str, required=True), 'html_description': FieldInfo(annotation=str, required=True), 'id': FieldInfo(annotation=str, required=True), 'images': FieldInfo(annotation=List[Image], required=True), 'is_playable': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'languages': FieldInfo(annotation=List[str], required=True), 'name': FieldInfo(annotation=str, required=True), 'release_date': FieldInfo(annotation=str, required=True), 'release_date_precision': FieldInfo(annotation=ReleaseDatePrecision, required=True), 'restrictions': FieldInfo(annotation=Union[Restrictions, NoneType], required=False, default=None), 'resume_point': FieldInfo(annotation=Union[ResumePoint, NoneType], required=False, default=None), 'type': FieldInfo(annotation=str, required=True), 'uri': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.SimpleChapterPaging(*, href, items, limit, next, total, offset, previous)
Bases:
OffsetPaging
Paging of simplified chapters.
- Parameters:
href (str) –
items (List[SimpleChapter]) –
limit (int) –
next (str | None) –
total (int) –
offset (int) –
previous (str | None) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'href': FieldInfo(annotation=str, required=True), 'items': FieldInfo(annotation=List[SimpleChapter], required=True), 'limit': FieldInfo(annotation=int, required=True), 'next': FieldInfo(annotation=Union[str, NoneType], required=True), 'offset': FieldInfo(annotation=int, required=True), 'previous': FieldInfo(annotation=Union[str, NoneType], required=True), 'total': FieldInfo(annotation=int, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.FullChapter(*, id, href, type, uri, audio_preview_url, available_markets=None, chapter_number, description, duration_ms, explicit, external_urls, html_description, images, is_playable=None, languages, name, release_date_precision, release_date, restrictions=None, resume_point=None, audiobook)
Bases:
Chapter
Complete chapter object.
- Parameters:
id (str) –
href (str) –
type (str) –
uri (str) –
audio_preview_url (str | None) –
available_markets (List[str] | None) –
chapter_number (int) –
description (str) –
duration_ms (int) –
explicit (bool) –
external_urls (dict) –
html_description (str) –
images (List[Image]) –
is_playable (bool | None) –
languages (List[str]) –
name (str) –
release_date_precision (ReleaseDatePrecision) –
release_date (str) –
restrictions (Restrictions | None) –
resume_point (ResumePoint | None) –
audiobook (SimpleAudiobook) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'audio_preview_url': FieldInfo(annotation=Union[str, NoneType], required=True), 'audiobook': FieldInfo(annotation=SimpleAudiobook, required=True), 'available_markets': FieldInfo(annotation=Union[List[str], NoneType], required=False, default=None), 'chapter_number': FieldInfo(annotation=int, required=True), 'description': FieldInfo(annotation=str, required=True), 'duration_ms': FieldInfo(annotation=int, required=True), 'explicit': FieldInfo(annotation=bool, required=True), 'external_urls': FieldInfo(annotation=dict, required=True), 'href': FieldInfo(annotation=str, required=True), 'html_description': FieldInfo(annotation=str, required=True), 'id': FieldInfo(annotation=str, required=True), 'images': FieldInfo(annotation=List[Image], required=True), 'is_playable': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'languages': FieldInfo(annotation=List[str], required=True), 'name': FieldInfo(annotation=str, required=True), 'release_date': FieldInfo(annotation=str, required=True), 'release_date_precision': FieldInfo(annotation=ReleaseDatePrecision, required=True), 'restrictions': FieldInfo(annotation=Union[Restrictions, NoneType], required=False, default=None), 'resume_point': FieldInfo(annotation=Union[ResumePoint, NoneType], required=False, default=None), 'type': FieldInfo(annotation=str, required=True), 'uri': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
Episode
Episode base. |
|
Simplified episode object. |
|
Paging of simplified episodes. |
|
Complete episode object. |
|
Episode saved to library. |
|
Paging of episodes in library. |
|
Resume point. |
- class tekore.model.Episode(*, id, href, type, uri, audio_preview_url, description, duration_ms, explicit, external_urls, html_description, images, is_externally_hosted, is_playable=None, language=None, languages, name, release_date, release_date_precision, resume_point=None)
Bases:
Item
Episode base.
language
is deprecated.- Parameters:
id (str) –
href (str) –
type (str) –
uri (str) –
audio_preview_url (str | None) –
description (str) –
duration_ms (int) –
explicit (bool) –
external_urls (dict) –
html_description (str) –
images (List[Image]) –
is_externally_hosted (bool) –
is_playable (bool | None) –
language (str | None) –
languages (List[str]) –
name (str) –
release_date (str) –
release_date_precision (ReleaseDatePrecision) –
resume_point (ResumePoint | None) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'audio_preview_url': FieldInfo(annotation=Union[str, NoneType], required=True), 'description': FieldInfo(annotation=str, required=True), 'duration_ms': FieldInfo(annotation=int, required=True), 'explicit': FieldInfo(annotation=bool, required=True), 'external_urls': FieldInfo(annotation=dict, required=True), 'href': FieldInfo(annotation=str, required=True), 'html_description': FieldInfo(annotation=str, required=True), 'id': FieldInfo(annotation=str, required=True), 'images': FieldInfo(annotation=List[Image], required=True), 'is_externally_hosted': FieldInfo(annotation=bool, required=True), 'is_playable': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'language': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'languages': FieldInfo(annotation=List[str], required=True), 'name': FieldInfo(annotation=str, required=True), 'release_date': FieldInfo(annotation=str, required=True), 'release_date_precision': FieldInfo(annotation=ReleaseDatePrecision, required=True), 'resume_point': FieldInfo(annotation=Union[ResumePoint, NoneType], required=False, default=None), 'type': FieldInfo(annotation=str, required=True), 'uri': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.SimpleEpisode(*, id, href, type, uri, audio_preview_url, description, duration_ms, explicit, external_urls, html_description, images, is_externally_hosted, is_playable=None, language=None, languages, name, release_date, release_date_precision, resume_point=None)
Bases:
Episode
Simplified episode object.
- Parameters:
id (str) –
href (str) –
type (str) –
uri (str) –
audio_preview_url (str | None) –
description (str) –
duration_ms (int) –
explicit (bool) –
external_urls (dict) –
html_description (str) –
images (List[Image]) –
is_externally_hosted (bool) –
is_playable (bool | None) –
language (str | None) –
languages (List[str]) –
name (str) –
release_date (str) –
release_date_precision (ReleaseDatePrecision) –
resume_point (ResumePoint | None) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'audio_preview_url': FieldInfo(annotation=Union[str, NoneType], required=True), 'description': FieldInfo(annotation=str, required=True), 'duration_ms': FieldInfo(annotation=int, required=True), 'explicit': FieldInfo(annotation=bool, required=True), 'external_urls': FieldInfo(annotation=dict, required=True), 'href': FieldInfo(annotation=str, required=True), 'html_description': FieldInfo(annotation=str, required=True), 'id': FieldInfo(annotation=str, required=True), 'images': FieldInfo(annotation=List[Image], required=True), 'is_externally_hosted': FieldInfo(annotation=bool, required=True), 'is_playable': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'language': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'languages': FieldInfo(annotation=List[str], required=True), 'name': FieldInfo(annotation=str, required=True), 'release_date': FieldInfo(annotation=str, required=True), 'release_date_precision': FieldInfo(annotation=ReleaseDatePrecision, required=True), 'resume_point': FieldInfo(annotation=Union[ResumePoint, NoneType], required=False, default=None), 'type': FieldInfo(annotation=str, required=True), 'uri': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.SimpleEpisodePaging(*, href, items, limit, next, total, offset, previous)
Bases:
OffsetPaging
Paging of simplified episodes.
- Parameters:
href (str) –
items (List[SimpleEpisode]) –
limit (int) –
next (str | None) –
total (int) –
offset (int) –
previous (str | None) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'href': FieldInfo(annotation=str, required=True), 'items': FieldInfo(annotation=List[SimpleEpisode], required=True), 'limit': FieldInfo(annotation=int, required=True), 'next': FieldInfo(annotation=Union[str, NoneType], required=True), 'offset': FieldInfo(annotation=int, required=True), 'previous': FieldInfo(annotation=Union[str, NoneType], required=True), 'total': FieldInfo(annotation=int, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.FullEpisode(*, id, href, type, uri, audio_preview_url, description, duration_ms, explicit, external_urls, html_description, images, is_externally_hosted, is_playable=None, language=None, languages, name, release_date, release_date_precision, resume_point=None, restrictions=None, show)
Bases:
Episode
Complete episode object.
- Parameters:
id (str) –
href (str) –
type (str) –
uri (str) –
audio_preview_url (str | None) –
description (str) –
duration_ms (int) –
explicit (bool) –
external_urls (dict) –
html_description (str) –
images (List[Image]) –
is_externally_hosted (bool) –
is_playable (bool | None) –
language (str | None) –
languages (List[str]) –
name (str) –
release_date (str) –
release_date_precision (ReleaseDatePrecision) –
resume_point (ResumePoint | None) –
restrictions (Restrictions | None) –
show (SimpleShow) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'audio_preview_url': FieldInfo(annotation=Union[str, NoneType], required=True), 'description': FieldInfo(annotation=str, required=True), 'duration_ms': FieldInfo(annotation=int, required=True), 'explicit': FieldInfo(annotation=bool, required=True), 'external_urls': FieldInfo(annotation=dict, required=True), 'href': FieldInfo(annotation=str, required=True), 'html_description': FieldInfo(annotation=str, required=True), 'id': FieldInfo(annotation=str, required=True), 'images': FieldInfo(annotation=List[Image], required=True), 'is_externally_hosted': FieldInfo(annotation=bool, required=True), 'is_playable': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'language': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'languages': FieldInfo(annotation=List[str], required=True), 'name': FieldInfo(annotation=str, required=True), 'release_date': FieldInfo(annotation=str, required=True), 'release_date_precision': FieldInfo(annotation=ReleaseDatePrecision, required=True), 'restrictions': FieldInfo(annotation=Union[Restrictions, NoneType], required=False, default=None), 'resume_point': FieldInfo(annotation=Union[ResumePoint, NoneType], required=False, default=None), 'show': FieldInfo(annotation=SimpleShow, required=True), 'type': FieldInfo(annotation=str, required=True), 'uri': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.SavedEpisode(*, added_at, episode)
Bases:
Model
Episode saved to library.
- Parameters:
added_at (datetime) –
episode (FullEpisode) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'added_at': FieldInfo(annotation=datetime, required=True), 'episode': FieldInfo(annotation=FullEpisode, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.SavedEpisodePaging(*, href, items, limit, next, total, offset, previous)
Bases:
OffsetPaging
Paging of episodes in library.
- Parameters:
href (str) –
items (List[SavedEpisode]) –
limit (int) –
next (str | None) –
total (int) –
offset (int) –
previous (str | None) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'href': FieldInfo(annotation=str, required=True), 'items': FieldInfo(annotation=List[SavedEpisode], required=True), 'limit': FieldInfo(annotation=int, required=True), 'next': FieldInfo(annotation=Union[str, NoneType], required=True), 'offset': FieldInfo(annotation=int, required=True), 'previous': FieldInfo(annotation=Union[str, NoneType], required=True), 'total': FieldInfo(annotation=int, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.ResumePoint(*, fully_played, resume_position_ms)
Bases:
Model
Resume point.
- Parameters:
fully_played (bool) –
resume_position_ms (int) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'fully_played': FieldInfo(annotation=bool, required=True), 'resume_position_ms': FieldInfo(annotation=int, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
Playback
Current playback. |
|
Extended current playback context. |
|
Type of currently playing item. |
|
Playback queue. |
|
Playback device. |
|
Type of playback device. |
|
Player actions. |
|
Disallowed player actions. |
|
Reasons for errors in player actions. |
|
Playback repeat state. |
|
Previously played track. |
|
Cursor to play history. |
|
Paging to play history. |
|
Context of a played track or episode. |
|
Type of player context. |
Currently playing
- class tekore.model.CurrentlyPlaying(*, actions, currently_playing_type, is_playing, timestamp, context, progress_ms, item)
Bases:
Model
Current playback.
context
,progress_ms
anditem
may beNone
e.g. during a private session.- Parameters:
actions (Actions) –
currently_playing_type (CurrentlyPlayingType) –
is_playing (bool) –
timestamp (int) –
context (Context | None) –
progress_ms (int | None) –
item (FullTrack | LocalTrack | FullEpisode | None) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'actions': FieldInfo(annotation=Actions, required=True), 'context': FieldInfo(annotation=Union[Context, NoneType], required=True), 'currently_playing_type': FieldInfo(annotation=CurrentlyPlayingType, required=True), 'is_playing': FieldInfo(annotation=bool, required=True), 'item': FieldInfo(annotation=Union[FullTrack, LocalTrack, FullEpisode, NoneType], required=True), 'progress_ms': FieldInfo(annotation=Union[int, NoneType], required=True), 'timestamp': FieldInfo(annotation=int, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.CurrentlyPlayingContext(*, actions, currently_playing_type, is_playing, timestamp, context, progress_ms, item, device, repeat_state, shuffle_state, smart_shuffle)
Bases:
CurrentlyPlaying
Extended current playback context.
smart_shuffle
is not documented in the Spotify API.- Parameters:
actions (Actions) –
currently_playing_type (CurrentlyPlayingType) –
is_playing (bool) –
timestamp (int) –
context (Context | None) –
progress_ms (int | None) –
item (FullTrack | LocalTrack | FullEpisode | None) –
device (Device) –
repeat_state (RepeatState) –
shuffle_state (bool) –
smart_shuffle (bool | None) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'actions': FieldInfo(annotation=Actions, required=True), 'context': FieldInfo(annotation=Union[Context, NoneType], required=True), 'currently_playing_type': FieldInfo(annotation=CurrentlyPlayingType, required=True), 'device': FieldInfo(annotation=Device, required=True), 'is_playing': FieldInfo(annotation=bool, required=True), 'item': FieldInfo(annotation=Union[FullTrack, LocalTrack, FullEpisode, NoneType], required=True), 'progress_ms': FieldInfo(annotation=Union[int, NoneType], required=True), 'repeat_state': FieldInfo(annotation=RepeatState, required=True), 'shuffle_state': FieldInfo(annotation=bool, required=True), 'smart_shuffle': FieldInfo(annotation=Union[bool, NoneType], required=True), 'timestamp': FieldInfo(annotation=int, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.CurrentlyPlayingType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
StrEnum
Type of currently playing item.
- ad = 'ad'
- episode = 'episode'
- track = 'track'
- unknown = 'unknown'
- class tekore.model.Queue(*, currently_playing, queue)
Bases:
Model
Playback queue.
- Parameters:
currently_playing (FullTrack | LocalTrack | FullEpisode | None) –
queue (List[FullTrack | LocalTrack | FullEpisode | None]) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'currently_playing': FieldInfo(annotation=Union[FullTrack, LocalTrack, FullEpisode, NoneType], required=True), 'queue': FieldInfo(annotation=List[Union[FullTrack, LocalTrack, FullEpisode, NoneType]], required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.Device(*, id, is_active, is_private_session, is_restricted, name, type, volume_percent, supports_volume)
Bases:
Identifiable
Playback device.
- Parameters:
id (str) –
is_active (bool) –
is_private_session (bool) –
is_restricted (bool) –
name (str) –
type (DeviceType) –
volume_percent (int | None) –
supports_volume (bool) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'id': FieldInfo(annotation=str, required=True), 'is_active': FieldInfo(annotation=bool, required=True), 'is_private_session': FieldInfo(annotation=bool, required=True), 'is_restricted': FieldInfo(annotation=bool, required=True), 'name': FieldInfo(annotation=str, required=True), 'supports_volume': FieldInfo(annotation=bool, required=True), 'type': FieldInfo(annotation=DeviceType, required=True), 'volume_percent': FieldInfo(annotation=Union[int, NoneType], required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.DeviceType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
StrEnum
Type of playback device.
- AVR = 'AVR'
- AudioDongle = 'AudioDongle'
- Automobile = 'Automobile'
- CastAudio = 'CastAudio'
- CastVideo = 'CastVideo'
- Computer = 'Computer'
- GameConsole = 'GameConsole'
- STB = 'STB'
- Smartphone = 'Smartphone'
- Speaker = 'Speaker'
- TV = 'TV'
- Tablet = 'Tablet'
- Unknown = 'Unknown'
- audiodongle = 'AudioDongle'
- automobile = 'Automobile'
- avr = 'AVR'
- castaudio = 'CastAudio'
- castvideo = 'CastVideo'
- computer = 'Computer'
- gameconsole = 'GameConsole'
- smartphone = 'Smartphone'
- speaker = 'Speaker'
- stb = 'STB'
- tablet = 'Tablet'
- tv = 'TV'
- unknown = 'Unknown'
- class tekore.model.Actions(*, disallows)
Bases:
Model
Player actions.
- Parameters:
disallows (Disallows) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'disallows': FieldInfo(annotation=Disallows, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.Disallows(*, interrupting_playback=False, pausing=False, resuming=False, seeking=False, skipping_next=False, skipping_prev=False, toggling_repeat_context=False, toggling_shuffle=False, toggling_repeat_track=False, transferring_playback=False)
Bases:
Model
Disallowed player actions.
- Parameters:
interrupting_playback (bool) –
pausing (bool) –
resuming (bool) –
seeking (bool) –
skipping_next (bool) –
skipping_prev (bool) –
toggling_repeat_context (bool) –
toggling_shuffle (bool) –
toggling_repeat_track (bool) –
transferring_playback (bool) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'interrupting_playback': FieldInfo(annotation=bool, required=False, default=False), 'pausing': FieldInfo(annotation=bool, required=False, default=False), 'resuming': FieldInfo(annotation=bool, required=False, default=False), 'seeking': FieldInfo(annotation=bool, required=False, default=False), 'skipping_next': FieldInfo(annotation=bool, required=False, default=False), 'skipping_prev': FieldInfo(annotation=bool, required=False, default=False), 'toggling_repeat_context': FieldInfo(annotation=bool, required=False, default=False), 'toggling_repeat_track': FieldInfo(annotation=bool, required=False, default=False), 'toggling_shuffle': FieldInfo(annotation=bool, required=False, default=False), 'transferring_playback': FieldInfo(annotation=bool, required=False, default=False)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.PlayerErrorReason(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
Reasons for errors in player actions.
- ALREADY_PAUSED = 'The command requires playback to not be paused.'
- ALREADY_PLAYING = 'The track should not be restarted if the same track and context is already playing, and there is a resume point.'
- CONTEXT_DISALLOW = 'The command could not be performed on the context.'
- DEVICE_NOT_CONTROLLABLE = 'Not possible to remote control the device.'
- ENDLESS_CONTEXT = 'The shuffle command cannot be applied on an endless context.'
- NOT_PAUSED = 'The command requires playback to be paused.'
- NOT_PLAYING_CONTEXT = 'The command requires that a context is currently playing.'
- NOT_PLAYING_LOCALLY = 'The command requires playback on the local device.'
- NOT_PLAYING_TRACK = 'The command requires that a track is currently playing.'
- NO_ACTIVE_DEVICE = 'Requires an active device and the user has none.'
- NO_NEXT_TRACK = 'The command requires a next track, but there is none in the context.'
- NO_PREV_TRACK = 'The command requires a previous track, but there is none in the context.'
- NO_SPECIFIC_TRACK = 'The requested track does not exist.'
- PREMIUM_REQUIRED = 'The request is prohibited for non-premium users.'
- RATE_LIMITED = 'The user is rate limited due to too frequent track play,also known as cat-on-the-keyboard spamming.'
- REMOTE_CONTROL_DISALLOW = 'The context cannot be remote-controlled.'
- UNKNOWN = 'Certain actions are restricted because of unknown reasons.'
- VOLUME_CONTROL_DISALLOW = 'Not possible to remote control the device’s volume.'
Play history
- class tekore.model.PlayHistory(*, track, played_at, context)
Bases:
Model
Previously played track.
Context is supposedly sometimes available.
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'context': FieldInfo(annotation=Union[Context, NoneType], required=True), 'played_at': FieldInfo(annotation=datetime, required=True), 'track': FieldInfo(annotation=FullTrack, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.PlayHistoryCursor(*, after, before)
Bases:
Cursor
Cursor to play history.
- Parameters:
after (str | None) –
before (str) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'after': FieldInfo(annotation=Union[str, NoneType], required=True), 'before': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.PlayHistoryPaging(*, href, items, limit, next, cursors)
Bases:
CursorPaging
Paging to play history.
Cursors are not available when paging is exhausted.
- Parameters:
href (str) –
items (List[PlayHistory]) –
limit (int) –
next (str | None) –
cursors (PlayHistoryCursor | None) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'cursors': FieldInfo(annotation=Union[PlayHistoryCursor, NoneType], required=True), 'href': FieldInfo(annotation=str, required=True), 'items': FieldInfo(annotation=List[PlayHistory], required=True), 'limit': FieldInfo(annotation=int, required=True), 'next': FieldInfo(annotation=Union[str, NoneType], required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.Context(*, type, href, external_urls, uri)
Bases:
Model
Context of a played track or episode.
- Parameters:
type (ContextType) –
href (str) –
external_urls (dict) –
uri (str) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'external_urls': FieldInfo(annotation=dict, required=True), 'href': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=ContextType, required=True), 'uri': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
Playlist
Playlist base. |
|
Track or episode on a playlist. |
|
Paging of playlist tracks. |
|
Simplified playlist object. |
|
Paging of simplified playlists. |
|
Complete playlist object. |
|
Track on a playlist. |
|
Episode on a playlist. |
|
Local track on a playlist. |
|
Base for local items. |
|
Album of a locally saved track. |
|
Artist of a locally saved track. |
|
Locally saved track. |
- class tekore.model.Playlist(*, id, href, type, uri, collaborative, description, external_urls, images, name, owner, public, snapshot_id, primary_color)
Bases:
Item
Playlist base.
owner
can beNone
on featured playlists.- Parameters:
id (str) –
href (str) –
type (str) –
uri (str) –
collaborative (bool) –
description (str | None) –
external_urls (dict) –
images (List[Image] | None) –
name (str) –
owner (PublicUser) –
public (bool | None) –
snapshot_id (str) –
primary_color (str | None) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'collaborative': FieldInfo(annotation=bool, required=True), 'description': FieldInfo(annotation=Union[str, NoneType], required=True), 'external_urls': FieldInfo(annotation=dict, required=True), 'href': FieldInfo(annotation=str, required=True), 'id': FieldInfo(annotation=str, required=True), 'images': FieldInfo(annotation=Union[List[Image], NoneType], required=True), 'name': FieldInfo(annotation=str, required=True), 'owner': FieldInfo(annotation=PublicUser, required=True), 'primary_color': FieldInfo(annotation=Union[str, NoneType], required=True), 'public': FieldInfo(annotation=Union[bool, NoneType], required=True), 'snapshot_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=str, required=True), 'uri': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.PlaylistTrack(*, added_at, added_by, is_local, track, primary_color, video_thumbnail)
Bases:
Model
Track or episode on a playlist.
- Parameters:
added_at (datetime) –
added_by (PublicUser) –
is_local (bool) –
track (FullPlaylistTrack | FullPlaylistEpisode | LocalPlaylistTrack | None) –
primary_color (str | None) –
video_thumbnail (dict | None) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'added_at': FieldInfo(annotation=datetime, required=True), 'added_by': FieldInfo(annotation=PublicUser, required=True), 'is_local': FieldInfo(annotation=bool, required=True), 'primary_color': FieldInfo(annotation=Union[str, NoneType], required=True), 'track': FieldInfo(annotation=Union[FullPlaylistTrack, FullPlaylistEpisode, LocalPlaylistTrack, NoneType], required=True), 'video_thumbnail': FieldInfo(annotation=Union[dict, NoneType], required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.PlaylistTrackPaging(*, href, items, limit, next, total, offset, previous)
Bases:
OffsetPaging
Paging of playlist tracks.
- Parameters:
href (str) –
items (List[PlaylistTrack]) –
limit (int) –
next (str | None) –
total (int) –
offset (int) –
previous (str | None) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'href': FieldInfo(annotation=str, required=True), 'items': FieldInfo(annotation=List[PlaylistTrack], required=True), 'limit': FieldInfo(annotation=int, required=True), 'next': FieldInfo(annotation=Union[str, NoneType], required=True), 'offset': FieldInfo(annotation=int, required=True), 'previous': FieldInfo(annotation=Union[str, NoneType], required=True), 'total': FieldInfo(annotation=int, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.SimplePlaylist(*, id, href, type, uri, collaborative, description, external_urls, images, name, owner, public, snapshot_id, primary_color, tracks)
Bases:
Playlist
Simplified playlist object.
- Parameters:
id (str) –
href (str) –
type (str) –
uri (str) –
collaborative (bool) –
description (str | None) –
external_urls (dict) –
images (List[Image] | None) –
name (str) –
owner (PublicUser) –
public (bool | None) –
snapshot_id (str) –
primary_color (str | None) –
tracks (Tracks) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'collaborative': FieldInfo(annotation=bool, required=True), 'description': FieldInfo(annotation=Union[str, NoneType], required=True), 'external_urls': FieldInfo(annotation=dict, required=True), 'href': FieldInfo(annotation=str, required=True), 'id': FieldInfo(annotation=str, required=True), 'images': FieldInfo(annotation=Union[List[Image], NoneType], required=True), 'name': FieldInfo(annotation=str, required=True), 'owner': FieldInfo(annotation=PublicUser, required=True), 'primary_color': FieldInfo(annotation=Union[str, NoneType], required=True), 'public': FieldInfo(annotation=Union[bool, NoneType], required=True), 'snapshot_id': FieldInfo(annotation=str, required=True), 'tracks': FieldInfo(annotation=Tracks, required=True), 'type': FieldInfo(annotation=str, required=True), 'uri': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.SimplePlaylistPaging(*, href, items, limit, next, total, offset, previous)
Bases:
OffsetPaging
Paging of simplified playlists.
- Parameters:
href (str) –
items (List[SimplePlaylist | None]) –
limit (int) –
next (str | None) –
total (int) –
offset (int) –
previous (str | None) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'href': FieldInfo(annotation=str, required=True), 'items': FieldInfo(annotation=List[Union[SimplePlaylist, NoneType]], required=True), 'limit': FieldInfo(annotation=int, required=True), 'next': FieldInfo(annotation=Union[str, NoneType], required=True), 'offset': FieldInfo(annotation=int, required=True), 'previous': FieldInfo(annotation=Union[str, NoneType], required=True), 'total': FieldInfo(annotation=int, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.FullPlaylist(*, id, href, type, uri, collaborative, description, external_urls, images, name, owner, public, snapshot_id, primary_color, followers, tracks)
Bases:
Playlist
Complete playlist object.
- Parameters:
id (str) –
href (str) –
type (str) –
uri (str) –
collaborative (bool) –
description (str | None) –
external_urls (dict) –
images (List[Image] | None) –
name (str) –
owner (PublicUser) –
public (bool | None) –
snapshot_id (str) –
primary_color (str | None) –
followers (Followers) –
tracks (PlaylistTrackPaging) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'collaborative': FieldInfo(annotation=bool, required=True), 'description': FieldInfo(annotation=Union[str, NoneType], required=True), 'external_urls': FieldInfo(annotation=dict, required=True), 'followers': FieldInfo(annotation=Followers, required=True), 'href': FieldInfo(annotation=str, required=True), 'id': FieldInfo(annotation=str, required=True), 'images': FieldInfo(annotation=Union[List[Image], NoneType], required=True), 'name': FieldInfo(annotation=str, required=True), 'owner': FieldInfo(annotation=PublicUser, required=True), 'primary_color': FieldInfo(annotation=Union[str, NoneType], required=True), 'public': FieldInfo(annotation=Union[bool, NoneType], required=True), 'snapshot_id': FieldInfo(annotation=str, required=True), 'tracks': FieldInfo(annotation=PlaylistTrackPaging, required=True), 'type': FieldInfo(annotation=str, required=True), 'uri': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.FullPlaylistTrack(*, id, href, type, uri, artists, available_markets=None, disc_number, duration_ms, explicit, external_urls, is_local, is_playable=None, linked_from=None, name, preview_url=None, restrictions=None, track_number, album, external_ids, popularity, episode, track)
Bases:
FullTrack
Track on a playlist.
Provides
episode
andtrack
booleans to easily determine the type of playlist item.- Parameters:
id (str) –
href (str) –
type (str) –
uri (str) –
artists (List[SimpleArtist]) –
available_markets (List[str] | None) –
disc_number (int) –
duration_ms (int) –
explicit (bool) –
external_urls (dict) –
is_local (Literal[False]) –
is_playable (bool | None) –
linked_from (TrackLink | None) –
name (str) –
preview_url (str | None) –
restrictions (Restrictions | None) –
track_number (int) –
album (SimpleAlbum) –
external_ids (dict) –
popularity (int) –
episode (Literal[False]) –
track (Literal[True]) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'album': FieldInfo(annotation=SimpleAlbum, required=True), 'artists': FieldInfo(annotation=List[SimpleArtist], required=True), 'available_markets': FieldInfo(annotation=Union[List[str], NoneType], required=False, default=None), 'disc_number': FieldInfo(annotation=int, required=True), 'duration_ms': FieldInfo(annotation=int, required=True), 'episode': FieldInfo(annotation=Literal[False], required=True), 'explicit': FieldInfo(annotation=bool, required=True), 'external_ids': FieldInfo(annotation=dict, required=True), 'external_urls': FieldInfo(annotation=dict, required=True), 'href': FieldInfo(annotation=str, required=True), 'id': FieldInfo(annotation=str, required=True), 'is_local': FieldInfo(annotation=Literal[False], required=True), 'is_playable': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'linked_from': FieldInfo(annotation=Union[TrackLink, NoneType], required=False, default=None), 'name': FieldInfo(annotation=str, required=True), 'popularity': FieldInfo(annotation=int, required=True), 'preview_url': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'restrictions': FieldInfo(annotation=Union[Restrictions, NoneType], required=False, default=None), 'track': FieldInfo(annotation=Literal[True], required=True), 'track_number': FieldInfo(annotation=int, required=True), 'type': FieldInfo(annotation=str, required=True), 'uri': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.FullPlaylistEpisode(*, id, href, type, uri, audio_preview_url, description, duration_ms, explicit, external_urls, html_description, images, is_externally_hosted, is_playable=None, language=None, languages, name, release_date, release_date_precision, resume_point=None, restrictions=None, show, available_markets=None, episode, track)
Bases:
FullEpisode
Episode on a playlist.
Provides
episode
andtrack
booleans to easily determine the type of playlist item.available_markets
is undocumented.- Parameters:
id (str) –
href (str) –
type (str) –
uri (str) –
audio_preview_url (str | None) –
description (str) –
duration_ms (int) –
explicit (bool) –
external_urls (dict) –
html_description (str) –
images (List[Image]) –
is_externally_hosted (bool) –
is_playable (bool | None) –
language (str | None) –
languages (List[str]) –
name (str) –
release_date (str) –
release_date_precision (ReleaseDatePrecision) –
resume_point (ResumePoint | None) –
restrictions (Restrictions | None) –
show (SimpleShow) –
available_markets (List[str] | None) –
episode (Literal[True]) –
track (Literal[False]) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'audio_preview_url': FieldInfo(annotation=Union[str, NoneType], required=True), 'available_markets': FieldInfo(annotation=Union[List[str], NoneType], required=False, default=None), 'description': FieldInfo(annotation=str, required=True), 'duration_ms': FieldInfo(annotation=int, required=True), 'episode': FieldInfo(annotation=Literal[True], required=True), 'explicit': FieldInfo(annotation=bool, required=True), 'external_urls': FieldInfo(annotation=dict, required=True), 'href': FieldInfo(annotation=str, required=True), 'html_description': FieldInfo(annotation=str, required=True), 'id': FieldInfo(annotation=str, required=True), 'images': FieldInfo(annotation=List[Image], required=True), 'is_externally_hosted': FieldInfo(annotation=bool, required=True), 'is_playable': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'language': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'languages': FieldInfo(annotation=List[str], required=True), 'name': FieldInfo(annotation=str, required=True), 'release_date': FieldInfo(annotation=str, required=True), 'release_date_precision': FieldInfo(annotation=ReleaseDatePrecision, required=True), 'restrictions': FieldInfo(annotation=Union[Restrictions, NoneType], required=False, default=None), 'resume_point': FieldInfo(annotation=Union[ResumePoint, NoneType], required=False, default=None), 'show': FieldInfo(annotation=SimpleShow, required=True), 'track': FieldInfo(annotation=Literal[False], required=True), 'type': FieldInfo(annotation=str, required=True), 'uri': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
Local items
Some playlists contain locally stored tracks. They contain mostly None values along with empty lists and dictionaries.
- class tekore.model.LocalPlaylistTrack(*, id, href, name, type, uri, album, artists, available_markets=None, disc_number, duration_ms, explicit, external_ids, external_urls, is_local, popularity, preview_url, track_number, episode=False, track=True)
Bases:
LocalTrack
Local track on a playlist.
Provides
episode
andtrack
booleans to easily determine the type of playlist item.- Parameters:
id (None) –
href (None) –
name (str) –
type (str) –
uri (str) –
album (LocalAlbum) –
artists (List[LocalArtist]) –
available_markets (List[None]) –
disc_number (int) –
duration_ms (int | dict) –
explicit (bool) –
external_ids (dict) –
external_urls (dict) –
is_local (Literal[True]) –
popularity (int) –
preview_url (None) –
track_number (int) –
episode (Literal[False]) –
track (Literal[True]) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'album': FieldInfo(annotation=LocalAlbum, required=True), 'artists': FieldInfo(annotation=List[LocalArtist], required=True), 'available_markets': FieldInfo(annotation=List[NoneType], required=False, default_factory=list), 'disc_number': FieldInfo(annotation=int, required=True), 'duration_ms': FieldInfo(annotation=Union[int, dict], required=True), 'episode': FieldInfo(annotation=Literal[False], required=False, default=False), 'explicit': FieldInfo(annotation=bool, required=True), 'external_ids': FieldInfo(annotation=dict, required=True), 'external_urls': FieldInfo(annotation=dict, required=True), 'href': FieldInfo(annotation=NoneType, required=True), 'id': FieldInfo(annotation=NoneType, required=True), 'is_local': FieldInfo(annotation=Literal[True], required=True), 'name': FieldInfo(annotation=str, required=True), 'popularity': FieldInfo(annotation=int, required=True), 'preview_url': FieldInfo(annotation=NoneType, required=True), 'track': FieldInfo(annotation=Literal[True], required=False, default=True), 'track_number': FieldInfo(annotation=int, required=True), 'type': FieldInfo(annotation=str, required=True), 'uri': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.LocalItem(*, id, href, name, type, uri)
Bases:
Model
Base for local items.
- Parameters:
id (None) –
href (None) –
name (str) –
type (str) –
uri (None) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'href': FieldInfo(annotation=NoneType, required=True), 'id': FieldInfo(annotation=NoneType, required=True), 'name': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=str, required=True), 'uri': FieldInfo(annotation=NoneType, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.LocalAlbum(*, id, href, name, type, uri, album_type, artists, available_markets=None, external_urls, images, release_date, release_date_precision)
Bases:
LocalItem
Album of a locally saved track.
- Parameters:
id (None) –
href (None) –
name (str) –
type (str) –
uri (None) –
album_type (None) –
artists (List[None]) –
available_markets (List[None]) –
external_urls (dict) –
images (List[None]) –
release_date (None) –
release_date_precision (None) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'album_type': FieldInfo(annotation=NoneType, required=True), 'artists': FieldInfo(annotation=List[NoneType], required=True), 'available_markets': FieldInfo(annotation=List[NoneType], required=False, default_factory=list), 'external_urls': FieldInfo(annotation=dict, required=True), 'href': FieldInfo(annotation=NoneType, required=True), 'id': FieldInfo(annotation=NoneType, required=True), 'images': FieldInfo(annotation=List[NoneType], required=True), 'name': FieldInfo(annotation=str, required=True), 'release_date': FieldInfo(annotation=NoneType, required=True), 'release_date_precision': FieldInfo(annotation=NoneType, required=True), 'type': FieldInfo(annotation=str, required=True), 'uri': FieldInfo(annotation=NoneType, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.LocalArtist(*, id, href, name, type, uri, external_urls)
Bases:
LocalItem
Artist of a locally saved track.
- Parameters:
id (None) –
href (None) –
name (str) –
type (str) –
uri (None) –
external_urls (dict) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'external_urls': FieldInfo(annotation=dict, required=True), 'href': FieldInfo(annotation=NoneType, required=True), 'id': FieldInfo(annotation=NoneType, required=True), 'name': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=str, required=True), 'uri': FieldInfo(annotation=NoneType, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.LocalTrack(*, id, href, name, type, uri, album, artists, available_markets=None, disc_number, duration_ms, explicit, external_ids, external_urls, is_local, popularity, preview_url, track_number)
Bases:
LocalItem
Locally saved track.
Locally saved track where most attributes are always None, empty, zero or False.
duration_ms
being an object is undocumented.- Parameters:
id (None) –
href (None) –
name (str) –
type (str) –
uri (str) –
album (LocalAlbum) –
artists (List[LocalArtist]) –
available_markets (List[None]) –
disc_number (int) –
duration_ms (int | dict) –
explicit (bool) –
external_ids (dict) –
external_urls (dict) –
is_local (Literal[True]) –
popularity (int) –
preview_url (None) –
track_number (int) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'album': FieldInfo(annotation=LocalAlbum, required=True), 'artists': FieldInfo(annotation=List[LocalArtist], required=True), 'available_markets': FieldInfo(annotation=List[NoneType], required=False, default_factory=list), 'disc_number': FieldInfo(annotation=int, required=True), 'duration_ms': FieldInfo(annotation=Union[int, dict], required=True), 'explicit': FieldInfo(annotation=bool, required=True), 'external_ids': FieldInfo(annotation=dict, required=True), 'external_urls': FieldInfo(annotation=dict, required=True), 'href': FieldInfo(annotation=NoneType, required=True), 'id': FieldInfo(annotation=NoneType, required=True), 'is_local': FieldInfo(annotation=Literal[True], required=True), 'name': FieldInfo(annotation=str, required=True), 'popularity': FieldInfo(annotation=int, required=True), 'preview_url': FieldInfo(annotation=NoneType, required=True), 'track_number': FieldInfo(annotation=int, required=True), 'type': FieldInfo(annotation=str, required=True), 'uri': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
Recommendation
Track recommendations. |
|
Recommendation seeds. |
|
Attributes available in recommendations. |
- class tekore.model.Recommendations(*, seeds, tracks)
Bases:
Model
Track recommendations.
- Parameters:
seeds (List[RecommendationSeed]) –
tracks (List[FullTrack]) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'seeds': FieldInfo(annotation=List[RecommendationSeed], required=True), 'tracks': FieldInfo(annotation=List[FullTrack], required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.RecommendationSeed(*, id, afterFilteringSize, afterRelinkingSize, href, initialPoolSize, type)
Bases:
Identifiable
Recommendation seeds.
- Parameters:
id (str) –
afterFilteringSize (int) –
afterRelinkingSize (int) –
href (str | None) –
initialPoolSize (int) –
type (str) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'afterFilteringSize': FieldInfo(annotation=int, required=True), 'afterRelinkingSize': FieldInfo(annotation=int, required=True), 'href': FieldInfo(annotation=Union[str, NoneType], required=True), 'id': FieldInfo(annotation=str, required=True), 'initialPoolSize': FieldInfo(annotation=int, required=True), 'type': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.RecommendationAttribute(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
StrEnum
Attributes available in recommendations.
- acousticness = 'acousticness'
- danceability = 'danceability'
- duration_ms = 'duration_ms'
- energy = 'energy'
- instrumentalness = 'instrumentalness'
- key = 'key'
- liveness = 'liveness'
- loudness = 'loudness'
- mode = 'mode'
- popularity = 'popularity'
- speechiness = 'speechiness'
- tempo = 'tempo'
- time_signature = 'time_signature'
- valence = 'valence'
Show
Show base. |
|
Simplified show object. |
|
Paging of simplified shows. |
|
Complete show object. |
|
Show saved in library. |
|
Paging of shows in library. |
- class tekore.model.Show(*, id, href, type, uri, available_markets=None, copyrights, description, explicit, external_urls, html_description=None, images, is_externally_hosted, languages, media_type, name, publisher, total_episodes=None)
Bases:
Item
Show base.
publisher
being an object is undocumented.- Parameters:
id (str) –
href (str) –
type (str) –
uri (str) –
available_markets (List[str]) –
copyrights (List[Copyright]) –
description (str) –
explicit (bool) –
external_urls (dict) –
html_description (str | None) –
images (List[Image]) –
is_externally_hosted (bool | None) –
languages (List[str]) –
media_type (str) –
name (str) –
publisher (str | dict) –
total_episodes (int | None) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'available_markets': FieldInfo(annotation=List[str], required=False, default_factory=list), 'copyrights': FieldInfo(annotation=List[Copyright], required=True), 'description': FieldInfo(annotation=str, required=True), 'explicit': FieldInfo(annotation=bool, required=True), 'external_urls': FieldInfo(annotation=dict, required=True), 'href': FieldInfo(annotation=str, required=True), 'html_description': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'id': FieldInfo(annotation=str, required=True), 'images': FieldInfo(annotation=List[Image], required=True), 'is_externally_hosted': FieldInfo(annotation=Union[bool, NoneType], required=True), 'languages': FieldInfo(annotation=List[str], required=True), 'media_type': FieldInfo(annotation=str, required=True), 'name': FieldInfo(annotation=str, required=True), 'publisher': FieldInfo(annotation=Union[str, dict], required=True), 'total_episodes': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'type': FieldInfo(annotation=str, required=True), 'uri': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.SimpleShow(*, id, href, type, uri, available_markets=None, copyrights, description, explicit, external_urls, html_description=None, images, is_externally_hosted, languages, media_type, name, publisher, total_episodes=None)
Bases:
Show
Simplified show object.
total_episodes
is undocumented by Spotify, so it might be missing or removed in a future version.- Parameters:
id (str) –
href (str) –
type (str) –
uri (str) –
available_markets (List[str]) –
copyrights (List[Copyright]) –
description (str) –
explicit (bool) –
external_urls (dict) –
html_description (str | None) –
images (List[Image]) –
is_externally_hosted (bool | None) –
languages (List[str]) –
media_type (str) –
name (str) –
publisher (str | dict) –
total_episodes (int | None) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'available_markets': FieldInfo(annotation=List[str], required=False, default_factory=list), 'copyrights': FieldInfo(annotation=List[Copyright], required=True), 'description': FieldInfo(annotation=str, required=True), 'explicit': FieldInfo(annotation=bool, required=True), 'external_urls': FieldInfo(annotation=dict, required=True), 'href': FieldInfo(annotation=str, required=True), 'html_description': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'id': FieldInfo(annotation=str, required=True), 'images': FieldInfo(annotation=List[Image], required=True), 'is_externally_hosted': FieldInfo(annotation=Union[bool, NoneType], required=True), 'languages': FieldInfo(annotation=List[str], required=True), 'media_type': FieldInfo(annotation=str, required=True), 'name': FieldInfo(annotation=str, required=True), 'publisher': FieldInfo(annotation=Union[str, dict], required=True), 'total_episodes': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'type': FieldInfo(annotation=str, required=True), 'uri': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.SimpleShowPaging(*, href, items, limit, next, total, offset, previous)
Bases:
OffsetPaging
Paging of simplified shows.
- Parameters:
href (str) –
items (List[SimpleShow]) –
limit (int) –
next (str | None) –
total (int) –
offset (int) –
previous (str | None) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'href': FieldInfo(annotation=str, required=True), 'items': FieldInfo(annotation=List[SimpleShow], required=True), 'limit': FieldInfo(annotation=int, required=True), 'next': FieldInfo(annotation=Union[str, NoneType], required=True), 'offset': FieldInfo(annotation=int, required=True), 'previous': FieldInfo(annotation=Union[str, NoneType], required=True), 'total': FieldInfo(annotation=int, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.FullShow(*, id, href, type, uri, available_markets=None, copyrights, description, explicit, external_urls, html_description=None, images, is_externally_hosted, languages, media_type, name, publisher, total_episodes=None, episodes=None)
Bases:
Show
Complete show object.
total_episodes
is undocumented by Spotify, so it might be missing or removed in a future version.- Parameters:
id (str) –
href (str) –
type (str) –
uri (str) –
available_markets (List[str]) –
copyrights (List[Copyright]) –
description (str) –
explicit (bool) –
external_urls (dict) –
html_description (str | None) –
images (List[Image]) –
is_externally_hosted (bool | None) –
languages (List[str]) –
media_type (str) –
name (str) –
publisher (str | dict) –
total_episodes (int | None) –
episodes (SimpleEpisodePaging | None) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'available_markets': FieldInfo(annotation=List[str], required=False, default_factory=list), 'copyrights': FieldInfo(annotation=List[Copyright], required=True), 'description': FieldInfo(annotation=str, required=True), 'episodes': FieldInfo(annotation=Union[SimpleEpisodePaging, NoneType], required=False, default=None), 'explicit': FieldInfo(annotation=bool, required=True), 'external_urls': FieldInfo(annotation=dict, required=True), 'href': FieldInfo(annotation=str, required=True), 'html_description': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'id': FieldInfo(annotation=str, required=True), 'images': FieldInfo(annotation=List[Image], required=True), 'is_externally_hosted': FieldInfo(annotation=Union[bool, NoneType], required=True), 'languages': FieldInfo(annotation=List[str], required=True), 'media_type': FieldInfo(annotation=str, required=True), 'name': FieldInfo(annotation=str, required=True), 'publisher': FieldInfo(annotation=Union[str, dict], required=True), 'total_episodes': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'type': FieldInfo(annotation=str, required=True), 'uri': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.SavedShow(*, added_at, show)
Bases:
Model
Show saved in library.
- Parameters:
added_at (datetime) –
show (SimpleShow) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'added_at': FieldInfo(annotation=datetime, required=True), 'show': FieldInfo(annotation=SimpleShow, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.SavedShowPaging(*, href, items, limit, next, total, offset, previous)
Bases:
OffsetPaging
Paging of shows in library.
- Parameters:
href (str) –
items (List[SavedShow]) –
limit (int) –
next (str | None) –
total (int) –
offset (int) –
previous (str | None) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'href': FieldInfo(annotation=str, required=True), 'items': FieldInfo(annotation=List[SavedShow], required=True), 'limit': FieldInfo(annotation=int, required=True), 'next': FieldInfo(annotation=Union[str, NoneType], required=True), 'offset': FieldInfo(annotation=int, required=True), 'previous': FieldInfo(annotation=Union[str, NoneType], required=True), 'total': FieldInfo(annotation=int, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
Track
Track base. |
|
Simplified track object. |
|
Paging of simplified tracks. |
|
Complete track object. |
|
Paging of full tracks. |
|
Track saved to library. |
|
Paging of tracks in library. |
|
Minimal representation of playlist tracks. |
|
Relinked track. |
|
Restrictions on relinked resource. |
|
Track audio analysis. |
|
Generic representation of an interval. |
|
Analysis of a track's section. |
|
Analysis of a track's segment. |
|
Features of a track. |
- class tekore.model.Track(*, id, href, type, uri, artists, available_markets=None, disc_number, duration_ms, explicit, external_urls, is_local, is_playable=None, linked_from=None, name, preview_url=None, restrictions=None, track_number)
Bases:
Item
Track base.
- Parameters:
id (str) –
href (str) –
type (str) –
uri (str) –
artists (List[SimpleArtist]) –
available_markets (List[str] | None) –
disc_number (int) –
duration_ms (int) –
explicit (bool) –
external_urls (dict) –
is_local (bool) –
is_playable (bool | None) –
linked_from (TrackLink | None) –
name (str) –
preview_url (str | None) –
restrictions (Restrictions | None) –
track_number (int) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'artists': FieldInfo(annotation=List[SimpleArtist], required=True), 'available_markets': FieldInfo(annotation=Union[List[str], NoneType], required=False, default=None), 'disc_number': FieldInfo(annotation=int, required=True), 'duration_ms': FieldInfo(annotation=int, required=True), 'explicit': FieldInfo(annotation=bool, required=True), 'external_urls': FieldInfo(annotation=dict, required=True), 'href': FieldInfo(annotation=str, required=True), 'id': FieldInfo(annotation=str, required=True), 'is_local': FieldInfo(annotation=bool, required=True), 'is_playable': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'linked_from': FieldInfo(annotation=Union[TrackLink, NoneType], required=False, default=None), 'name': FieldInfo(annotation=str, required=True), 'preview_url': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'restrictions': FieldInfo(annotation=Union[Restrictions, NoneType], required=False, default=None), 'track_number': FieldInfo(annotation=int, required=True), 'type': FieldInfo(annotation=str, required=True), 'uri': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.SimpleTrack(*, id, href, type, uri, artists, available_markets=None, disc_number, duration_ms, explicit, external_urls, is_local, is_playable=None, linked_from=None, name, preview_url=None, restrictions=None, track_number)
Bases:
Track
Simplified track object.
When market is specified,
available_markets
is not available.is_playable
is not available when market is not specified.restrictions
is available if restrictions have been placed on the track, making it unplayable.- Parameters:
id (str) –
href (str) –
type (str) –
uri (str) –
artists (List[SimpleArtist]) –
available_markets (List[str] | None) –
disc_number (int) –
duration_ms (int) –
explicit (bool) –
external_urls (dict) –
is_local (bool) –
is_playable (bool | None) –
linked_from (TrackLink | None) –
name (str) –
preview_url (str | None) –
restrictions (Restrictions | None) –
track_number (int) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'artists': FieldInfo(annotation=List[SimpleArtist], required=True), 'available_markets': FieldInfo(annotation=Union[List[str], NoneType], required=False, default=None), 'disc_number': FieldInfo(annotation=int, required=True), 'duration_ms': FieldInfo(annotation=int, required=True), 'explicit': FieldInfo(annotation=bool, required=True), 'external_urls': FieldInfo(annotation=dict, required=True), 'href': FieldInfo(annotation=str, required=True), 'id': FieldInfo(annotation=str, required=True), 'is_local': FieldInfo(annotation=bool, required=True), 'is_playable': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'linked_from': FieldInfo(annotation=Union[TrackLink, NoneType], required=False, default=None), 'name': FieldInfo(annotation=str, required=True), 'preview_url': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'restrictions': FieldInfo(annotation=Union[Restrictions, NoneType], required=False, default=None), 'track_number': FieldInfo(annotation=int, required=True), 'type': FieldInfo(annotation=str, required=True), 'uri': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.SimpleTrackPaging(*, href, items, limit, next, total, offset, previous)
Bases:
OffsetPaging
Paging of simplified tracks.
- Parameters:
href (str) –
items (List[SimpleTrack]) –
limit (int) –
next (str | None) –
total (int) –
offset (int) –
previous (str | None) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'href': FieldInfo(annotation=str, required=True), 'items': FieldInfo(annotation=List[SimpleTrack], required=True), 'limit': FieldInfo(annotation=int, required=True), 'next': FieldInfo(annotation=Union[str, NoneType], required=True), 'offset': FieldInfo(annotation=int, required=True), 'previous': FieldInfo(annotation=Union[str, NoneType], required=True), 'total': FieldInfo(annotation=int, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.FullTrack(*, id, href, type, uri, artists, available_markets=None, disc_number, duration_ms, explicit, external_urls, is_local, is_playable=None, linked_from=None, name, preview_url=None, restrictions=None, track_number, album, external_ids, popularity)
Bases:
Track
Complete track object.
When market is specified,
available_markets
is not available.is_playable
is not available when market is not specified.restrictions
is available if restrictions have been placed on the track, making it unplayable.- Parameters:
id (str) –
href (str) –
type (str) –
uri (str) –
artists (List[SimpleArtist]) –
available_markets (List[str] | None) –
disc_number (int) –
duration_ms (int) –
explicit (bool) –
external_urls (dict) –
is_local (bool) –
is_playable (bool | None) –
linked_from (TrackLink | None) –
name (str) –
preview_url (str | None) –
restrictions (Restrictions | None) –
track_number (int) –
album (SimpleAlbum) –
external_ids (dict) –
popularity (int) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'album': FieldInfo(annotation=SimpleAlbum, required=True), 'artists': FieldInfo(annotation=List[SimpleArtist], required=True), 'available_markets': FieldInfo(annotation=Union[List[str], NoneType], required=False, default=None), 'disc_number': FieldInfo(annotation=int, required=True), 'duration_ms': FieldInfo(annotation=int, required=True), 'explicit': FieldInfo(annotation=bool, required=True), 'external_ids': FieldInfo(annotation=dict, required=True), 'external_urls': FieldInfo(annotation=dict, required=True), 'href': FieldInfo(annotation=str, required=True), 'id': FieldInfo(annotation=str, required=True), 'is_local': FieldInfo(annotation=bool, required=True), 'is_playable': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'linked_from': FieldInfo(annotation=Union[TrackLink, NoneType], required=False, default=None), 'name': FieldInfo(annotation=str, required=True), 'popularity': FieldInfo(annotation=int, required=True), 'preview_url': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'restrictions': FieldInfo(annotation=Union[Restrictions, NoneType], required=False, default=None), 'track_number': FieldInfo(annotation=int, required=True), 'type': FieldInfo(annotation=str, required=True), 'uri': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.FullTrackPaging(*, href, items, limit, next, total, offset, previous)
Bases:
OffsetPaging
Paging of full tracks.
- Parameters:
href (str) –
items (List[FullTrack]) –
limit (int) –
next (str | None) –
total (int) –
offset (int) –
previous (str | None) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'href': FieldInfo(annotation=str, required=True), 'items': FieldInfo(annotation=List[FullTrack], required=True), 'limit': FieldInfo(annotation=int, required=True), 'next': FieldInfo(annotation=Union[str, NoneType], required=True), 'offset': FieldInfo(annotation=int, required=True), 'previous': FieldInfo(annotation=Union[str, NoneType], required=True), 'total': FieldInfo(annotation=int, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.SavedTrack(*, added_at, track)
Bases:
Model
Track saved to library.
- Parameters:
added_at (datetime) –
track (FullTrack) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'added_at': FieldInfo(annotation=datetime, required=True), 'track': FieldInfo(annotation=FullTrack, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.SavedTrackPaging(*, href, items, limit, next, total, offset, previous)
Bases:
OffsetPaging
Paging of tracks in library.
- Parameters:
href (str) –
items (List[SavedTrack]) –
limit (int) –
next (str | None) –
total (int) –
offset (int) –
previous (str | None) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'href': FieldInfo(annotation=str, required=True), 'items': FieldInfo(annotation=List[SavedTrack], required=True), 'limit': FieldInfo(annotation=int, required=True), 'next': FieldInfo(annotation=Union[str, NoneType], required=True), 'offset': FieldInfo(annotation=int, required=True), 'previous': FieldInfo(annotation=Union[str, NoneType], required=True), 'total': FieldInfo(annotation=int, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.Tracks(*, href, total)
Bases:
Model
Minimal representation of playlist tracks.
- Parameters:
href (str) –
total (int) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'href': FieldInfo(annotation=str, required=True), 'total': FieldInfo(annotation=int, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.TrackLink(*, id, href, type, uri, external_urls)
Bases:
Item
Relinked track.
- Parameters:
id (str) –
href (str) –
type (str) –
uri (str) –
external_urls (dict) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'external_urls': FieldInfo(annotation=dict, required=True), 'href': FieldInfo(annotation=str, required=True), 'id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=str, required=True), 'uri': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.Restrictions(*, reason)
Bases:
Model
Restrictions on relinked resource.
- Parameters:
reason (str) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'reason': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
Audio analysis
- class tekore.model.AudioAnalysis(*, bars, beats, sections, segments, tatums, meta, track)
Bases:
Model
Track audio analysis.
See the Web API documentation for more details.
- Parameters:
bars (List[TimeInterval]) –
beats (List[TimeInterval]) –
sections (List[Section]) –
segments (List[Segment]) –
tatums (List[TimeInterval]) –
meta (dict) –
track (dict) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'bars': FieldInfo(annotation=List[TimeInterval], required=True), 'beats': FieldInfo(annotation=List[TimeInterval], required=True), 'meta': FieldInfo(annotation=dict, required=True), 'sections': FieldInfo(annotation=List[Section], required=True), 'segments': FieldInfo(annotation=List[Segment], required=True), 'tatums': FieldInfo(annotation=List[TimeInterval], required=True), 'track': FieldInfo(annotation=dict, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.TimeInterval(*, duration, start=None, confidence=None)
Bases:
Model
Generic representation of an interval.
Attributes are sometimes not available.
- Parameters:
duration (float) –
start (float | None) –
confidence (float | None) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'confidence': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'duration': FieldInfo(annotation=float, required=True), 'start': FieldInfo(annotation=Union[float, NoneType], required=False, default=None)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.Section(*, duration, loudness, tempo, tempo_confidence, key_confidence, mode_confidence, time_signature, time_signature_confidence, confidence=None, mode=None, key=None, start=None)
Bases:
Model
Analysis of a track’s section.
Attributes are sometimes not available.
- Parameters:
duration (float) –
loudness (float) –
tempo (float) –
tempo_confidence (float) –
key_confidence (float) –
mode_confidence (float) –
time_signature (int) –
time_signature_confidence (float) –
confidence (float | None) –
mode (int | None) –
key (int | None) –
start (float | None) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'confidence': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'duration': FieldInfo(annotation=float, required=True), 'key': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'key_confidence': FieldInfo(annotation=float, required=True), 'loudness': FieldInfo(annotation=float, required=True), 'mode': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'mode_confidence': FieldInfo(annotation=float, required=True), 'start': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'tempo': FieldInfo(annotation=float, required=True), 'tempo_confidence': FieldInfo(annotation=float, required=True), 'time_signature': FieldInfo(annotation=int, required=True), 'time_signature_confidence': FieldInfo(annotation=float, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.Segment(*, duration, loudness_start, loudness_max, pitches, timbre, confidence=None, loudness_end=None, loudness_max_time=None, start=None)
Bases:
Model
Analysis of a track’s segment.
Attributes are sometimes not available.
- Parameters:
duration (float) –
loudness_start (float) –
loudness_max (float) –
pitches (List[float]) –
timbre (List[float]) –
confidence (float | None) –
loudness_end (float | None) –
loudness_max_time (float | None) –
start (float | None) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'confidence': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'duration': FieldInfo(annotation=float, required=True), 'loudness_end': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'loudness_max': FieldInfo(annotation=float, required=True), 'loudness_max_time': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'loudness_start': FieldInfo(annotation=float, required=True), 'pitches': FieldInfo(annotation=List[float], required=True), 'start': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'timbre': FieldInfo(annotation=List[float], required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
Audio features
- class tekore.model.AudioFeatures(*, id, acousticness, analysis_url, danceability, duration_ms, energy, instrumentalness, key, liveness, loudness, mode, speechiness, tempo, time_signature, track_href, type, uri, valence)
Bases:
Identifiable
Features of a track.
- Parameters:
id (str) –
acousticness (float) –
analysis_url (str) –
danceability (float) –
duration_ms (int) –
energy (float) –
instrumentalness (float) –
key (int) –
liveness (float) –
loudness (float) –
mode (int) –
speechiness (float) –
tempo (float) –
time_signature (int) –
track_href (str) –
type (str) –
uri (str) –
valence (float) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'acousticness': FieldInfo(annotation=float, required=True), 'analysis_url': FieldInfo(annotation=str, required=True), 'danceability': FieldInfo(annotation=float, required=True), 'duration_ms': FieldInfo(annotation=int, required=True), 'energy': FieldInfo(annotation=float, required=True), 'id': FieldInfo(annotation=str, required=True), 'instrumentalness': FieldInfo(annotation=float, required=True), 'key': FieldInfo(annotation=int, required=True), 'liveness': FieldInfo(annotation=float, required=True), 'loudness': FieldInfo(annotation=float, required=True), 'mode': FieldInfo(annotation=int, required=True), 'speechiness': FieldInfo(annotation=float, required=True), 'tempo': FieldInfo(annotation=float, required=True), 'time_signature': FieldInfo(annotation=int, required=True), 'track_href': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=str, required=True), 'uri': FieldInfo(annotation=str, required=True), 'valence': FieldInfo(annotation=float, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
User
User base. |
|
User as viewable by anyone. |
|
User with private information. |
|
Explicit content filter of a user. |
- class tekore.model.User(*, id, href, type, uri, external_urls, display_name=None, followers=None, images=None)
Bases:
Item
User base.
display_name
,followers
andimages
may not be available.- Parameters:
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'display_name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'external_urls': FieldInfo(annotation=dict, required=True), 'followers': FieldInfo(annotation=Union[Followers, NoneType], required=False, default=None), 'href': FieldInfo(annotation=str, required=True), 'id': FieldInfo(annotation=str, required=True), 'images': FieldInfo(annotation=Union[List[Image], NoneType], required=False, default=None), 'type': FieldInfo(annotation=str, required=True), 'uri': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.PublicUser(*, id, href, type, uri, external_urls, display_name=None, followers=None, images=None)
Bases:
User
User as viewable by anyone.
- Parameters:
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'display_name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'external_urls': FieldInfo(annotation=dict, required=True), 'followers': FieldInfo(annotation=Union[Followers, NoneType], required=False, default=None), 'href': FieldInfo(annotation=str, required=True), 'id': FieldInfo(annotation=str, required=True), 'images': FieldInfo(annotation=Union[List[Image], NoneType], required=False, default=None), 'type': FieldInfo(annotation=str, required=True), 'uri': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.PrivateUser(*, id, href, type, uri, external_urls, display_name=None, followers=None, images=None, country=None, email=None, explicit_content=None, product=None, birthday=None)
Bases:
User
User with private information.
country
,explicit_content
andproduct
require theuser-read-private
scope.email
requires theuser-read-email
scope.birthday
is unavailable unless the now-invaliduser-read-birthdate
scope was granted to the token.- Parameters:
id (str) –
href (str) –
type (str) –
uri (str) –
external_urls (dict) –
display_name (str | None) –
followers (Followers | None) –
images (List[Image] | None) –
country (str | None) –
email (str | None) –
explicit_content (ExplicitContent | None) –
product (str | None) –
birthday (str | None) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'birthday': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'country': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'display_name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'email': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'explicit_content': FieldInfo(annotation=Union[ExplicitContent, NoneType], required=False, default=None), 'external_urls': FieldInfo(annotation=dict, required=True), 'followers': FieldInfo(annotation=Union[Followers, NoneType], required=False, default=None), 'href': FieldInfo(annotation=str, required=True), 'id': FieldInfo(annotation=str, required=True), 'images': FieldInfo(annotation=Union[List[Image], NoneType], required=False, default=None), 'product': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'type': FieldInfo(annotation=str, required=True), 'uri': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.ExplicitContent(*, filter_enabled, filter_locked)
Bases:
Model
Explicit content filter of a user.
- Parameters:
filter_enabled (bool) –
filter_locked (bool) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'filter_enabled': FieldInfo(annotation=bool, required=True), 'filter_locked': FieldInfo(annotation=bool, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
Miscellaneous
Copyright. |
|
Followers. |
|
Image link and information. |
|
Precision of a release date. |
- class tekore.model.Copyright(*, text, type)
Bases:
Model
Copyright.
- Parameters:
text (str) –
type (str) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'text': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.Followers(*, href, total)
Bases:
Model
Followers.
href
is alwaysNone
.- Parameters:
href (None) –
total (int) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'href': FieldInfo(annotation=NoneType, required=True), 'total': FieldInfo(annotation=int, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.Image(*, url, height, width)
Bases:
Model
Image link and information.
The Web API documentation reports that
height
andwidth
can beNone
or not available in the response.- Parameters:
url (str) –
height (int | None) –
width (int | None) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'height': FieldInfo(annotation=Union[int, NoneType], required=True), 'url': FieldInfo(annotation=str, required=True), 'width': FieldInfo(annotation=Union[int, NoneType], required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
Model bases
Response model base. |
|
The response model contains an unknown attribute. |
|
Object identified with a Spotify ID. |
|
Identifiable with additional fields. |
|
Paging base. |
|
Offset paging base. |
|
Data cursor. |
|
Cursor paging base. |
Functionality
- class tekore.model.Model
Bases:
BaseModel
Response model base.
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.UnknownModelAttributeWarning
Bases:
RuntimeWarning
The response model contains an unknown attribute.
Models
- class tekore.model.Identifiable(*, id)
Bases:
Model
Object identified with a Spotify ID.
- Parameters:
id (str) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'id': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.Item(*, id, href, type, uri)
Bases:
Identifiable
Identifiable with additional fields.
- Parameters:
id (str) –
href (str) –
type (str) –
uri (str) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'href': FieldInfo(annotation=str, required=True), 'id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=str, required=True), 'uri': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.Paging(*, href, items, limit, next)
Bases:
Model
Paging base.
- Parameters:
href (str) –
items (Sequence[Model]) –
limit (int) –
next (str | None) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'href': FieldInfo(annotation=str, required=True), 'items': FieldInfo(annotation=Sequence[Model], required=True), 'limit': FieldInfo(annotation=int, required=True), 'next': FieldInfo(annotation=Union[str, NoneType], required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.OffsetPaging(*, href, items, limit, next, total, offset, previous)
Bases:
Paging
Offset paging base.
Paging that can be navigated both forward and back.
- Parameters:
href (str) –
items (Sequence[Model]) –
limit (int) –
next (str | None) –
total (int) –
offset (int) –
previous (str | None) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'href': FieldInfo(annotation=str, required=True), 'items': FieldInfo(annotation=Sequence[Model], required=True), 'limit': FieldInfo(annotation=int, required=True), 'next': FieldInfo(annotation=Union[str, NoneType], required=True), 'offset': FieldInfo(annotation=int, required=True), 'previous': FieldInfo(annotation=Union[str, NoneType], required=True), 'total': FieldInfo(annotation=int, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.Cursor(*, after)
Bases:
Model
Data cursor.
- Parameters:
after (str | None) –
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'after': FieldInfo(annotation=Union[str, NoneType], required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class tekore.model.CursorPaging(*, href, items, limit, next, cursors)
Bases:
Paging
Cursor paging base.
Paging that can be navigated only forward following the cursor.
- Parameters:
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'cursors': FieldInfo(annotation=Cursor, required=True), 'href': FieldInfo(annotation=str, required=True), 'items': FieldInfo(annotation=Sequence[Model], required=True), 'limit': FieldInfo(annotation=int, required=True), 'next': FieldInfo(annotation=Union[str, NoneType], required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
Member types
- class tekore.model.StrEnum(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
str
,Enum
Convert enumeration members to strings using their name.
Ignores case when getting items. This does not change values.