A software library designed to enable easy querying and accessing of the Spotify metadata service.
It is worth noting that this product uses the Spotify API, but it is not officially certified, endorsed, or affiliated with Spotify in any way. It operates as an autonomous entity. For more information about the capabilities of the Metadata API, please visit Spotify's official website.
Spotimeta eliminates the hassle of needing to integrate complex API calls in one's code. It enables users to make Spotify API calls with simple python functions. Here are some examples:
- Searching for a specific track:
>>> search = spotimeta.search_track("Trip back to childhood")
>>> search["total_results"] 1
- Retrieve the artist of that track:
>>> artist = search["result"][0]["artist"]
>>> artist["name"] u'St-Petersburg Ska-Jazz Review'
- Access more information about that artist:
>>> lookup = spotimeta.lookup(artist["href"], detail=1)
>>> for album in lookup["result"]["albums"]:
album["name"] u'Too Good To Be True' u'Too Good To Be True' u'Live At The Red Club'
- Look up metadata using Spotify URLs:
>>> track = spotimeta.lookup("")
>>> print(track["result"]["artist"]["name"], "-", track["result"]["name"])
Kings Of Leon - Closer
To enhance the user experience, it is advisable to use caching for complex use-cases. Users can enable caching by generating a Metadata instance and passing it to a mapping object(e.g., a dictionary). The metadata instance has the same methods as the module itself, and caching happens automatically. The data is cached for as long as the expiry header on the first request allows it.
In conclusion, Spotimeta is a powerful tool for anyone that wants to streamline their use of the Spotify Metadata API. It is fast, reliable, and easy to use. Try it out and experience the benefits firsthand.
Version 0.2: N/A