Skip to main content

spotify.py is an asynchronous API wrapper for Spotify written in Python.

Project description

spotify.py

An API library for the spotify client and the Spotify Web API written in Python.

spotify.py is 100% asyncronous meaning everything down to the HTTP library is designed to work with asyncio.
The library covers every endpoint in the Spotify web API and offsers control over the local Spotify app.

Examples

Web API example

client = spotify.Client('someid', 'sometoken')

async def example():
    drake = await client.get_artist('3TVXtAsR1Inumwj472S9r4')

    for track in await drake.top_tracks():
        print(repr(track))

Local client example

async with spotify.LocalClient() as local:
    await local.play('spotify:track:2G7V7zsVDxg1yRsu7Ew9RJ')

Installing

To install the library simply clone it and run setup.py

  • git clone https://github.com/mental32/spotify.py
  • python3 setup.py install

or use pypi

  • pip3 install spotify

spotify.py is in beta, there may be bugs.

Resources

For resources look at the examples or ask in the discord

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-0.1.3.tar.gz (14.3 kB view hashes)

Uploaded Source

Built Distribution

spotify-0.1.3-py3-none-any.whl (18.5 kB view hashes)

Uploaded Python 3

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