Releases: CyanBook/spotipy2
v0.6 - New methods, types, authentication flows and more
New features
- Added playlist types/methods by @xnetcat in #4
- Added OAuth Flow by @Coddo-Python in #6
- Added types
Paging
&User
Changes
- Simplified types are removed, normal types have some fields with
None
as the default value - All types are now @dataclass objects
- More control on JSON to types conversion (new
auto_conversion
&recursive_conversion
parameters)
Full Changelog: v0.5...v0.6
v0.5 - Caching with MongoDB
Caching is now available
Use cases
If your program is very dependent on repetitive simple GET requests like get_track
or get_album
, this feature is for you!
You can use that database for other projects since all the data are stored in plain JSON from Spotify.
How does it work?
Instead of having to call the Spotify API every single time (increasing latency), it searches first in MongoDB's collection and sees if there's an endpoint matching the current request. If so, it returns that item, and the entire request is completed in less than 0.1 seconds.
How to enable it?
- Install MongoDB
- Create a database and a collection called
spotipy2
- Set the
mongodb_uri
parameter (Make sure to add the default database!) - (Optional) Add an ascending index for the
_endpoint
field - You're done!
v0.4 - Albums & search added
What's new
New functions and types for Album object and search function added + bug fixes and enhancements
New types
Album
- AlbumObject
SimplifiedAlbum
- SimplifiedAlbumObject
SimplifiedTrackObject
- SimplifiedTrackObject
New methods
search
- Search for an Item
get_albums
- Get Multiple Albums
get_album
- Get an Album
get_album_tracks
- Get an Album's Tracks
Fixes
get_artist_top_tracks
'smarket
parameter is now passed correctly
Minor enhancements
- Improved type hinting
- Added a
wrapper
function added to every function with optional parameters to avoid passing dicts withNone
values - Added a types.BaseType which is the main class where every type derivates from
v0.3 - Artist and general improvements
What's new
- Auto deploy for docs and PyPi
- Added link support
New types
SimplifiedArtist
- SimplifiedArtistObject
New methods
get_artist_top_tracks
- Get an Artist's Top Tracks
Breaking changes
Type.from_dict
is now synchronous, since async isn't needed for it
v0.2 - The first steps
What's new
Welcome to the first stable release of this package!
A Client
Spotify
is the new client class of spotipy2
You can use it to make API requests to Spotify servers
Authentication
For authenticating Client is now available the Client Credentials Flow
You can use it via ClientCredentialsFlow
Exceptions
A general exception class called SpotifyException
has been added to handle every error from Spotify API
More info on error codes here
New types
Track
- Track object (full)
Artist
- Artist object (full)
New methods
get_track
- Get a Track
get_tracks
- Get Several Tracks
get_artist
- Get an Artist
get_artists
- Get Several Artists