Skip to main content
Version: main

Package — additional Python functions

Hand-written wrappers, loaders, and helpers in sportsdataverse not covered by the generated API-endpoint reference above.

Other

cache_stats() -> 'Dict[str, Any]'

Return a snapshot of the cache for debugging / inspection.

Returns a dict with mode, entries, and disk_bytes (only populated when mode=filesystem). Cheap — doesn't read the cached bodies, just counts + sizes.

get_cache_mode() -> 'str'

Return the current cache mode.

set_cache_mode(mode: 'str') -> 'None'

Switch the global cache mode.

Parameters

ParameterTypeDefaultDescription
modestrOne of "off", "memory", "filesystem".

set_default_ttl(ttl: 'Optional[Union[timedelta, int]]') -> 'None'

Override the default TTL for endpoints not matched by the tier rules.

Parameters

ParameterTypeDefaultDescription
ttlOptional[Union[timedelta, int]]A timedelta, an integer (interpreted as seconds), or None to reset to the built-in DEFAULT_TTL (MODERATE = 1 hour).