Skip to main content

A Python package for interacting with the Soundcharts API.

Project description

Soundcharts Module

A Python package for interacting with the Soundcharts API.

API Documentation

Full documentation of the API is available here: Soundcharts API Documentation

You will need a Soundcharts API subscription to use this package.

Features

  • Easily pull data from Soundcharts' API.
  • Every endpoint from the documentation is available as a Python function.
    • For example, the "get audience" endpoint in the "playlist" category is accessible via playlist.get_audience().
  • Automatically loops through endpoints to get around API limitations, such as:
    • Periods of 90 days max.
    • Limits of 100 items per request.
  • Configurable error handling.

Installation

pip install soundcharts

Usage

from soundcharts.client import SoundchartsClient

sc = SoundchartsClient(app_id="your_app_id", api_key="your_api_key")

# Example with Billie Eilish's UUID
billie_metadata = sc.artist.get_artist_metadata("11e81bcc-9c1c-ce38-b96b-a0369fe50396")
print(billie_metadata)

Error handling

You can set the severity of the console logs, file logs, and exceptions:

from soundcharts.client import SoundchartsClient
import logging

sc = SoundchartsClient( app_id="your_app_id",
                        api_key="your_api_key",
                        console_log_level=logging.INFO,
                        file_log_level=logging.WARNING,
                        exception_log_level=logging.ERROR)

Setting the level of the console or file log to logging.DEBUG will log each request send to the API.

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

soundcharts-0.1.0.tar.gz (31.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

soundcharts-0.1.0-py3-none-any.whl (40.3 kB view details)

Uploaded Python 3

File details

Details for the file soundcharts-0.1.0.tar.gz.

File metadata

  • Download URL: soundcharts-0.1.0.tar.gz
  • Upload date:
  • Size: 31.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for soundcharts-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bf4670a32c69a366b2d04b2a387d4a95f7936e9df5f9a4ea18196b880c57a1f4
MD5 2e22e3b6d38a167a4df8546cc8af3f50
BLAKE2b-256 025a84c721e954bcfe5afb577a6707c110e16ccda2ff1b10ba5638b5c24c7694

See more details on using hashes here.

File details

Details for the file soundcharts-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: soundcharts-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 40.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for soundcharts-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dafadc3855d63564910230582f0d186610c9c5fe96a35b1ce0aa4d8544e5f2a6
MD5 248ff0a20db6b58d573914cb7885b820
BLAKE2b-256 ddaebe5e9d4a58f80b8d6efba2916bd1e4a8202531da2716bf8b75c46390a492

See more details on using hashes here.

Supported by

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