sharpapi 0.4.0__tar.gz → 0.4.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,6 +2,19 @@
2
2
 
3
3
  All notable changes to the `sharpapi` Python SDK are documented here.
4
4
 
5
+ ## 0.4.1 — 2026-06-02
6
+
7
+ ### Added — structured `team_side` + `market_segment` (issue #76 / #689)
8
+
9
+ - `OddsLine`, `EVOpportunity`, and `ClosingOddsLine` gain two optional fields:
10
+ - `team_side` — the raw structured side (`"home"` | `"away"` | `"draw"`)
11
+ decomposed out of the compound `selection_type` vocabulary. Prefer this over
12
+ parsing compound prefixes like `"home_over"`.
13
+ - `market_segment` — the canonical contest slice (`"full_game"`, `"1st_half"`,
14
+ `"1st_5_innings"`, ...).
15
+ - Both are additive and default to `None`; existing code is unaffected. The API
16
+ continues to emit the compound `selection_type` for back-compat.
17
+
5
18
  ## 0.4.0 — 2026-06-02
6
19
 
7
20
  ### Changed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sharpapi
3
- Version: 0.4.0
3
+ Version: 0.4.1
4
4
  Summary: Official Python SDK for the SharpAPI real-time sports betting odds API
5
5
  Project-URL: Homepage, https://sharpapi.io
6
6
  Project-URL: Documentation, https://docs.sharpapi.io/sdks/python
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "sharpapi"
7
- version = "0.4.0"
7
+ version = "0.4.1"
8
8
  description = "Official Python SDK for the SharpAPI real-time sports betting odds API"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -214,6 +214,12 @@ class OddsLine(BaseModel):
214
214
  market_type: str
215
215
  selection: str
216
216
  selection_type: str | None = None
217
+ # Structured side/segment axes (issue #76 / #689). team_side is the raw
218
+ # "home"|"away"|"draw" decomposed out of the compound selection_type vocab;
219
+ # market_segment is the contest slice ("full_game", "1st_half", ...). Both
220
+ # optional + additive — absent on rows the adapter didn't stamp.
221
+ team_side: str | None = None
222
+ market_segment: str | None = None
217
223
  odds_american: int | float
218
224
  odds_decimal: float
219
225
  probability: float
@@ -293,6 +299,9 @@ class EVOpportunity(BaseModel):
293
299
  detected_at: str | None = None
294
300
  external_event_id: str | None = None
295
301
  selection_id: str | None = None
302
+ # Structured side/segment axes (issue #76 / #689), additive + optional.
303
+ team_side: str | None = None
304
+ market_segment: str | None = None
296
305
  # Optional structured refs (additive, non-breaking).
297
306
  home: TeamRef | None = None
298
307
  away: TeamRef | None = None
@@ -572,6 +581,9 @@ class ClosingOddsLine(BaseModel):
572
581
  market_type: str
573
582
  selection: str
574
583
  selection_type: str | None = None
584
+ # Structured side/segment axes (issue #76 / #689), additive + optional.
585
+ team_side: str | None = None
586
+ market_segment: str | None = None
575
587
  odds_american: int | float
576
588
  odds_decimal: float
577
589
  line: float | None = None
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes