Skip to main content

Official Python library for wavy.fm

Project description



wavyfm-python

The Python client library for wavy.fm, officially maintained by Wavy Labs.

Tests wavyfm on pypi Discord

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

wavyfm-1.0.2.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

wavyfm-1.0.2-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file wavyfm-1.0.2.tar.gz.

File metadata

  • Download URL: wavyfm-1.0.2.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.20.1 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.6

File hashes

Hashes for wavyfm-1.0.2.tar.gz
Algorithm Hash digest
SHA256 f876b142e30ac51c77906fcc1abd9e74cf6b9ee2a22aeaeba1de549a35baac74
MD5 06c784683ef83937dc7ca6922ce1e773
BLAKE2b-256 d96a38ef81b06597fe34d60687da22f769608603322c8e9e5827dcf96d6896aa

See more details on using hashes here.

File details

Details for the file wavyfm-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: wavyfm-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.20.1 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.6

File hashes

Hashes for wavyfm-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7ddd00a89f66366a1492c01c7f1232811bf554edaf9252ca0316a684006d4b7e
MD5 b720b6a9aed5ed56086a689934928c48
BLAKE2b-256 8049cec0ac9cd909db5914f878a507baf1d21755cedca041e3c449d9864dd72b

See more details on using hashes here.

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