Release notes
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_markets
ofShow
,LocalAlbum
andLocalTrack
optional (#323)
Added
Add
open_browser
option toprompt_for_user_token
andprompt_for_pkce_token
(#325)
5.4.0 (2024-02-27)
Fixed
Add
ep
as a valid enum toAlbumType
for top tracks API responses (#318)Add undocumented
smart_shuffle
toCurrentlyPlayingContext
(#320)
Added
Support HTTPX
0.27
(#317)
5.3.1 (2024-01-28)
Fixed
5.3.0 (2023-12-22)
Fixed
Make
images
optional inPlaylist
to fix getting empty playlists without an image (#309)Make
is_playable
inEpisode
optional despite API specifications (#310)Make deprecated
language
optional inEpisode
pending removal (#310)Add undocumented
dict
to types ofduration_ms
inLocalTrack
(#310)Add undocumented
available_markets
toFullPlaylistEpisode
(#310)
Added
Add
restrictions
toFullEpisode
(#310)Support HTTPX
0.26
(#311)Improve
UnknownModelAttributeWarning
to include model name (#313)
5.2.1 (2023-11-22)
Fixed
Exclude Pydantic versions
2.5.0
and2.5.1
(#306)Add missing
available_markets
toFullChapter
(#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
Optional
annotations 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.
.json
and.asbuiltin
methods are replaced by Pydantic models’.json
and.dict
.Models use the builtin
datetime
object directly..pprint
and 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
RefreshingCredentials
andRefreshingToken
to facilitate closing their HTTP client, which is no longer closed by default as of HTTPX version0.22
(#267)
Fixed
Add missing context “collection” to
ContextType
for playing saved tracks (#270)
4.2.0 (2022-01-19)
Added
Conversions - add
user
as 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.
UnknownModelAttributeWarning
was introduced (#247)
3.7.1 (2021-05-04)
Fixed
Models - add missing but undocumented
html_description
field toFullShow
andSimpleShow
(#251)Models - require the newly documented
html_description
field inFullEpisode
andSimpleEpisode
(#251)
3.7.0 (2021-04-08)
Added
Client - add episode endpoints to library API, and the corresponding
SavedEpisode
andSavedEpisodePaging
models (#249)
3.6.2 (2021-03-23)
Fixed
Models - add missing but undocumented
html_description
field toFullEpisode
andSimpleEpisode
(#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
streaming
andapp-remote-control
as 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)Spotify
and 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-birthday
scope (#52, #197)
3.0.1 (2020-09-05)
Fixed
featured_playlists
- allow missing owner inPlaylist
models (#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
Request
andResponse
wrappers 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_tracks
argument ofSpotify.playlist()
deprecated in 2.0 (#178, #202)Dependency to Requests dropped in favor of HTTPX (#139)
Senders -
TransientSender
andSingletonSender
along with their asynchronous variants were removed (#139)Senders - default sender and keyword argument options were removed (#139)
Changed
Errors - web exceptions now inherit from
Exception
rather than the underlying HTTP library’s top-level exception. They always contain the relevantRequest
andResponse
(#139)Senders - as the only concrete senders,
PersistentSender
andAsyncPersistentSender
are now implemented inSyncSender
andAsyncSender
, respectively (#139)CachingSender
- argument order is now in line withRetryingSender
(#139)Senders - clients (
Spotify
andCredentials
) 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
ModelList
when chunking input (#196)Authorisation - fix error handling when response does not contain an error description (#199)
playback
andplayback_currently_playing
- correctly handle local tracks (#200)
2.1.2 (2020-07-21)
Fixed
FullShow
- add undocumentedtotal_episodes
parameter, marktotal_episodes
ofSimpleShow
undocumented (#194)
2.1.1 (2020-07-02)
Fixed
SimpleShow
- add optionaltotal_episodes
parameter (#190)
2.1.0 (2020-05-31)
Added
Fixed
Errors - correctly fall back to
ClientError
andServerError
when 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)
OAuthError
in Authorisation - see below for details (#154)
Deprecated
Playlist API - methods specifically for playlist tracks and
episodes_as_tracks
argument ofSpotify.playlist()
(#178)
Added
Authorisation - a list of
scopes
and strings is accepted in scope arguments (#81)Scope
operations were expanded to properly handle all combinations ofstr
,scope
andScope
(#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
AuthorisationScopes
was renamed toscope
, and its alias scopes is no longer availableReady-made scopes read, write and every are now accessed via the
scope
enumeration
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 theirjson
methodAs a result of the change above, the
repr
of models can be viewed simply withprint
. Therepr
of model lists was significantly improved. Viewing attributes of models produces consistent results.The
asbuiltin
method replacesasdict()
for models and was also added for lists of models. Enumerations and timestamps are no longer preserved in the conversion.pprint
output 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,
OAuthError
was removed. Errors now inherit from a common base class. (#154)Token.scope
andRefreshingToken.scope
now return aScope
instead of a string. (#177)Default sender changed from
TransientSender
toPersistentSender
, also affectsClient
behavior (#141)
Fixed
Properly close sessions in
PersistentSender
(#179)Members of
AlbumGroup
are 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
recommendations
documentation changed to reflect that only IDs are accepted as seeds, not URIs or URLs (#173)track_audio_analysis
allow for missing attributes in analysis (#175)
1.6.0 (2020-04-07)
Added
Client - Support for podcasts. New APIs for episodes and shows. New
scope
user-read-playback-position
for returning episode resume points. New endpoints for saving shows in a user’s library.playback_queue_add
now accepts episodes.playback
andplayback_currently_playing
can return currently playing episodes and shows.playlist
andplaylist_tracks
can return episodes on playlists.search
allows 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
playlist
andplaylist_tracks
(#164)Conversions
to_url()
now return URLs with prefixhttps
instead ofhttp
, in line with API and application behavior.from_url()
now correctly acceptshttps
addresses for conversion. (#165)Models - The
repr
of 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_playlists
require category parameter (#160)AsyncPersistentSender
- persist connections appropriately (#161)playback_queue_add
match 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!