Skip to content

Types

TypedDict hints for every object — verified against live API responses. The client returns plain dicts; these exist for typing, autocompletion, and docs.

deezify.types

Typed hints for every Deezer API object.

Field coverage below was verified against live https://api.deezer.com responses (not just the docs tables), so nested shapes — e.g. the artist inside a :class:Track, or the per-kind sub-lists of :class:Chart — match what the API actually returns.

Runtime behavior is unchanged: the client returns plain dict objects (and :class:~deezify.paginator.PaginatedList for collections). These TypedDict classes exist for static typing, IDE autocompletion and documentation. Every class has total=False because the API only ever returns a subset of fields depending on context (a track inside an album carries fewer keys than a full track.get()).

Generic aliases at the bottom describe the shapes of paginated envelopes and write-action results:

  • PaginatedTracks etc. — what client.*.<connection>() items look like once iterated (each item is the corresponding object type).
  • ChartBundle — the dict returned by client.chart.get().

Contributor

Bases: _Entity

An artist contributor entry (track.contributors[]).

Source code in deezify/types.py
44
45
46
47
48
49
50
51
52
53
54
55
56
57
class Contributor(_Entity):
    """An artist contributor entry (``track.contributors[]``)."""

    name: str
    link: str
    share: str
    picture: str
    picture_small: str
    picture_medium: str
    picture_big: str
    picture_xl: str
    radio: bool
    tracklist: str
    role: str

GenreRef

Bases: _Entity

Genre entry inside album.genres.data[].

Source code in deezify/types.py
60
61
62
63
64
class GenreRef(_Entity):
    """Genre entry inside ``album.genres.data[]``."""

    name: str
    picture: str

ArtistRef

Bases: _Entity

Compact artist nested in tracks/albums/charts.

Source code in deezify/types.py
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
class ArtistRef(_Entity):
    """Compact artist nested in tracks/albums/charts."""

    name: str
    link: str
    share: str
    picture: str
    picture_small: str
    picture_medium: str
    picture_big: str
    picture_xl: str
    nb_album: int
    nb_fan: int
    radio: bool
    tracklist: str
    role: str

Artist

Bases: ArtistRef

Full artist object (GET /artist/{id}).

Source code in deezify/types.py
95
96
class Artist(ArtistRef):
    """Full artist object (``GET /artist/{id}``)."""

AlbumRef

Bases: _Entity

Compact album nested in tracks/charts.

Source code in deezify/types.py
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
class AlbumRef(_Entity):
    """Compact album nested in tracks/charts."""

    title: str
    upc: str
    link: str
    cover: str
    cover_small: str
    cover_medium: str
    cover_big: str
    cover_xl: str
    md5_image: str
    genre_id: int
    release_date: str
    tracklist: str

AlbumTrack

Bases: _Entity

Track entry inside album.tracks.data[] / playlist listings.

Source code in deezify/types.py
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
class AlbumTrack(_Entity):
    """Track entry inside ``album.tracks.data[]`` / playlist listings."""

    readable: bool
    title: str
    title_short: str
    title_version: str
    isrc: str
    link: str
    duration: int
    rank: int
    explicit_lyrics: bool
    explicit_content_lyrics: int
    explicit_content_cover: int
    preview: str
    md5_image: str
    time_add: str
    artist: ArtistRef
    album: AlbumRef

Album

Bases: AlbumRef

Full album object (GET /album/{id}).

Source code in deezify/types.py
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
class Album(AlbumRef):
    """Full album object (``GET /album/{id}``)."""

    share: str
    genres: GenresEnvelope
    label: str
    provider: str
    nb_tracks: int
    duration: int
    fans: int
    record_type: str
    available: bool
    alternative: AlbumRef
    explicit_lyrics: bool
    explicit_content_lyrics: int
    explicit_content_cover: int
    contributors: list[Contributor]
    fallback: dict[str, Any]
    artist: ArtistRef
    tracks: AlbumTracksEnvelope

Track

Bases: _Entity

Full track object (GET /track/{id}).

Source code in deezify/types.py
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
class Track(_Entity):
    """Full track object (``GET /track/{id}``)."""

    readable: bool
    title: str
    title_short: str
    title_version: str
    unseen: bool
    isrc: str
    link: str
    share: str
    duration: int
    track_position: int
    disk_number: int
    rank: int
    release_date: str
    explicit_lyrics: bool
    explicit_content_lyrics: int
    explicit_content_cover: int
    preview: str
    bpm: float
    gain: float
    available_countries: list[str]
    alternative: Track
    contributors: list[Contributor]
    md5_image: str
    track_token: str
    time_add: str
    position: int
    artist: ArtistRef
    album: AlbumRef

ChartTrack

Bases: Track

Track entry inside chart listings (adds position).

Source code in deezify/types.py
207
208
209
210
class ChartTrack(Track, total=False):
    """Track entry inside chart listings (adds ``position``)."""

    position: int

CreatorRef

Bases: _Entity

Playlist creator (playlist.creator).

Source code in deezify/types.py
218
219
220
221
222
class CreatorRef(_Entity):
    """Playlist creator (``playlist.creator``)."""

    name: str
    tracklist: str

PlaylistRef

Bases: _Entity

Compact playlist nested in charts / user listings.

Source code in deezify/types.py
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
class PlaylistRef(_Entity):
    """Compact playlist nested in charts / user listings."""

    title: str
    description: str
    duration: int
    public: bool
    is_loved_track: bool
    collaborative: bool
    nb_tracks: int
    unseen_track_count: int
    fans: int
    link: str
    share: str
    picture: str
    picture_small: str
    picture_medium: str
    picture_big: str
    picture_xl: str
    checksum: str
    position: int
    creator: CreatorRef
    user: UserRef  # noqa: F821 - defined below; resolved lazily

Playlist

Bases: PlaylistRef

Full playlist object (GET /playlist/{id}).

Source code in deezify/types.py
250
251
252
253
254
255
256
257
258
259
class Playlist(PlaylistRef):
    """Full playlist object (``GET /playlist/{id}``)."""

    tracklist: str
    creation_date: str
    add_date: str
    mod_date: str
    md5_image: str
    picture_type: str
    tracks: AlbumTracksEnvelope

UserRef

Bases: _Entity

Public user nested in fans/creators (GET /user/{id} unauthenticated).

Source code in deezify/types.py
267
268
269
270
271
272
273
274
275
276
277
278
279
280
class UserRef(_Entity):
    """Public user nested in fans/creators (``GET /user/{id}`` unauthenticated)."""

    name: str
    lastname: str
    firstname: str
    link: str
    picture: str
    picture_small: str
    picture_medium: str
    picture_big: str
    picture_xl: str
    country: str
    tracklist: str

User

Bases: UserRef

Full user object (extra fields need an access token).

Source code in deezify/types.py
283
284
285
286
287
288
289
290
291
292
293
294
class User(UserRef):
    """Full user object (extra fields need an access token)."""

    email: str
    status: int
    birthday: str
    inscription_date: str
    gender: str
    lang: str
    is_kid: bool
    explicit_content_level: str
    explicit_content_levels_available: list[str]

PodcastRef

Bases: _Entity

Compact podcast nested in charts / episode payloads.

Source code in deezify/types.py
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
class PodcastRef(_Entity):
    """Compact podcast nested in charts / episode payloads."""

    title: str
    description: str
    available: bool
    fans: int
    link: str
    share: str
    picture: str
    picture_small: str
    picture_medium: str
    picture_big: str
    picture_xl: str
    position: int

Podcast

Bases: PodcastRef

Full podcast object (GET /podcast/{id}).

Source code in deezify/types.py
323
324
class Podcast(PodcastRef):
    """Full podcast object (``GET /podcast/{id}``)."""

EpisodeRef

Bases: _Entity

Compact episode inside podcast.episodes listings.

Source code in deezify/types.py
327
328
329
330
331
332
333
334
335
336
337
class EpisodeRef(_Entity):
    """Compact episode inside ``podcast.episodes`` listings."""

    title: str
    release_date: str
    duration: int
    picture: str
    picture_small: str
    picture_medium: str
    picture_big: str
    picture_xl: str

Episode

Bases: EpisodeRef

Full episode object (GET /episode/{id}).

Source code in deezify/types.py
340
341
342
343
344
345
346
347
348
349
class Episode(EpisodeRef):
    """Full episode object (``GET /episode/{id}``)."""

    description: str
    available: bool
    link: str
    share: str
    picture: str
    track_token: str
    podcast: PodcastRef

Radio

Bases: _Entity

Radio object (GET /radio / GET /radio/{id}).

Source code in deezify/types.py
362
363
364
365
366
367
368
369
370
371
372
373
374
class Radio(_Entity):
    """Radio object (``GET /radio`` / ``GET /radio/{id}``)."""

    title: str
    description: str
    share: str
    picture: str
    picture_small: str
    picture_medium: str
    picture_big: str
    picture_xl: str
    tracklist: str
    md5_image: str

Genre

Bases: _Entity

Genre object (GET /genre / GET /genre/{id}).

Source code in deezify/types.py
377
378
379
380
381
382
383
384
385
class Genre(_Entity):
    """Genre object (``GET /genre`` / ``GET /genre/{id}``)."""

    name: str
    picture: str
    picture_small: str
    picture_medium: str
    picture_big: str
    picture_xl: str

Editorial

Bases: _Entity

Editorial object (GET /editorial).

Source code in deezify/types.py
388
389
390
391
392
393
394
395
396
class Editorial(_Entity):
    """Editorial object (``GET /editorial``)."""

    name: str
    picture: str
    picture_small: str
    picture_medium: str
    picture_big: str
    picture_xl: str

Chart

Bases: TypedDict

Bundle returned by GET /chart and GET /chart/{genre_id}.

Source code in deezify/types.py
429
430
431
432
433
434
435
436
class Chart(TypedDict, total=False):
    """Bundle returned by ``GET /chart`` and ``GET /chart/{genre_id}``."""

    tracks: ChartTracks
    albums: ChartAlbums
    artists: ChartArtists
    playlists: ChartPlaylists
    podcasts: ChartPodcasts

EditorialCharts

Bases: TypedDict

Bundle returned by GET /editorial/{id}/charts.

Source code in deezify/types.py
439
440
441
442
443
444
445
class EditorialCharts(TypedDict, total=False):
    """Bundle returned by ``GET /editorial/{id}/charts``."""

    tracks: ChartTracks
    albums: ChartAlbums
    artists: ChartArtists
    playlists: ChartPlaylists

Infos

Bases: TypedDict

GET /infos — country/API information.

Source code in deezify/types.py
463
464
465
466
467
468
469
470
471
472
473
474
475
476
class Infos(TypedDict, total=False):
    """``GET /infos`` — country/API information."""

    country_iso: str
    country: str
    open: bool
    pop: str
    upload_token: str
    upload_token_lifetime: int
    user_token: str | None
    hosts: InfosHosts
    ads: dict[str, Any]
    has_podcasts: bool
    offers: list[Offer]

Options

Bases: TypedDict

GET /options — current-user streaming capabilities.

Source code in deezify/types.py
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
class Options(TypedDict, total=False):
    """``GET /options`` — current-user streaming capabilities."""

    streaming: bool
    streaming_duration: int
    offline: bool
    hq: bool
    ads_display: bool
    ads_audio: bool
    too_many_devices: bool
    can_subscribe: bool
    radio_skips: int
    lossless: bool
    preview: bool
    radio: bool
    type: str

OEmbed

Bases: TypedDict

GET /oembed?url=... — widget metadata.

Source code in deezify/types.py
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
class OEmbed(TypedDict, total=False):
    """``GET /oembed?url=...`` — widget metadata."""

    version: str
    type: str
    cache_age: int
    provider_name: str
    provider_url: str
    entity: str
    id: int
    url: str
    author_name: str
    title: str
    thumbnail_url: str
    thumbnail_width: int
    thumbnail_height: int
    width: int
    height: int
    html: str

CreatePlaylistResult

Bases: _Entity

Created playlist id returned by POST /user/{id}/playlists.

Source code in deezify/types.py
523
524
525
526
class CreatePlaylistResult(_Entity):
    """Created playlist id returned by ``POST /user/{id}/playlists``."""

    title: str

PaginatedEnvelope

Bases: TypedDict, Generic[T]

Raw shape of a list envelope (data/total/next/prev).

Source code in deezify/types.py
549
550
551
552
553
554
555
556
class PaginatedEnvelope(TypedDict, Generic[T], total=False):
    """Raw shape of a list envelope (``data``/``total``/``next``/``prev``)."""

    data: list[T]
    total: int
    prev: str
    next: str
    checksum: str