Skip to main content

An unofficial lightweight, type hinted library that helps query the songlink api: https://odesli.co/

Project description

Songlink.py is an unofficial helper libray for querying the Songlink API

The library builds atop of the stdlib requests and json libraries with the Client, Decoder and, QueryParamaters classes. TheClient.search() method gives a simple way to query the api. The library is modular so there is nothing stopping you from making the requests yourself and just using the JSON decoder for the structured data.

Example Request

params = QueryParameters(songIfSingle=True)

with Client(default_params=params) as songlink:
    response = songlink.search(QueryParameters(url="https://music.apple.com/au/album/its-not-up-to-you/1726654492?i=1726654496"))

    entity_id = response.entityUniqueId

    print(response.entitiesByUniqueId[entity_id].thumbnailUrl)

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

songlink-1a1.post1.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

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

songlink-1a1.post1-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

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