Repository navigation
Transfermarkt API 5.0.0 introduces an installable async Python SDK alongside the HTTP service.
Added
- Installable async Python SDK:
from transfermarkt_api import Transfermarkt, with typed response models for every data endpoint, async context management, explicit configuration, and caller-suppliedhttpxtransports. CacheConfigfor per-client cache settings;cache=Nonedisables ordinary and reference caches.- Public SDK exceptions distinguish unknown entities, blocked requests, timeouts, invalid upstream responses and unavailable endpoints. Custom transport exceptions and cancellation propagate unchanged.
- Transport timestamp metadata and recording/replay examples preserve
updatedAtwhen reassembling stored upstream responses. Fan-out cancels and awaits sibling work before propagating failures.
Changed
- The HTTP service consumes the SDK while retaining its routes, response models, error statuses, environment settings and rate limits. Schemas, services and upstream internals moved out of
app; the supported library API is the facade, models, exceptions and cache configuration. - Core installations require only httpx, Pydantic and cachetools, with compatible dependency ranges. Install the
serverextra for FastAPI, uvicorn, rate limiting and environment settings. The existingapp.main:appserver entry point is retained.
The wheel installs only transfermarkt_api; the HTTP server remains available from source and Docker. The SDK requires Python 3.12 or 3.13.
Validation: 218 offline tests, package-wide typing, clean distribution installation, and live CI checks passed.