Official Python library for wavy.fm
Project description
wavyfm-python
The Python client library for wavy.fm, officially maintained by Wavy Labs.
Documentation
All endpoints are documented in the wavy.fm developer docs. You can contribute to the docs and suggest API changes in the corresponding Github repository.
Client library documentation coming soon!
Installation
This library is built with Python 3.8. You can install it from pypi:
pip install wavyfm
Quick Start
To get started, install the wavyfm
package and create an app on https://wavy.fm/developers/apps. Add your client ID
and client secret to your environment variables:
WAVYFM_CLIENT_ID='pub_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
WAVYFM_CLIENT_SECRET='priv_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
Without user authentication
import wavyfm
# Create the client
wavy = wavyfm.WavyClient(auth_manager=wavyfm.WavyClientCredentials())
# Get the total listens recorded on wavy.fm
print(wavy.metrics.get_total_listens())
# Get the total amount of registered users on wavy.fm
print(wavy.metrics.get_total_users())
# Get the top 10 registered users on wavy.fm by listen count
print(wavy.metrics.get_user_listens_leaderboard())
# Get a user's public profile
print(wavy.users.by_username("Aram").get_profile())
# Get a user's total listens
print(wavy.users.by_username("Aram").get_total_listens())
# Get a user's total artists
print(wavy.users.by_username("Aram").get_total_artists())
# Get a user's currently listening track
print(wavy.users.by_username("Aram").get_currently_listening())
# Get a user's last 10 recorded listens
print(wavy.users.by_username("Aram").get_recent_listens(10))
License
This project is licenced under the MIT License.
The overall structure is heavily inspired from Spotipy, a client library for Spotify.
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
Built Distribution
File details
Details for the file wavyfm-1.0.3.tar.gz
.
File metadata
- Download URL: wavyfm-1.0.3.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1170f2c705c7ddf34ea8a6ce62fa2b30499889f6ca5bffb35b436b4962af8bf2 |
|
MD5 | a75a817dbf38cf39a79021740556c045 |
|
BLAKE2b-256 | 09ace819c387fef0fa7469139ddc905d144ff5feaf33955700f1371d8ec0efbd |
File details
Details for the file wavyfm-1.0.3-py3-none-any.whl
.
File metadata
- Download URL: wavyfm-1.0.3-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d39ffc19ba0c780f45e91ac3289aef79a78a16f7c74a4640639753c4a9825f87 |
|
MD5 | 14cda1a2fbbac417136a3416d0f4c27d |
|
BLAKE2b-256 | ec781b5a69f19198ce49d5ced9db30fa72fdc3942276a535145f0c5950a1104c |