The next generation Spotify Web API wrapper for Python
Project description
The next generation Spotify Web API wrapper for Python
Documentation
•
Releases
•
Community
Quick example
import asyncio
from spotipy2 import Spotify
from spotipy2.auth import ClientCredentialsFlow
client = Spotify(
ClientCredentialsFlow(
client_id="client_id",
client_secret="client_secret"
)
)
async def get_track_name(track_id):
async with client as s:
track = await s.get_track(track_id)
print(f"The name of the track is {track.name}")
asyncio.run(get_track_name(input("Insert the track ID: ")))
Features
Well, Spotipy2 has some big advantages over Spotipy.
- Easy: You can install spotipy2 with pip and start in minutes to build your code.
- Fast: Thanks to
aiohttp
speed, spotipy2 is incredibly fast - Documented: API methods, types and public interfaces are all well documented
- Asynchronous: You can use this library in an async project without having to
- Type-hinted: All the methods and types are type-hinted, enabling excellent IDE support
- Types for each Spotify Object: Each object has its own Type (Class), allowing for simpler development
Requirements
- Python 3.7 or higher
- A Spotify client ID and secret.
Installation
pip install spotipy2
Copyright & License
- Copyright (C) 2020-2021 CyanBook https://github.com/cyanbook
- Licensed under the terms of the GNU Lesser General Public License v3 or later (LGPLv3+)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
spotipy2-0.5.tar.gz
(9.0 kB
view hashes)
Built Distribution
spotipy2-0.5-py3-none-any.whl
(5.7 kB
view hashes)