Skip to main content

nflmeta

Official Python SDK for the NFLMeta API.

Install

pip install nflmeta

Quickstart

from nflmeta import NFLMetaClient

client = NFLMetaClient(api_key="YOUR_KEY")

team = client.teams.get("PIT", season=2025)
player = client.players.identity("josh-allen-1996")
usage = client.usage.get()

print(team.data["displayName"])
print(player.data["display_name"])
print(usage.data["quota_remaining"])

What The SDK Does

  • sends X-NFLMeta-Key automatically when you provide api_key
  • preserves the API envelope shape: data, optional meta, plus parsed rate-limit headers
  • throws typed HTTP errors for common failure cases
  • exposes the main public API surfaces as resource clients instead of forcing raw URL construction
  • still gives you a low-level client.get(path, query={...}) escape hatch for any route not wrapped yet

Configuration

client = NFLMetaClient(
    api_key="YOUR_KEY",
    base_url="https://nflmeta.org",
    timeout=10.0,
)

You can also pass default headers or a custom transport(url, headers, timeout) callable if you want the SDK to run through your own HTTP layer in tests or internal tooling.

Resource Coverage

The Python SDK wraps the same main surfaces as the TypeScript package:

  • health
  • usage
  • metadata
  • seasons
  • teams
  • players
  • games
  • plays
  • playoff_games
  • standings
  • playoffs
  • super_bowls
  • history
  • hall_of_fame
  • contributors
  • executives
  • staff
  • coaches
  • assets
  • all_star_games
  • stats.players
  • reference
client.plays.summary(season=2024, group_by="team")
client.plays.leaders(season=2024, role="passer")
client.plays.list(game_id=21390, skip_markers=True)

plays.list is metered per play and the API refuses an unnarrowed request with 400 invalid_request: pass game_id, or player, or season together with one of week, team or opponent. plays.summary and plays.leaders answer season-wide questions server-side in tens of rows.

Errors

  • NFLMetaBadRequestError
  • NFLMetaUnauthorizedError
  • NFLMetaNotFoundError
  • NFLMetaRateLimitError
  • NFLMetaTimeoutError
  • NFLMetaError

Escape Hatch

raw = client.get("/api/v1/reference/team-colors", query={"limit": 10})
print(raw.data)

The path is resolved against base_url and has to stay there. A URL on another origin is refused with NFLMetaInvalidUrlError before any header is built, and a redirect that would leave the origin is refused rather than followed — your API key travels in the X-NFLMeta-Key header, and urllib forwards every request header across a cross-origin redirect. Same-origin absolute URLs still work.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nflmeta-0.1.3.tar.gz (15.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nflmeta-0.1.3-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file nflmeta-0.1.3.tar.gz.

File metadata

  • Download URL: nflmeta-0.1.3.tar.gz
  • Upload date:
  • Size: 15.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for nflmeta-0.1.3.tar.gz
Algorithm Hash digest
SHA256 480bfb3e65ddda426ee4eca960492fc159df8fce47bd9d892dc27c6668260243
MD5 f941276d1eb7b3ba74c90cf8c69a080f
BLAKE2b-256 f7c5e8ac844be783d25363a220aaf4e5aecd42d2e834db6e1db233dc5aacc937

See more details on using hashes here.

File details

Details for the file nflmeta-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: nflmeta-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for nflmeta-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 cc331662468fca0ec9af91d48bf27c82ec5d7c6f5ef9e5f13ccc2bea25fd0ccc
MD5 2810a41ef5d36ac6e660242ae05d96f3
BLAKE2b-256 359201ab45af306c54551ccdd3e2616690bf8b811279de1ca7c2130faa920d4c

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.5

2 files

0.1.4

1 file

This release

0.1.3 This release

2 files

0.1.2

1 file

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page