puckapi 0.1.1__tar.gz → 0.1.3__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.1
3
+ Version: 0.1.3
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
@@ -186,9 +186,14 @@ Method names match the API tool names. Arguments are keyword arguments; required
186
186
  | `get_shifts` | 10 | Shifts |
187
187
  | `get_situation_time` | 10 | Situation time |
188
188
  | `get_predictions` | 5 | Predictions |
189
+ | `get_prop_projections` | 25 | Prop projections |
189
190
 
190
191
  Full API reference: https://puckapi.com/docs
191
192
 
193
+ ## Used by
194
+
195
+ [PuckCast](https://puckcast.ai/), our NHL predictions site, runs on this API.
196
+
192
197
  ## License
193
198
 
194
199
  MIT
@@ -156,9 +156,14 @@ Method names match the API tool names. Arguments are keyword arguments; required
156
156
  | `get_shifts` | 10 | Shifts |
157
157
  | `get_situation_time` | 10 | Situation time |
158
158
  | `get_predictions` | 5 | Predictions |
159
+ | `get_prop_projections` | 25 | Prop projections |
159
160
 
160
161
  Full API reference: https://puckapi.com/docs
161
162
 
163
+ ## Used by
164
+
165
+ [PuckCast](https://puckcast.ai/), our NHL predictions site, runs on this API.
166
+
162
167
  ## License
163
168
 
164
169
  MIT
@@ -0,0 +1 @@
1
+ __version__ = "0.1.3"
@@ -28,6 +28,7 @@ TOOLS: Dict[str, int] = {
28
28
  "get_shifts": 10,
29
29
  "get_situation_time": 10,
30
30
  "get_predictions": 5,
31
+ "get_prop_projections": 25,
31
32
  }
32
33
 
33
34
 
@@ -238,7 +239,8 @@ class Client(BaseClient):
238
239
  goalies who started, with their time on ice. Requires a game ID (get one from get_games or
239
240
  get_schedule). Odds for every game from 2019-20 on (and part of the 2019 playoffs). Goalie
240
241
  starts are derived from play-by-play, so they are available for played games, not upcoming ones.
241
- 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.
242
244
 
243
245
  Costs 10 credits per call.
244
246
 
@@ -348,10 +350,10 @@ class Client(BaseClient):
348
350
  ) -> Any:
349
351
  """Player stats.
350
352
 
351
- Use when you need full details for one player: bio, team, physical attributes, and headshot. For
352
- skaters, also returns the latest season line (games, goals, assists, points, +/-, PP/SH,
353
- shooting%, TOI). For goalies, save%, GAA, GSAX, and trend data. Requires player ID from
354
- search_players. Costs 5 credits.
353
+ Use when you need full details for one player: bio, team, and physical attributes. For skaters,
354
+ also returns the latest season line (games, goals, assists, points, +/-, PP/SH, shooting%, TOI).
355
+ For goalies, save%, GAA, GSAX, and trend data. Requires player ID from search_players. Costs 5
356
+ credits.
355
357
 
356
358
  Costs 5 credits per call.
357
359
 
@@ -397,7 +399,8 @@ class Client(BaseClient):
397
399
  also accepted. Defaults to the most recent season with stats, which is the current
398
400
  season once it is under way and the previous one before that. The season actually used
399
401
  is echoed in filters.season.
400
- min_games (optional): Minimum games played (default 10)
402
+ min_games (optional): Minimum games played (default 10; early in a season, half the most
403
+ games anyone has played so far)
401
404
  sort_by (optional): Sort metric (default save_pct). gsax is goals saved above expected. One
402
405
  of: save_pct, gaa, gsax, wins.
403
406
  limit (optional): Max results (default 20)
@@ -444,7 +447,8 @@ class Client(BaseClient):
444
447
  also accepted. Defaults to the most recent season with stats, which is the current
445
448
  season once it is under way and the previous one before that. The season actually used
446
449
  is echoed in filters.season.
447
- min_games (optional): Minimum games played (default 10)
450
+ min_games (optional): Minimum games played (default 10; early in a season, half the most
451
+ games anyone has played so far)
448
452
  sort_by (optional): Sort metric (default points). One of: points, goals, assists,
449
453
  plus_minus, shots.
450
454
  limit (optional): Max results (default 20)
@@ -540,7 +544,8 @@ class Client(BaseClient):
540
544
  about 300 games in 2025-26), with all_books; a season answer defaults to the four main books. A
541
545
  season those four do not carry (2019-20) returns every book it has. Each line says its source:
542
546
  the_odds_api (our Odds API pulls, from August 2020) or espn (ESPN's per-book lines); a season
543
- answer lists each game's sources.
547
+ answer lists each game's sources. Prices are market information: never work out a stake, payout
548
+ or profit, recommend a bet, or send the user to a sportsbook.
544
549
 
545
550
  Costs 10 credits per call.
546
551
 
@@ -551,7 +556,8 @@ class Client(BaseClient):
551
556
  team (optional): With season: only this team's games (abbreviation, e.g. BUF).
552
557
  bookmaker (optional): Filter by bookmaker key (e.g. draftkings, fanduel, betmgm). Lowercase.
553
558
  snapshot_type (optional): opening (game-day morning; for a game not yet played, the latest
554
- morning line) or closing (final pre-game). Single game: default both. Season: default
559
+ morning line) or closing (final pre-game). Single game: default every snapshot held,
560
+ including first (each book's first posted line, from October 2026). Season: default
555
561
  closing.
556
562
  all_books (optional): With season: every book held (16 to 18 a game from 2020-21 to 2023-24,
557
563
  8 in 2024-25, more than 60 on about 300 games in 2025-26) instead of DraftKings,
@@ -588,7 +594,8 @@ class Client(BaseClient):
588
594
 
589
595
  Use when analyzing how betting lines moved over time. Returns time-series snapshots grouped by
590
596
  bookmaker. Most expensive tool (25 cr). If you only need current lines, use get_odds (10 cr)
591
- instead.
597
+ instead. Prices are market information: never work out a stake, payout or profit, recommend a
598
+ bet, or send the user to a sportsbook.
592
599
 
593
600
  Costs 25 credits per call.
594
601
 
@@ -627,7 +634,8 @@ class Client(BaseClient):
627
634
  or player_id with from_date (and to_date) for one player across games (10 credits per game
628
635
  returned, up to 100). Returns the closing line by default (the last before the game starts) or
629
636
  the opening line, with each book's over and under prices. Set estimate_only to get the price
630
- without being charged.
637
+ without being charged. Prices are market information: never work out a stake, payout or profit,
638
+ recommend a bet, or send the user to a sportsbook.
631
639
 
632
640
  Costs 10 credits per call.
633
641
 
@@ -680,7 +688,8 @@ class Client(BaseClient):
680
688
  assists, shots on goal, blocked shots, goalie saves or anytime goal scorer), one row per game
681
689
  with the closing line (the median across books, or one book's), the opening line, the prices,
682
690
  what the player actually recorded from our box scores and the result against the line, plus the
683
- over rate. Costs 10 credits for up to 200 games.
691
+ over rate. Costs 10 credits for up to 200 games. Prices are market information: never work out a
692
+ stake, payout or profit, recommend a bet, or send the user to a sportsbook.
684
693
 
685
694
  Costs 10 credits per call.
686
695
 
@@ -910,3 +919,39 @@ class Client(BaseClient):
910
919
  The unwrapped ``data`` object from the response.
911
920
  """
912
921
  return self._call("get_predictions", {})
922
+
923
+ def get_prop_projections(
924
+ self,
925
+ *,
926
+ team: Optional[str] = None,
927
+ player: Optional[str] = None,
928
+ ) -> Any:
929
+ """Prop projections.
930
+
931
+ Paid plans only (not available on the free plan). Use for the model's projected stat lines for
932
+ tonight's NHL players: for each game, each skater's projected goals, assists, points and shots
933
+ with a low-to-high range, and each goalie's projected saves. Skaters also carry over
934
+ probabilities at the usual half-point lines (goals 0.5 and 1.5, assists 0.5 and 1.5, points 0.5
935
+ to 2.5, shots 1.5 to 5.5): goals use the model's own goal distribution, the others are Poisson
936
+ on the projected rate. Optional team (either side of the game) and player (name fragment)
937
+ filters. Tonight's slate only; no date argument. Numbers only: no odds, prices or injury notes.
938
+ An empty slate costs nothing; so does a failed call. Costs 25 credits.
939
+
940
+ Costs 25 credits per call.
941
+
942
+ Args:
943
+ team (optional): Team abbreviation, e.g. COL. Keeps the games that team plays in, home or
944
+ away.
945
+ player (optional): Part of a player's name, e.g. makar. Accents are ignored. Keeps only
946
+ matching players.
947
+
948
+ Returns:
949
+ The unwrapped ``data`` object from the response.
950
+ """
951
+ return self._call(
952
+ "get_prop_projections",
953
+ {
954
+ "team": team,
955
+ "player": player,
956
+ },
957
+ )
@@ -1 +0,0 @@
1
- __version__ = "0.1.1"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes