Skip to main content

A python wrapper for spotify web sockets

Project description

Spotify Web Sockets

Description

The main purpose of this project is to let the users interact with spotify web socket events. Right now the project is still in an alpha version therefore is not complete and may have some bugs. Feel free to contribute is any way.

Basic library usage

Example using chrome cookies

from spotifyws.spotify import SpotifyWs

client = SpotifyWs()

@client.on('track')
def on_track_change(data):
    print('TRACK CHANGED')

Example using cookies from custom file

from spotifyws.spotify import SpotifyWs

client = SpotifyWs(cookie_file="./cookie_file.json")

@client.on('track')
def on_track_change(data):
    print('TRACK CHANGED')

Launch flask example

In order to launch flask example you need the following commands:

$ export FLASK_APP=examples.flask-app.server
$ flask run

About authentication

Right now authentication can only be achieved using local cookies and not through OAUTH flow.

Note

This code is intended for learning purposes only. You must know that bypassing spotify API is against theirs Terms of service therefore I don't invite you to abuse this library. Thanks

Author

Jacopo De Gattis

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

spotify-ws-0.0.1.tar.gz (7.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page