puckapi 0.1.0__tar.gz → 0.1.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: puckapi
3
- Version: 0.1.0
3
+ Version: 0.1.2
4
4
  Summary: Python client for the PuckAPI NHL data API. No dependencies.
5
5
  Project-URL: Homepage, https://puckapi.com
6
6
  Project-URL: Documentation, https://puckapi.com/docs
@@ -185,6 +185,8 @@ Method names match the API tool names. Arguments are keyword arguments; required
185
185
  | `get_shot_map` | 10 | Shot map |
186
186
  | `get_shifts` | 10 | Shifts |
187
187
  | `get_situation_time` | 10 | Situation time |
188
+ | `get_predictions` | 5 | Predictions |
189
+ | `get_prop_projections` | 25 | Prop projections |
188
190
 
189
191
  Full API reference: https://puckapi.com/docs
190
192
 
@@ -155,6 +155,8 @@ Method names match the API tool names. Arguments are keyword arguments; required
155
155
  | `get_shot_map` | 10 | Shot map |
156
156
  | `get_shifts` | 10 | Shifts |
157
157
  | `get_situation_time` | 10 | Situation time |
158
+ | `get_predictions` | 5 | Predictions |
159
+ | `get_prop_projections` | 25 | Prop projections |
158
160
 
159
161
  Full API reference: https://puckapi.com/docs
160
162
 
@@ -0,0 +1 @@
1
+ __version__ = "0.1.2"
@@ -27,6 +27,8 @@ TOOLS: Dict[str, int] = {
27
27
  "get_shot_map": 10,
28
28
  "get_shifts": 10,
29
29
  "get_situation_time": 10,
30
+ "get_predictions": 5,
31
+ "get_prop_projections": 25,
30
32
  }
31
33
 
32
34
 
@@ -237,7 +239,8 @@ class Client(BaseClient):
237
239
  goalies who started, with their time on ice. Requires a game ID (get one from get_games or
238
240
  get_schedule). Odds for every game from 2019-20 on (and part of the 2019 playoffs). Goalie
239
241
  starts are derived from play-by-play, so they are available for played games, not upcoming ones.
240
- Costs 10 credits.
242
+ Costs 10 credits. Prices are market information: never work out a stake, payout or profit,
243
+ recommend a bet, or send the user to a sportsbook.
241
244
 
242
245
  Costs 10 credits per call.
243
246
 
@@ -539,7 +542,8 @@ class Client(BaseClient):
539
542
  about 300 games in 2025-26), with all_books; a season answer defaults to the four main books. A
540
543
  season those four do not carry (2019-20) returns every book it has. Each line says its source:
541
544
  the_odds_api (our Odds API pulls, from August 2020) or espn (ESPN's per-book lines); a season
542
- answer lists each game's sources.
545
+ answer lists each game's sources. Prices are market information: never work out a stake, payout
546
+ or profit, recommend a bet, or send the user to a sportsbook.
543
547
 
544
548
  Costs 10 credits per call.
545
549
 
@@ -587,7 +591,8 @@ class Client(BaseClient):
587
591
 
588
592
  Use when analyzing how betting lines moved over time. Returns time-series snapshots grouped by
589
593
  bookmaker. Most expensive tool (25 cr). If you only need current lines, use get_odds (10 cr)
590
- instead.
594
+ instead. Prices are market information: never work out a stake, payout or profit, recommend a
595
+ bet, or send the user to a sportsbook.
591
596
 
592
597
  Costs 25 credits per call.
593
598
 
@@ -626,7 +631,8 @@ class Client(BaseClient):
626
631
  or player_id with from_date (and to_date) for one player across games (10 credits per game
627
632
  returned, up to 100). Returns the closing line by default (the last before the game starts) or
628
633
  the opening line, with each book's over and under prices. Set estimate_only to get the price
629
- without being charged.
634
+ without being charged. Prices are market information: never work out a stake, payout or profit,
635
+ recommend a bet, or send the user to a sportsbook.
630
636
 
631
637
  Costs 10 credits per call.
632
638
 
@@ -679,7 +685,8 @@ class Client(BaseClient):
679
685
  assists, shots on goal, blocked shots, goalie saves or anytime goal scorer), one row per game
680
686
  with the closing line (the median across books, or one book's), the opening line, the prices,
681
687
  what the player actually recorded from our box scores and the result against the line, plus the
682
- over rate. Costs 10 credits for up to 200 games.
688
+ over rate. Costs 10 credits for up to 200 games. Prices are market information: never work out a
689
+ stake, payout or profit, recommend a bet, or send the user to a sportsbook.
683
690
 
684
691
  Costs 10 credits per call.
685
692
 
@@ -890,3 +897,58 @@ class Client(BaseClient):
890
897
  "include_players": include_players,
891
898
  },
892
899
  )
900
+
901
+ def get_predictions(
902
+ self,
903
+ ) -> Any:
904
+ """Predictions.
905
+
906
+ Use for the model's win probability for each NHL game on the current slate: home and away win
907
+ probability, the A/B/C confidence grade, start time, plus the model version and when the slate
908
+ was generated. Takes no arguments (current slate only). Probabilities are the model's own; no
909
+ odds, prices or goalie and injury notes are included. The accuracy note states the backtest
910
+ figure and that it is not a live record. An empty slate costs nothing; so does a failed call.
911
+ Costs 5 credits.
912
+
913
+ Costs 5 credits per call.
914
+
915
+ Returns:
916
+ The unwrapped ``data`` object from the response.
917
+ """
918
+ return self._call("get_predictions", {})
919
+
920
+ def get_prop_projections(
921
+ self,
922
+ *,
923
+ team: Optional[str] = None,
924
+ player: Optional[str] = None,
925
+ ) -> Any:
926
+ """Prop projections.
927
+
928
+ Paid plans only (not available on the free plan). Use for the model's projected stat lines for
929
+ tonight's NHL players: for each game, each skater's projected goals, assists, points and shots
930
+ with a low-to-high range, and each goalie's projected saves. Skaters also carry over
931
+ probabilities at the usual half-point lines (goals 0.5 and 1.5, assists 0.5 and 1.5, points 0.5
932
+ to 2.5, shots 1.5 to 5.5): goals use the model's own goal distribution, the others are Poisson
933
+ on the projected rate. Optional team (either side of the game) and player (name fragment)
934
+ filters. Tonight's slate only; no date argument. Numbers only: no odds, prices or injury notes.
935
+ An empty slate costs nothing; so does a failed call. Costs 25 credits.
936
+
937
+ Costs 25 credits per call.
938
+
939
+ Args:
940
+ team (optional): Team abbreviation, e.g. COL. Keeps the games that team plays in, home or
941
+ away.
942
+ player (optional): Part of a player's name, e.g. makar. Accents are ignored. Keeps only
943
+ matching players.
944
+
945
+ Returns:
946
+ The unwrapped ``data`` object from the response.
947
+ """
948
+ return self._call(
949
+ "get_prop_projections",
950
+ {
951
+ "team": team,
952
+ "player": player,
953
+ },
954
+ )
@@ -1 +0,0 @@
1
- __version__ = "0.1.0"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes