Release notes
6.1.1 (2026-03-10)
Deprecated
Deprecate
trackandtracksofPlaylistTrack,FullPlaylistandSimplePlaylist, as they are likely to be removed from the API in the future (#346)
Added
Add
itemanditemstoPlaylistTrack,FullPlaylistandSimplePlaylist(#346)
6.1.0 (2025-12-14)
Changed
Tooling
Address deprecations in build (#342)
6.0.0 (2024-12-11)
Changed
Added
Fixed
Avoid constructing query params manually (#332)
Fix
RetryingSenderto not returnNone`in complex retry scenarios (#333)Convert
Responseheaders to dicts inSyncSenderandAsyncSender(#339)Improve messages in
prompt_for_user_token()andprompt_for_pkce_token()(#340)
5.5.1 (2024-09-09)
Fixed
5.5.0 (2024-07-04)
Fixed
Add ugc_image_upload to required scopes of
SpotifyPlaylistModify.playlist_cover_image_upload()(#324)Make
available_marketsofShow,LocalAlbumandLocalTrackoptional (#323)
Added
Add
open_browseroption toprompt_for_user_tokenandprompt_for_pkce_token(#325)
5.4.0 (2024-02-27)
Fixed
Add
epas a valid enum toAlbumTypefor top tracks API responses (#318)Add undocumented
smart_shuffletoCurrentlyPlayingContext(#320)
Added
Support HTTPX
0.27(#317)
5.3.1 (2024-01-28)
Fixed
5.3.0 (2023-12-22)
Fixed
Make
imagesoptional inPlaylistto fix getting empty playlists without an image (#309)Make
is_playableinEpisodeoptional despite API specifications (#310)Make deprecated
languageoptional inEpisodepending removal (#310)Add undocumented
dictto types ofduration_msinLocalTrack(#310)Add undocumented
available_marketstoFullPlaylistEpisode(#310)
Added
Add
restrictionstoFullEpisode(#310)Support HTTPX
0.26(#311)Improve
UnknownModelAttributeWarningto include model name (#313)
5.2.1 (2023-11-22)
Fixed
Exclude Pydantic versions
2.5.0and2.5.1(#306)Add missing
available_marketstoFullChapter(#308)
5.2.0 (2023-11-05)
Fixed
Added
Add support for short URLs as
is_short_link()andfollow_short_link(#301)
5.1.1 (2023-10-14)
Fixed
5.1.0 (2023-10-04)
Added
Support HTTPX
0.25(#294)
Fixed
5.0.1 (2023-07-06)
Fixed
Add missing
Optionalannotations to support Pydantic 2 (#293)
5.0.0 (2023-06-18)
Tekore 5 comes with an overhauled response model system based on Pydantic. Although the underlying change is major, the primary usage of models remains unchanged. The new models are more robust and easier to maintain. However, with more careful data validation new issues may arise. Please submit them on GitHub.
Changed
Remove support for Python 3.7 (EOL) (#292)
Use Pydantic in response models (#279)
Many type hints are fixed and improved.
Instead of retaining unknown response attributes, they are now discarded. However, the same warning message is raised.
.jsonand.asbuiltinmethods are replaced by Pydantic models’.jsonand.dict.Models use the builtin
datetimeobject directly..pprintand custom__repr__are removed in favor of using Pydantic’s own machinery.The builtin list class is used everywhere instead of the old
ModelList.
4.6.1 (2023-05-25)
Fixed
4.6.0 (2023-04-12)
Added
Fixed
FullChapter/SimpleChapter- change “restriction” to “restrictions” (#286)
4.5.0 (2022-11-06)
Added
Errors - carry scope information with
Unauthorised(#276)Client - add new audiobook (Audiobook API) and chapter Chapter API endpoints and “audiobook” as a valid search type. Note that audiobooks are currently only available in the US market. The APIs also seem to be unreliable. (#277)
Client - add new get queue endpoint
playback_queue. Queue results seem inconsistent at this time. (#278)
Fixed
4.4.1 (2022-10-08)
Fixed
Handle changed response to fix paging at search limit (#275)
4.4.0 (2022-05-24)
Added
4.3.0 (2022-03-11)
Added
Dependency to HTTPX upgraded to include version
0.22.*(#267)Expose the underlying credentials manager in
RefreshingCredentialsandRefreshingTokento facilitate closing their HTTP client, which is no longer closed by default as of HTTPX version0.22(#267)
Fixed
Add missing context “collection” to
ContextTypefor playing saved tracks (#270)
4.2.0 (2022-01-19)
Added
Conversions - add
useras a valid ID type and URL-encode hashes of user IDs into_url()(#266)
Fixed
4.1.0 (2021-11-20)
4.0.0 (2021-09-09)
Tekore 4.0 is a maintenance release to prepare for the nearly deprecated Python 3.6, update dependencies and improve backwards compatibility.
Changed
Added
Improved documentation for type hints and response models (#109)
Responses can now parse unknown attributes, greatly improving backwards compatibility.
UnknownModelAttributeWarningwas introduced (#247)
3.7.1 (2021-05-04)
Fixed
Models - add missing but undocumented
html_descriptionfield toFullShowandSimpleShow(#251)Models - require the newly documented
html_descriptionfield inFullEpisodeandSimpleEpisode(#251)
3.7.0 (2021-04-08)
Added
Client - add episode endpoints to library API, and the corresponding
SavedEpisodeandSavedEpisodePagingmodels (#249)
3.6.2 (2021-03-23)
Fixed
Models - add missing but undocumented
html_descriptionfield toFullEpisodeandSimpleEpisode(#246)
3.6.1 (2021-03-07)
Fixed
Authorisation - allow missing scope in token responses and parse it to an empty
Scope(#245)
3.6.0 (2021-03-02)
Added
3.5.1 (2021-02-12)
Fixed
3.5.0 (2021-01-15)
Added
Authorisation - add
streamingandapp-remote-controlas extra scopes (#237)
Fixed
3.4.2 (2020-12-14)
Fixed
3.4.1 (2020-12-04)
Fixed
Client - document the need for at least one seed in
recommendations(#229)
3.4.0 (2020-11-24)
Added
Conversions - ignore URL parameters in
from_url()(#226)Conversions -
from_uri(),from_url()raise proper errors with entirely invalid formats, error messages were improved (#227)
Fixed
3.3.0 (2020-10-22)
Added
Configuration - warning messages for missing configuration now include the variable name which was missing (#222)
Models - improved type hints and documentation of potentially missing values (#221)
Fixed
3.2.0 (2020-10-16)
Added
Support Python 3.9 (#219)
Dependency to HTTPX upgraded to include versions
0.15.*and0.16.*(#216)Error messages for
parse_code_from_url(),parse_state_from_url()andCredentials.pkce_user_authorisation()were improved (#218)Spotifyand Senders, both synchronous and asynchronous, can now be closed directly withclose(#220)
3.1.0 (2020-09-13)
Added
Fixed
PrivateUser- a birthday attribute was added. It is not obtainable with new tokens but is returned for old tokens that have the now-invaliduser-read-birthdayscope (#52, #197)
3.0.1 (2020-09-05)
Fixed
featured_playlists- allow missing owner inPlaylistmodels (#212)
3.0.0 (2020-09-03)
The next major iteration of Tekore brings fewer breaking changes than in 2.0, but packs a number of improvements to authorisation and senders. Most notably, PKCE is now provided as an option for user authorisation and Requests is no longer used to perform web requests. HTTPX, which was already in use with async, is used exclusively instead.
Added
Authorisation - PKCE can be used in user authorisation, providing added security for public clients by removing the need to use a client secret. (#189)
UserAuth- implement user authorisation with security checks, the caller simply provides the resulting URI after redirection (#207)Senders - Tekore’s own
RequestandResponsewrappers are now used in the sender interface (#139)Classes now have a readable
repr(#191)Dependency to HTTPX upgraded to include version
0.14.*(#202)gen_state()- generate state for user authorisation (#207)parse_state_from_url()- parse state from URL parameters (#207)
Removed
Playlist API - methods for playlist tracks and
episodes_as_tracksargument ofSpotify.playlist()deprecated in 2.0 (#178, #202)Dependency to Requests dropped in favor of HTTPX (#139)
Senders -
TransientSenderandSingletonSenderalong with their asynchronous variants were removed (#139)Senders - default sender and keyword argument options were removed (#139)
Changed
Errors - web exceptions now inherit from
Exceptionrather than the underlying HTTP library’s top-level exception. They always contain the relevantRequestandResponse(#139)Senders - as the only concrete senders,
PersistentSenderandAsyncPersistentSenderare now implemented inSyncSenderandAsyncSender, respectively (#139)CachingSender- argument order is now in line withRetryingSender(#139)Senders - clients (
SpotifyandCredentials) now inherit fromExtendingSender(#139)Authorisation - raise a more descriptive error if secret is required but not provided (#210)
Fixed
2.1.3 (2020-08-04)
Fixed
Client - correctly return
ModelListwhen chunking input (#196)Authorisation - fix error handling when response does not contain an error description (#199)
playbackandplayback_currently_playing- correctly handle local tracks (#200)
2.1.2 (2020-07-21)
Fixed
FullShow- add undocumentedtotal_episodesparameter, marktotal_episodesofSimpleShowundocumented (#194)
2.1.1 (2020-07-02)
Fixed
SimpleShow- add optionaltotal_episodesparameter (#190)
2.1.0 (2020-05-31)
Added
Fixed
Errors - correctly fall back to
ClientErrorandServerErrorwhen encountering an unknown status code (#185)
2.0.0 (2020-05-27)
This release significantly improves the overall structure of the library and provides quality of life enhancements to various tasks. Most notably, submodules were removed in favor of a flat structure. Everything is now imported from the top level with the exception of Models.
Removed
Importing from submodules (#81)
OAuthErrorin Authorisation - see below for details (#154)
Deprecated
Playlist API - methods specifically for playlist tracks and
episodes_as_tracksargument ofSpotify.playlist()(#178)
Added
Authorisation - a list of
scopesand strings is accepted in scope arguments (#81)Scopeoperations were expanded to properly handle all combinations ofstr,scopeandScope(#177)Playlist API - new methods to fully support episodes in playlists. The new endpoints are direct counterparts to
playlist_tracks_*methods. (#178)
Changed
Import structure
Submodules were removed in favor of a flat structure. In addition to simply relocating objects, some changes were made as well. (#81)
Options for Senders and Configuration are now set at the top level
AuthorisationScopeswas renamed toscope, and its alias scopes is no longer availableReady-made scopes read, write and every are now accessed via the
scopeenumeration
Response models
These changes aim to make Models consistent and serialisation clear. (#149)
The JSON encoder used internally was made private
Hierarchies and names of model base classes and member types changed
Instead of using
str, models are now converted to JSON using theirjsonmethodAs a result of the change above, the
reprof models can be viewed simply withprint. Thereprof model lists was significantly improved. Viewing attributes of models produces consistent results.The
asbuiltinmethod replacesasdict()for models and was also added for lists of models. Enumerations and timestamps are no longer preserved in the conversion.pprintoutput is now compact by default
Playlist items
Boolean attributes of FullTrack and
FullEpisode on a playlist were previously also
available elsewhere, but had None values. They were removed.
The booleans are still available in playlist-related calls with the new
FullPlaylistTrack and
FullPlaylistEpisode.
LocalPlaylistTrack now also provides
these booleans. (#170)
Miscellaneous
Exceptions thrown in Authorisation now match Client. Because of that,
OAuthErrorwas removed. Errors now inherit from a common base class. (#154)Token.scopeandRefreshingToken.scopenow return aScopeinstead of a string. (#177)Default sender changed from
TransientSendertoPersistentSender, also affectsClientbehavior (#141)
Fixed
Properly close sessions in
PersistentSender(#179)Members of
AlbumGroupare now strings as intended, rather than one-element tuples (#181)Include readme to source distributions to fix setup (#182)
1.7.0 (2020-04-28)
Added
Most imports can be done directly at the top level (#174)
Deprecated
Importing from submodules, removed in Tekore 2.0 (#81)
Fixed
recommendationsdocumentation changed to reflect that only IDs are accepted as seeds, not URIs or URLs (#173)track_audio_analysisallow for missing attributes in analysis (#175)
1.6.0 (2020-04-07)
Added
Client - Support for podcasts. New APIs for episodes and shows. New
scopeuser-read-playback-positionfor returning episode resume points. New endpoints for saving shows in a user’s library.playback_queue_addnow accepts episodes.playbackandplayback_currently_playingcan return currently playing episodes and shows.playlistandplaylist_trackscan return episodes on playlists.searchallows for searching episodes and shows. (#164)Dependency to HTTPX upgraded to include version
0.12.*(#166)
Fixed
Errors are now correctly raised when parsing responses in
playlistandplaylist_tracks(#164)Conversions
to_url()now return URLs with prefixhttpsinstead ofhttp, in line with API and application behavior.from_url()now correctly acceptshttpsaddresses for conversion. (#165)Models - The
reprof local items can now be produced without errors (#171)
1.5.0 (2020-03-11)
Added
RetryingSender- avoid unnecessary retries and reduce total wait time (#163)
Fixed
category_playlistsrequire category parameter (#160)AsyncPersistentSender- persist connections appropriately (#161)playback_queue_addmatch endpoint address to changed API (#162)
1.4.0 (2020-03-02)
Added
playlist_tracks_clear- convenience endpoint for deleting tracks from a playlist (#155)Conversions - accept shows and episodes as valid types (#159)
Fixed
playlist_tracks_add- insert tracks in correct order when chunking (#156)
1.3.0 (2020-02-26)
Added
playback_queue_add- add tracks to queue (#152)CachingSender- option to specify maximum cache size (#143)Client - optionally send long lists of resources as chunks circumventing API limits (#153)
1.2.0 (2020-02-17)
Added
Fixed
Paging navigation - respect API limits when retrieving all items or pages of a
search(#145)Paging navigation - always return an awaitable when asynchronous (#146)
1.1.0 (2020-02-02)
Added
Async support in authentication and API endpoints (#131)
CachingSender- a sender for response caching (#4)Configuration - reading missing values produces a warning (0fa61801)
Fixed
1.0.1 (2020-01-17)
Fixed
PlaylistTrack- accept missing video thumbnail (#132)
1.0.0 (2020-01-14)
Packaging improvements
Declare versioning scheme
0.1.0 (2020-01-14)
Initial release of Tekore!