Spotipy2

Latest version: v0.6.1

Safety actively analyzes 685525 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.6

New features
- Added playlist types/methods by xnetcat in https://github.com/CyanBook/spotipy2/pull/4
- Added OAuth Flow by Coddo-Python in https://github.com/CyanBook/spotipy2/pull/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](https://docs.python.org/3/library/dataclasses.html) objects
- More control on JSON to types conversion (new `auto_conversion` & `recursive_conversion` parameters)


**Full Changelog**: https://github.com/CyanBook/spotipy2/compare/v0.5...v0.6

0.5

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?
1. Install MongoDB
2. Create a database and a collection called `spotipy2`
3. Set the [`mongodb_uri`](https://docs.mongodb.com/manual/reference/connection-string/) parameter (Make sure to add the default database!)
4. *(Optional)* Add an ascending index for the `_endpoint` field
5. You're done!

0.4

What's new
New functions and types for Album object and search function added + bug fixes and enhancements

New types
`Album` - [AlbumObject](https://developer.spotify.com/documentation/web-api/reference/#object-albumobject)
`SimplifiedAlbum` - [SimplifiedAlbumObject](https://developer.spotify.com/documentation/web-api/reference/#object-simplifiedalbumobject)
`SimplifiedTrackObject` - [SimplifiedTrackObject](https://developer.spotify.com/documentation/web-api/reference/#object-simplifiedtrackobject)

New methods
`search` - [Search for an Item](https://developer.spotify.com/documentation/web-api/reference/#endpoint-search)
`get_albums` - [Get Multiple Albums](https://developer.spotify.com/documentation/web-api/reference/#endpoint-get-multiple-albums)
`get_album` - [Get an Album](https://developer.spotify.com/documentation/web-api/reference/#endpoint-get-an-album)
`get_album_tracks` - [Get an Album's Tracks](https://developer.spotify.com/documentation/web-api/reference/#endpoint-get-an-albums-tracks)

Fixes
- `get_artist_top_tracks`'s `market` 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 with `None` values
- Added a types.BaseType which is the main class where every type derivates from

0.3

What's new
- Auto deploy for docs and PyPi
- Added link support

New types
- `SimplifiedArtist` - [SimplifiedArtistObject](https://developer.spotify.com/documentation/web-api/reference/object-model/#track-object-full)

New methods
- `get_artist_top_tracks` - [Get an Artist's Top Tracks](https://developer.spotify.com/documentation/web-api/reference/#endpoint-get-an-artists-top-tracks)

Breaking changes
- `Type.from_dict` is now synchronous, since async isn't needed for it

0.2

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](https://developer.spotify.com/documentation/general/guides/authorization-guide/#authorization-code-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](https://developer.spotify.com/documentation/web-api/#response-status-codes)

New types
`Track` - [Track object (full)](https://developer.spotify.com/documentation/web-api/reference/object-model/#track-object-full)
`Artist` - [Artist object (full)](https://developer.spotify.com/documentation/web-api/reference/object-model/#artist-object-full)

New methods
`get_track` - [Get a Track](https://developer.spotify.com/documentation/web-api/reference/tracks/get-track)
`get_tracks` - [Get Several Tracks](https://developer.spotify.com/documentation/web-api/reference/tracks/get-several-tracks)
`get_artist` - [Get an Artist](https://developer.spotify.com/documentation/web-api/reference/artists/get-artist)
`get_artists` - [Get Several Artists](https://developer.spotify.com/documentation/web-api/reference/artists/get-several-artists)

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.