An async caching python interface to readonly parts of the spotify api.
Project description
A readonly wrapper for the Spotify API that relies on heavy caching to minimise the number of requests.
Key Features
using async and await
caching requested data (note that non public data will be cached)
Installing
python 3.10 or higher is required
# Linux/macOS
python3 -m pip install -U spotifython
# Windows
py -3 -m pip install -U spotifython
To install the development version, run:
$ git clone https://github.com/vawvaw/spotifython
$ cd spotipython
$ python3 -m pip install -U .
Quick Example
import spotifython
import asyncio
async def main():
scope = spotifython.Scope(playlist_read_private=True, user_library_read=True)
authentication = spotifython.Authentication(
client_id="client_id",
client_secret="client_secret",
scope=scope
)
client = spotifython.Client(authentication=authentication)
playlists = await client.user_playlists()
for playlist in playlists:
print(await playlist.name)
await client.close()
asyncio.run(main())
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
spotifython-0.1.2.tar.gz
(27.0 kB
view hashes)
Built Distribution
Close
Hashes for spotifython-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d01846786e990f271906cd4e5374bdeaed174101849536c208a3583aeb22f458 |
|
MD5 | 9f6d4323b67c12a3fcf8002c2e145eda |
|
BLAKE2b-256 | f9a7bcc55264940a6a8b9e0d6133f0b5f5b61c74a19914b9fa089ae0e49f4795 |