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()
live = client.live_scores.get()
print(team.data["displayName"])
print(player.data["display_name"])
print(usage.data["quota_remaining"])
What The SDK Does
- sends
X-NFLMeta-Keyautomatically when you provideapi_key - preserves the API envelope shape:
data, optionalmeta, 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:
healthlive_scoresusagemetadataseasonsteamsplayersgamesplaysplayoff_gamesstandingsplayoffssuper_bowlshistoryhall_of_famecontributorsexecutivesstaffcoachesassetsall_star_gamesstats.playersreference
client.live_scores.get()
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
NFLMetaBadRequestErrorNFLMetaUnauthorizedErrorNFLMetaNotFoundErrorNFLMetaRateLimitErrorNFLMetaTimeoutErrorNFLMetaError
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nflmeta-0.1.5.tar.gz.
File metadata
- Download URL: nflmeta-0.1.5.tar.gz
- Upload date:
- Size: 15.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d6acd42c9392349fb576cf9b62f0dbdc2f5e25032fdcbc7eda8efc30a1aecfb
|
|
| MD5 |
9fa5f2a394137bc53092e6e16baffb6c
|
|
| BLAKE2b-256 |
18b31aca3538448de6faa614bceba60ed25b165fc5f189f8c62b362cfaef88fc
|
File details
Details for the file nflmeta-0.1.5-py3-none-any.whl.
File metadata
- Download URL: nflmeta-0.1.5-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d196ee17cace9f8997dcb369f3f93ff1573d062f21c92e45f4d437e439238b59
|
|
| MD5 |
d3a3fa4e4e60b8d7412675bbf9a1ccd9
|
|
| BLAKE2b-256 |
1c96b813279d0010f15f12bbce42319ab8e41eca88940fcea8e680d06afd37c8
|