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 of Show, LocalAlbum and LocalTrack optional (#323)

Added

5.4.0 (2024-02-27)

Fixed

Added

  • Support HTTPX 0.27 (#317)

5.3.1 (2024-01-28)

Fixed

  • Reference: remove methods playlist_remove_indices and playlist_remove_occurrences, which were removed from the API (#315)

5.3.0 (2023-12-22)

Fixed

  • Make images optional in Playlist to fix getting empty playlists without an image (#309)

  • Add undocumented dict to types of publisher in Show (#310)

  • Make is_playable in Episode optional despite API specifications (#310)

  • Make deprecated language optional in Episode pending removal (#310)

  • Add undocumented dict to types of duration_ms in LocalTrack (#310)

  • Add undocumented available_markets to FullPlaylistEpisode (#310)

Added

  • Add restrictions to FullEpisode (#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 and 2.5.1 (#306)

  • Add missing available_markets to FullChapter (#308)

5.2.0 (2023-11-05)

Fixed

Added

5.1.1 (2023-10-14)

Fixed

5.1.0 (2023-10-04)

Added

  • Support HTTPX 0.25 (#294)

Fixed

  • Remove misleading documentation on models (#295)

  • Add missing supports_volume to Device (#296)

  • Exclude Pydantic version 2.4.0 (#297)

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

  • FullAlbum - remove “album_group” attribute introduced in version 4.6.0 (#291)

4.6.0 (2023-04-12)

Added

  • Make enumerations case insensitive (#285)

  • Support HTTPX 0.24 (#289)

Fixed

4.5.0 (2022-11-06)

Added

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

  • Dependency to HTTPX upgraded to include version 0.23.* (#272)

  • Declare support for Python 3.10 (#273)

4.3.0 (2022-03-11)

Added

  • Dependency to HTTPX upgraded to include version 0.22.* (#267)

  • Expose the underlying credentials manager in RefreshingCredentials and RefreshingToken to facilitate closing their HTTP client, which is no longer closed by default as of HTTPX version 0.22 (#267)

Fixed

  • Add missing context “collection” to ContextType for playing saved tracks (#270)

4.2.0 (2022-01-19)

Added

Fixed

  • URL-encode hashes in user IDs in user (#266)

4.1.0 (2021-11-20)

  • Dependency to HTTPX upgraded to include versions 0.20.0-0.21.* (#263, #265)

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

  • Removed Python 3.6 support and its conditional dependencies (#252)

  • Dependency to HTTPX upgraded to include versions from 0.15 to 0.19.* (#250, #261)

  • Add fields to Request and change their meaning to be in line with the new HTTPX interface (#250)

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

3.7.0 (2021-04-08)

Added

3.6.2 (2021-03-23)

Fixed

3.6.1 (2021-03-07)

Fixed

3.6.0 (2021-03-02)

Added

  • Client - make context managers async safe on Python 3.7+, adds a dependency to the contextvars backport for Python 3.6 (#242)

  • Dependency to HTTPX upgraded to include version 0.17.* (#243)

3.5.1 (2021-02-12)

Fixed

3.5.0 (2021-01-15)

Added

Fixed

  • Client - fix type hints for context managers (#239)

3.4.2 (2020-12-14)

Fixed

  • Models - fix model repr for optional lists (#233)

3.4.1 (2020-12-04)

Fixed

3.4.0 (2020-11-24)

Added

Fixed

  • Client - document new behavior of track markets (#228)

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

  • Client - document new behavior of track markets (#217)

3.2.0 (2020-10-16)

Added

3.1.0 (2020-09-13)

Added

  • StrEnum - model enumerations now inherit from str, making e.g. using it as a key for sorting possible (#214)

Fixed

  • PrivateUser - a birthday attribute was added. It is not obtainable with new tokens but is returned for old tokens that have the now-invalid user-read-birthday scope (#52, #197)

3.0.1 (2020-09-05)

Fixed

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 and Response 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 of Spotify.playlist() deprecated in 2.0 (#178, #202)

  • Dependency to Requests dropped in favor of HTTPX (#139)

  • Senders - TransientSender and SingletonSender along with their asynchronous variants were removed (#139)

  • Senders - default sender and keyword argument options were removed (#139)

Changed

Fixed

  • Client - fix chunking errors that occurred when passing certain parameters as positional arguments (#205)

2.1.3 (2020-08-04)

Fixed

2.1.2 (2020-07-21)

Fixed

2.1.1 (2020-07-02)

Fixed

2.1.0 (2020-05-31)

Added

  • Client - required and optional scopes can now be determined in code for any endpoint of the client (#180)

  • Dependency to HTTPX upgraded to include version 0.13.* (#186)

Fixed

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

Deprecated

Added

  • Authorisation - a list of scopes and strings is accepted in scope arguments (#81)

  • Scope operations were expanded to properly handle all combinations of str, scope and Scope (#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 to scope, and its alias scopes is no longer available

  • Ready-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 their json method

  • As a result of the change above, the repr of models can be viewed simply with print. The repr of model lists was significantly improved. Viewing attributes of models produces consistent results.

  • The asbuiltin method replaces asdict() 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

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

1.6.0 (2020-04-07)

Added

Fixed

  • Errors are now correctly raised when parsing responses in playlist and playlist_tracks (#164)

  • Conversions to_url() now return URLs with prefix https instead of http, in line with API and application behavior. from_url() now correctly accepts https addresses for conversion. (#165)

  • Models - The repr of local items can now be produced without errors (#171)

1.5.0 (2020-03-11)

Added

Fixed

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

1.2.0 (2020-02-17)

Added

  • Client - optionally use maximum limits in all paging calls (#66)

Fixed

1.1.0 (2020-02-02)

Added

Fixed

  • playlist - parse correctly when fields is specified (#142)

1.0.1 (2020-01-17)

Fixed

1.0.0 (2020-01-14)

  • Packaging improvements

  • Declare versioning scheme

0.1.0 (2020-01-14)

Initial release of Tekore!