MusixmatchLyricsAPIClient¶
- class minim.api.musixmatch.MusixmatchLyricsAPIClient(*, api_key: bytes | str | None = None, enable_cache: bool = True, user_agent: str = '')[source]¶
Bases:
APIClientMusixmatch Lyrics API client.
- Parameters:
- api_keybytes or str; keyword-only; optional
API key. If not provided, a client key with Musixmatch Basic plan access is retrieved from the Musixmatch search page.
- enable_cachebool; keyword-only; default:
True Whether to enable an in-memory time-to-live (TTL) cache with a least recently used (LRU) eviction policy for this client. If
True, responses from semi-static endpoints are cached for one minute to one day, depending on their expected update frequency.See also
clear_cache()– Clear specific or all cache entries for this client.- user_agentstr; keyword-only; default:
"" User-Agentvalue to include in the headers of HTTP requests.
Methods
Clear specific or all cache entries for this client.
Terminate the underlying HTTP client session.
Initialize a new HTTP client session.
Set or update the API key.
Enable or disable the in-memory TTL cache for this client.
Attributes
Base URL for API endpoints.
Albums API endpoints for the Musixmatch Lyrics API.
Artists API endpoints for the Musixmatch Lyrics API.
Charts API endpoints for the Musixmatch Lyrics API.
Enterprise API endpoints for the Musixmatch Lyrics API.
Matcher API endpoints for the Musixmatch Lyrics API.
Search API endpoints for the Musixmatch Lyrics API.
Tracks API endpoints for the Musixmatch Lyrics API.
- artists: ArtistsAPI¶
Artists API endpoints for the Musixmatch Lyrics API.
- clear_cache(endpoint_methods: str | Callable[..., Any] | Collection[str | Callable[..., Any]] | None = None, /) None¶
Clear specific or all cache entries for this client.
Warning
If endpoint_methods is not provided, all cache entries are cleared.
- Parameters:
- endpoint_methodsstr, Callable, or Collection[str | Callable]; positional-only; optional
Endpoint methods whose cache entries should be cleared.
- enterprise: EnterpriseAPI¶
Enterprise API endpoints for the Musixmatch Lyrics API.
- matcher: MatcherAPI¶
Matcher API endpoints for the Musixmatch Lyrics API.
- set_api_key(api_key: bytes | str | None, /) None[source]¶
Set or update the API key.
- Parameters:
- api_keybytes, str, or None; positional-only
API key.