run1e / asyncspotify Goto Github PK
View Code? Open in Web Editor NEWAsynchronous and object-oriented wrapper for the Spotify Web API written in Python
Home Page: https://asyncspotify.rtfd.io/
License: MIT License
Asynchronous and object-oriented wrapper for the Spotify Web API written in Python
Home Page: https://asyncspotify.rtfd.io/
License: MIT License
https://developer.spotify.com/documentation/web-api/reference/playlists/
Missing:
https://developer.spotify.com/documentation/web-api/reference/library/
These would exist in both Client
as Client.get_me_albums
and in PrivateUser
as PrivateUser.get_albums()
or something similarly named.
https://developer.spotify.com/documentation/general/guides/authorization-guide/
https://tools.ietf.org/html/rfc6749#section-4.2
Would have to subclass the Authenticator
class. Maybe moving some methods out from AuthorizationCodeFlow
and into a common class would work nicely.
`from asyncspotify import Client, ClientCredentialsFlow
auth = ClientCredentialsFlow(
client_id='your client id',
client_secret='your client secret',
)
async with Client(auth) as sp:
playlist = await sp.get_playlist('1MG01HhbCvVhH9NmXhd9GC')
async for track in playlist:
print(track.name)`
it could be cool that we can print track.artist
what am i doing wrong. i think im doing it exactly how the docs told me
async def main():
auth = ClientCredentialsFlow(
client_id='my id',
client_secret=os.getenv('sp'))
sp = Client(auth)
await sp.authorize()
asyncio.run(main())
and it says:
RuntimeError: There is no current event loop in thread 'MainThread'.
https://developer.spotify.com/documentation/web-api/reference/follow/
Currently implemented:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.