cecc5a0f61
Per sub-project-2 plan Task 9 / spec §6.4. Three keyless first-ship fetchers parse documented JSON APIs via an injected HttpClient; license/attribution go through tools.licensing; NASA third-party + IA no-license cases are flagged in notes for review. musopen/fma/freesound are explicit deferred stubs raising NotImplementedError; freesound documents FREESOUND_API_TOKEN (secret, env-only). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
26 lines
775 B
Python
26 lines
775 B
Python
"""Musopen fetcher — DEFERRED (see spec §6.4).
|
|
|
|
Public-domain / CC classical music. Access has historically been gated and may
|
|
require an API key (a secret — never logged, see spec §9). The Fetcher seam is
|
|
wired so enabling it later is purely additive; it raises until implemented.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from tools.ingest.base import Candidate
|
|
|
|
_DEFERRED = "deferred — see spec §6.4 (Musopen access may require an API key)"
|
|
|
|
|
|
class MusopenFetcher:
|
|
archive = "musopen"
|
|
|
|
def __init__(self, client):
|
|
self.client = client
|
|
|
|
def search(self, query: str, *, limit: int) -> list[Candidate]:
|
|
raise NotImplementedError(_DEFERRED)
|
|
|
|
def resolve(self, identifier: str) -> Candidate:
|
|
raise NotImplementedError(_DEFERRED)
|