Releases: Sharp-API/SharpAPI-Python
v0.3.2 — canonicalize repo URLs
v0.3.1 — nested refs + TeamRef metadata
Bundles the 0.3.0 (nested refs) and 0.3.1 (TeamRef metadata) work into a single published release. 0.3.0 was never tagged; install 0.3.1 to get all of it.
Added
Nested reference objects (was 0.3.0)
Every odds, opportunity, and reference-list row may now carry optional structured ref objects alongside the legacy flat fields. All additive — clients on older API versions just see None and behave identically.
- New models:
TeamRef,SportRef,EntityRef,Team OddsLine,EVOpportunity,ArbitrageOpportunity,MiddleOpportunity,LowHoldOpportunity— gainhome,away,sport_ref,league_ref,market_ref,sportsbook_refArbitrageLeggainssportsbook_refClosingOddsLinegainsmarket_ref+sportsbook_refClosingSnapshotgainshome,away,sport_ref,league_refSport,League,Sportsbook,Marketgainnumerical_idEventgainshome,away,sport_ref,league_ref
TeamRef metadata (was 0.3.1)
TeamRef and the Team reference shape gain five optional metadata fields:
logo— full CDN URL (~93% coverage)city,mascot,conference,division
All default to None. Unmapped rows omit the field rather than emitting null.
Repo / packaging hygiene
- Add
LICENSE(MIT) andSECURITY.md(hello@sharpapi.io) - Author email updated
support@→hello@ - Tighten the sdist via
[tool.hatch.build.targets.sdist]so.github/workflow YAML no longer ships to PyPI - Drop
tests/from the repo (kept locally for development); CI gate is now lint + typecheck across Python 3.10 → 3.13
Compatibility
No existing field was renamed, retyped, or removed. Code on 0.2.x continues to work.
v0.2.5
Highlights
Three releases worth of work since v0.2.2 — coverage parity with the REST API, full error-code registry, and Bearer auth.
feat: Bearer token auth
- New
auth_method: Literal['x-api-key', 'bearer'] = 'x-api-key'kwarg onSharpAPI+AsyncSharpAPI auth_method='bearer'sendsAuthorization: Bearer <key>instead ofX-API-Key- Useful for IAM/SSO setups and proxies that strip custom headers
- SSE intentionally unchanged (EventSource can't set headers)
feat: Endpoint coverage parity
Odds.closing(event_id, sportsbook=None)→GET /odds/closing(Pro+ closing-line snapshots for CLV)Events.markets(event_id)→GET /events/{event_id}/markets- New
Keysnamespace:list(),create(name),revoke(key_id),rotate(key_id)→/account/keys - Sync (
SharpAPI) and async (AsyncSharpAPI) parity throughout - New models:
ClosingSnapshot,ClosingOddsLine,Market,APIKey
fix: Honor SSE retry: hint
- SSE reconnect honours the server's
retry:hint (3s default) for the first 3 attempts - Falls back to exponential backoff (anchored on the hint, capped at 30s) after sustained failures
- Resets backoff after a graceful reconnect
feat: Full error code registry
- All 19 HTTP + 6 WebSocket-frame error codes from the canonical
pkg/errcodesGo package ERROR_CODE_DESCRIPTIONS,ERROR_CODE_TO_EXCEPTIONlookup mapscanonical_code()helper resolves deprecated aliases (bad_request,invalid_request→validation_error)
Compatibility
All additions; existing code keeps working unchanged. Default behaviour (no auth_method arg, etc.) is identical to v0.2.2.
v0.2.2
Retry + Python 3.10+ floor
New
- Sync and async clients now retry transient upstream failures (502/503/504 or connect/read errors) up to 3 times with full-jitter exponential backoff (500ms base → 4s cap). Shields SDK users from brief API-server restart windows. See SHA-1994.
Breaking
- Dropped Python 3.9 support. 3.9 reached EOL 2025-10. The package had declared 3.9 support but
models.pyuses PEP 604 union syntax (int | float) which Pydantic evaluates at runtime and which has always failed on 3.9. Requires Python 3.10+.
Internal
USER_AGENTbumped tosharpapi-python/0.2.2.
v0.2.1
Fixed
- Removed
events.search()— the/api/v1/events/searchendpoint is not implemented on the server, so this call always returned a 404. Useevents.list(sport=..., league=...)for filtered listings instead. The method will return when the server adds the endpoint.
v0.2.0
What's Changed
- Canonical field names — EVOpportunity model now uses the canonical API field names as attributes:
ev_percent→ev_percentagetrue_probability→fair_probabilitydevig_book→sharp_bookkelly_fraction→kelly_percent
- Backwards compatible — Pydantic
AliasChoicesaccepts both old and new field names from API responses - Removed unused import, bumped user agent string