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

[](https://github.com/mental32/spotify.py/stargazers)
# 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.<br>The library covers every endpoint in the Spotify web API and offers control over the local Spotify app.<br><br>As of v0.1.5 it is possible to use spotify.py in a syncronous manner. No await/async syntax required! To do this simply use
```py
from spotify.sync import spotify # and now no methods require the async/await syntax.
```
## Examples
Web API example
```py
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
```py
async with spotify.LocalClient() as local:
await local.play('spotify:track:2G7V7zsVDxg1yRsu7Ew9RJ')
```
## Resources
For resources look at the [examples](https://github.com/mental32/spotify.py/tree/master/examples) or ask in the [discord](https://discord.gg/k43FSFF)
## 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`
- `pip3 install -U git+https://github.com/mental32/spotify.py`
## Contributing
To contribute you must:
- have a presence in the [discord](https://discord.gg/k43FSFF) server
- fork and open a PR with changes.
> spotify.py is in beta, there may be bugs.
[](https://github.com/mental32/spotify.py/stargazers)
# 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.<br>The library covers every endpoint in the Spotify web API and offers control over the local Spotify app.<br><br>As of v0.1.5 it is possible to use spotify.py in a syncronous manner. No await/async syntax required! To do this simply use
```py
from spotify.sync import spotify # and now no methods require the async/await syntax.
```
## Examples
Web API example
```py
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
```py
async with spotify.LocalClient() as local:
await local.play('spotify:track:2G7V7zsVDxg1yRsu7Ew9RJ')
```
## Resources
For resources look at the [examples](https://github.com/mental32/spotify.py/tree/master/examples) or ask in the [discord](https://discord.gg/k43FSFF)
## 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`
- `pip3 install -U git+https://github.com/mental32/spotify.py`
## Contributing
To contribute you must:
- have a presence in the [discord](https://discord.gg/k43FSFF) server
- fork and open a PR with changes.
> spotify.py is in beta, there may be bugs.
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
spotify-0.1.5.tar.gz
(16.1 kB
view details)
File details
Details for the file spotify-0.1.5.tar.gz.
File metadata
- Download URL: spotify-0.1.5.tar.gz
- Upload date:
- Size: 16.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e132d3f5302e93c5d3f4022a646898bfc72a16e7a62f208b1364372821fe4e8
|
|
| MD5 |
1670c77bf5c94027ffde89517b2be3a3
|
|
| BLAKE2b-256 |
133905217f80879b63c6a9a04257ce643d81e25b1365de2c1a67b0a4049ee4ac
|