Skip to main content

logo_url

logo_url(
team: Any,
league: str,
season: Any = None,
variant: str = 'default',
mark_type: str = 'logo',
) -> str | None

The CDN URL of a team's logo or wordmark, chosen for the season.

Picks the requested variant (falling back to a default or polarity variant), then within each variant the archived mark whose season range covers season (relocated franchises get their era's mark), then the most authoritative source. Unknown teams return None with one SdvplotWarning.

Arguments​

NameTypeDescription
teamAnyOne team identifier (abbreviation, name, ESPN id, ...).
leaguestrThe SDV league key, e.g. "nfl", "cfb", "nhl".
seasonAnyA season year; None picks the current mark.
variantstr"default", "dark", or a named variant from marks().
mark_typestr"logo" or "wordmark".

Returns​

str | None: The archive URL (content-addressed, immutable), or None when no mark exists.

Raises​

  • TypeError: If team is not a single value.
  • ValueError: If league is unknown or mark_type is not "logo"/"wordmark".
  • OfflineError: If the logo manifest cannot be downloaded and no cached copy exists.

Example​

import sdvplot

sdvplot.logo_url("KC", "nfl") # 'https://sdv.nyc3.cdn.digitaloceanspaces.com/assets/public/sha256/3d/3d77....png'

See also​