puckapi 0.1.0__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.
- puckapi-0.1.0/.gitignore +6 -0
- puckapi-0.1.0/LICENSE +21 -0
- puckapi-0.1.0/PKG-INFO +193 -0
- puckapi-0.1.0/README.md +163 -0
- puckapi-0.1.0/pyproject.toml +50 -0
- puckapi-0.1.0/src/puckapi/__init__.py +25 -0
- puckapi-0.1.0/src/puckapi/_core.py +307 -0
- puckapi-0.1.0/src/puckapi/_version.py +1 -0
- puckapi-0.1.0/src/puckapi/client.py +892 -0
- puckapi-0.1.0/src/puckapi/py.typed +0 -0
- puckapi-0.1.0/tests/test_client.py +242 -0
puckapi-0.1.0/.gitignore
ADDED
puckapi-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 PuckAPI
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
puckapi-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: puckapi
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Python client for the PuckAPI NHL data API. No dependencies.
|
|
5
|
+
Project-URL: Homepage, https://puckapi.com
|
|
6
|
+
Project-URL: Documentation, https://puckapi.com/docs
|
|
7
|
+
Project-URL: Repository, https://github.com/noahowsh/puckapi
|
|
8
|
+
Project-URL: Sign up, https://puckapi.com/signup
|
|
9
|
+
Author-email: PuckAPI <support@puckapi.com>
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: api-client,betting,nhl,odds,player-props,puckapi,sports-data
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
23
|
+
Classifier: Typing :: Typed
|
|
24
|
+
Requires-Python: >=3.9
|
|
25
|
+
Provides-Extra: pandas
|
|
26
|
+
Requires-Dist: pandas>=1.5; extra == 'pandas'
|
|
27
|
+
Provides-Extra: test
|
|
28
|
+
Requires-Dist: pytest>=7; extra == 'test'
|
|
29
|
+
Description-Content-Type: text/markdown
|
|
30
|
+
|
|
31
|
+
# PuckAPI for Python
|
|
32
|
+
|
|
33
|
+
Python client for the [PuckAPI](https://puckapi.com) NHL data API. It has no required dependencies (standard library only) and works on Python 3.9 and newer. Pandas is optional.
|
|
34
|
+
|
|
35
|
+
## Install
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
pip install puckapi
|
|
39
|
+
pip install "puckapi[pandas]" # only if you want DataFrames
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Set your key
|
|
43
|
+
|
|
44
|
+
Get a free key at https://puckapi.com/signup. Free accounts get 500 credits a month.
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
export PUCKAPI_API_KEY=your_key_here
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
```python
|
|
51
|
+
from puckapi import Client
|
|
52
|
+
|
|
53
|
+
client = Client() # reads PUCKAPI_API_KEY
|
|
54
|
+
client = Client(api_key="your_key") # or pass it in
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Examples
|
|
58
|
+
|
|
59
|
+
### 1. Closing odds for a game
|
|
60
|
+
|
|
61
|
+
`get_odds` returns one row per bookmaker and snapshot. Ask for the closing snapshot and load it into pandas.
|
|
62
|
+
|
|
63
|
+
```python
|
|
64
|
+
from puckapi import Client, to_dataframe
|
|
65
|
+
|
|
66
|
+
client = Client()
|
|
67
|
+
|
|
68
|
+
odds = client.get_odds(game_id="2026020080", snapshot_type="closing")
|
|
69
|
+
df = to_dataframe(odds, key="odds")
|
|
70
|
+
print(df[["bookmaker", "mlHome", "mlAway", "total"]])
|
|
71
|
+
print("credits left:", client.last_credits_remaining)
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### 2. Who played the most minutes (shift data)
|
|
75
|
+
|
|
76
|
+
`get_shifts` returns every shift for every skater in a game, with start and end times.
|
|
77
|
+
|
|
78
|
+
```python
|
|
79
|
+
from puckapi import Client
|
|
80
|
+
|
|
81
|
+
client = Client()
|
|
82
|
+
|
|
83
|
+
shifts = client.get_shifts(game_id="2026020080", team="TOR")
|
|
84
|
+
busiest = sorted(shifts["players"], key=lambda p: p["shift_seconds"], reverse=True)[:5]
|
|
85
|
+
for p in busiest:
|
|
86
|
+
print(p["name"], p["shift_count"], "shifts,", p["shift_seconds"] // 60, "min")
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### 3. A player's recent games
|
|
90
|
+
|
|
91
|
+
Find a player id with `search_players`, then pull the game log.
|
|
92
|
+
|
|
93
|
+
```python
|
|
94
|
+
from puckapi import Client
|
|
95
|
+
|
|
96
|
+
client = Client()
|
|
97
|
+
|
|
98
|
+
match = client.search_players("Matthews", limit=1)["players"][0]
|
|
99
|
+
log = client.get_player_game_log(match["id"], season="20252026", limit=5)
|
|
100
|
+
print(match["name"], log)
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Credits
|
|
104
|
+
|
|
105
|
+
Every method returns the `data` object from the response. After each call, `client.last_credits_used` and `client.last_credits_remaining` hold the counters from the `X-Credits-Used` and `X-Credits-Remaining` headers. Methods that take `estimate_only=True` return the price of a call without running or charging it.
|
|
106
|
+
|
|
107
|
+
## Pandas
|
|
108
|
+
|
|
109
|
+
```python
|
|
110
|
+
from puckapi import to_dataframe
|
|
111
|
+
|
|
112
|
+
df = to_dataframe(data) # finds the main list in the response
|
|
113
|
+
df = to_dataframe(data, key="rows") # or name the list yourself
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Nested fields become dotted columns. Install pandas separately or with `pip install "puckapi[pandas]"`.
|
|
117
|
+
|
|
118
|
+
## Errors
|
|
119
|
+
|
|
120
|
+
Every error is an `APIError` subclass, with the server's message and the HTTP status.
|
|
121
|
+
|
|
122
|
+
| Exception | Status | Meaning |
|
|
123
|
+
| --- | --- | --- |
|
|
124
|
+
| `AuthError` | 401 | Missing, invalid or revoked key |
|
|
125
|
+
| `InsufficientCreditsError` | 402 | Not enough credits for the call |
|
|
126
|
+
| `NotFoundError` | 404 | The id or name does not exist |
|
|
127
|
+
| `RateLimitError` | 429 | Too many requests; has `.retry_after` when the server sends it |
|
|
128
|
+
| `APIError` | 400, 5xx | Bad arguments or a server problem |
|
|
129
|
+
| `APIConnectionError` | none | No response (network or timeout) |
|
|
130
|
+
|
|
131
|
+
```python
|
|
132
|
+
from puckapi import Client, APIError, InsufficientCreditsError, RateLimitError
|
|
133
|
+
|
|
134
|
+
client = Client()
|
|
135
|
+
try:
|
|
136
|
+
data = client.list_teams()
|
|
137
|
+
except InsufficientCreditsError:
|
|
138
|
+
print("Out of credits, top up at https://puckapi.com")
|
|
139
|
+
except RateLimitError as exc:
|
|
140
|
+
print("Slow down, retry after", exc.retry_after)
|
|
141
|
+
except APIError as exc:
|
|
142
|
+
print(exc.status_code, exc.message)
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
The client retries 429 and 5xx responses and connection failures up to 3 times with backoff, and honors `Retry-After`. Set `Client(max_retries=0)` to turn that off.
|
|
146
|
+
|
|
147
|
+
If you see `CERTIFICATE_VERIFY_FAILED` on a python.org install for macOS, run the "Install Certificates.command" script that came with Python, or `pip install certifi` (the client uses it when present).
|
|
148
|
+
|
|
149
|
+
## Options
|
|
150
|
+
|
|
151
|
+
```python
|
|
152
|
+
Client(
|
|
153
|
+
api_key=None, # defaults to $PUCKAPI_API_KEY
|
|
154
|
+
base_url="https://mcp.puckapi.com", # point at another host
|
|
155
|
+
timeout=60.0, # seconds per request
|
|
156
|
+
max_retries=3,
|
|
157
|
+
)
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
`client.call("tool_name", {"arg": "value"})` calls any tool by name, which helps when the API adds a tool before this package does.
|
|
161
|
+
|
|
162
|
+
## Tools
|
|
163
|
+
|
|
164
|
+
Method names match the API tool names. Arguments are keyword arguments; required ones can also be passed positionally. Each method's docstring lists its arguments (`help(client.list_teams)`).
|
|
165
|
+
|
|
166
|
+
| Method | Credits | What it does |
|
|
167
|
+
| --- | --- | --- |
|
|
168
|
+
| `get_standings` | 2 | Standings |
|
|
169
|
+
| `get_team_stats` | 5 | Team stats |
|
|
170
|
+
| `list_teams` | 1 | List teams |
|
|
171
|
+
| `get_games` | 5 | Games |
|
|
172
|
+
| `get_schedule` | 2 | Schedule |
|
|
173
|
+
| `get_game_detail` | 10 | Game detail |
|
|
174
|
+
| `get_head_to_head` | 10 | Head to head |
|
|
175
|
+
| `search_players` | 2 | Search players |
|
|
176
|
+
| `get_player_stats` | 5 | Player stats |
|
|
177
|
+
| `get_goalie_stats` | 5 | Goalie stats |
|
|
178
|
+
| `get_skater_season_stats` | 5 | Skater season stats |
|
|
179
|
+
| `get_player_game_log` | 5 | Player game log |
|
|
180
|
+
| `get_odds` | 10 | Odds |
|
|
181
|
+
| `get_line_movement` | 25 | Line movement |
|
|
182
|
+
| `get_player_props` | 10 | Player props |
|
|
183
|
+
| `get_prop_history` | 10 | Prop history |
|
|
184
|
+
| `get_plays` | 10 | Plays |
|
|
185
|
+
| `get_shot_map` | 10 | Shot map |
|
|
186
|
+
| `get_shifts` | 10 | Shifts |
|
|
187
|
+
| `get_situation_time` | 10 | Situation time |
|
|
188
|
+
|
|
189
|
+
Full API reference: https://puckapi.com/docs
|
|
190
|
+
|
|
191
|
+
## License
|
|
192
|
+
|
|
193
|
+
MIT
|
puckapi-0.1.0/README.md
ADDED
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
# PuckAPI for Python
|
|
2
|
+
|
|
3
|
+
Python client for the [PuckAPI](https://puckapi.com) NHL data API. It has no required dependencies (standard library only) and works on Python 3.9 and newer. Pandas is optional.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install puckapi
|
|
9
|
+
pip install "puckapi[pandas]" # only if you want DataFrames
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Set your key
|
|
13
|
+
|
|
14
|
+
Get a free key at https://puckapi.com/signup. Free accounts get 500 credits a month.
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
export PUCKAPI_API_KEY=your_key_here
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
```python
|
|
21
|
+
from puckapi import Client
|
|
22
|
+
|
|
23
|
+
client = Client() # reads PUCKAPI_API_KEY
|
|
24
|
+
client = Client(api_key="your_key") # or pass it in
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Examples
|
|
28
|
+
|
|
29
|
+
### 1. Closing odds for a game
|
|
30
|
+
|
|
31
|
+
`get_odds` returns one row per bookmaker and snapshot. Ask for the closing snapshot and load it into pandas.
|
|
32
|
+
|
|
33
|
+
```python
|
|
34
|
+
from puckapi import Client, to_dataframe
|
|
35
|
+
|
|
36
|
+
client = Client()
|
|
37
|
+
|
|
38
|
+
odds = client.get_odds(game_id="2026020080", snapshot_type="closing")
|
|
39
|
+
df = to_dataframe(odds, key="odds")
|
|
40
|
+
print(df[["bookmaker", "mlHome", "mlAway", "total"]])
|
|
41
|
+
print("credits left:", client.last_credits_remaining)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### 2. Who played the most minutes (shift data)
|
|
45
|
+
|
|
46
|
+
`get_shifts` returns every shift for every skater in a game, with start and end times.
|
|
47
|
+
|
|
48
|
+
```python
|
|
49
|
+
from puckapi import Client
|
|
50
|
+
|
|
51
|
+
client = Client()
|
|
52
|
+
|
|
53
|
+
shifts = client.get_shifts(game_id="2026020080", team="TOR")
|
|
54
|
+
busiest = sorted(shifts["players"], key=lambda p: p["shift_seconds"], reverse=True)[:5]
|
|
55
|
+
for p in busiest:
|
|
56
|
+
print(p["name"], p["shift_count"], "shifts,", p["shift_seconds"] // 60, "min")
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### 3. A player's recent games
|
|
60
|
+
|
|
61
|
+
Find a player id with `search_players`, then pull the game log.
|
|
62
|
+
|
|
63
|
+
```python
|
|
64
|
+
from puckapi import Client
|
|
65
|
+
|
|
66
|
+
client = Client()
|
|
67
|
+
|
|
68
|
+
match = client.search_players("Matthews", limit=1)["players"][0]
|
|
69
|
+
log = client.get_player_game_log(match["id"], season="20252026", limit=5)
|
|
70
|
+
print(match["name"], log)
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Credits
|
|
74
|
+
|
|
75
|
+
Every method returns the `data` object from the response. After each call, `client.last_credits_used` and `client.last_credits_remaining` hold the counters from the `X-Credits-Used` and `X-Credits-Remaining` headers. Methods that take `estimate_only=True` return the price of a call without running or charging it.
|
|
76
|
+
|
|
77
|
+
## Pandas
|
|
78
|
+
|
|
79
|
+
```python
|
|
80
|
+
from puckapi import to_dataframe
|
|
81
|
+
|
|
82
|
+
df = to_dataframe(data) # finds the main list in the response
|
|
83
|
+
df = to_dataframe(data, key="rows") # or name the list yourself
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Nested fields become dotted columns. Install pandas separately or with `pip install "puckapi[pandas]"`.
|
|
87
|
+
|
|
88
|
+
## Errors
|
|
89
|
+
|
|
90
|
+
Every error is an `APIError` subclass, with the server's message and the HTTP status.
|
|
91
|
+
|
|
92
|
+
| Exception | Status | Meaning |
|
|
93
|
+
| --- | --- | --- |
|
|
94
|
+
| `AuthError` | 401 | Missing, invalid or revoked key |
|
|
95
|
+
| `InsufficientCreditsError` | 402 | Not enough credits for the call |
|
|
96
|
+
| `NotFoundError` | 404 | The id or name does not exist |
|
|
97
|
+
| `RateLimitError` | 429 | Too many requests; has `.retry_after` when the server sends it |
|
|
98
|
+
| `APIError` | 400, 5xx | Bad arguments or a server problem |
|
|
99
|
+
| `APIConnectionError` | none | No response (network or timeout) |
|
|
100
|
+
|
|
101
|
+
```python
|
|
102
|
+
from puckapi import Client, APIError, InsufficientCreditsError, RateLimitError
|
|
103
|
+
|
|
104
|
+
client = Client()
|
|
105
|
+
try:
|
|
106
|
+
data = client.list_teams()
|
|
107
|
+
except InsufficientCreditsError:
|
|
108
|
+
print("Out of credits, top up at https://puckapi.com")
|
|
109
|
+
except RateLimitError as exc:
|
|
110
|
+
print("Slow down, retry after", exc.retry_after)
|
|
111
|
+
except APIError as exc:
|
|
112
|
+
print(exc.status_code, exc.message)
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
The client retries 429 and 5xx responses and connection failures up to 3 times with backoff, and honors `Retry-After`. Set `Client(max_retries=0)` to turn that off.
|
|
116
|
+
|
|
117
|
+
If you see `CERTIFICATE_VERIFY_FAILED` on a python.org install for macOS, run the "Install Certificates.command" script that came with Python, or `pip install certifi` (the client uses it when present).
|
|
118
|
+
|
|
119
|
+
## Options
|
|
120
|
+
|
|
121
|
+
```python
|
|
122
|
+
Client(
|
|
123
|
+
api_key=None, # defaults to $PUCKAPI_API_KEY
|
|
124
|
+
base_url="https://mcp.puckapi.com", # point at another host
|
|
125
|
+
timeout=60.0, # seconds per request
|
|
126
|
+
max_retries=3,
|
|
127
|
+
)
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
`client.call("tool_name", {"arg": "value"})` calls any tool by name, which helps when the API adds a tool before this package does.
|
|
131
|
+
|
|
132
|
+
## Tools
|
|
133
|
+
|
|
134
|
+
Method names match the API tool names. Arguments are keyword arguments; required ones can also be passed positionally. Each method's docstring lists its arguments (`help(client.list_teams)`).
|
|
135
|
+
|
|
136
|
+
| Method | Credits | What it does |
|
|
137
|
+
| --- | --- | --- |
|
|
138
|
+
| `get_standings` | 2 | Standings |
|
|
139
|
+
| `get_team_stats` | 5 | Team stats |
|
|
140
|
+
| `list_teams` | 1 | List teams |
|
|
141
|
+
| `get_games` | 5 | Games |
|
|
142
|
+
| `get_schedule` | 2 | Schedule |
|
|
143
|
+
| `get_game_detail` | 10 | Game detail |
|
|
144
|
+
| `get_head_to_head` | 10 | Head to head |
|
|
145
|
+
| `search_players` | 2 | Search players |
|
|
146
|
+
| `get_player_stats` | 5 | Player stats |
|
|
147
|
+
| `get_goalie_stats` | 5 | Goalie stats |
|
|
148
|
+
| `get_skater_season_stats` | 5 | Skater season stats |
|
|
149
|
+
| `get_player_game_log` | 5 | Player game log |
|
|
150
|
+
| `get_odds` | 10 | Odds |
|
|
151
|
+
| `get_line_movement` | 25 | Line movement |
|
|
152
|
+
| `get_player_props` | 10 | Player props |
|
|
153
|
+
| `get_prop_history` | 10 | Prop history |
|
|
154
|
+
| `get_plays` | 10 | Plays |
|
|
155
|
+
| `get_shot_map` | 10 | Shot map |
|
|
156
|
+
| `get_shifts` | 10 | Shifts |
|
|
157
|
+
| `get_situation_time` | 10 | Situation time |
|
|
158
|
+
|
|
159
|
+
Full API reference: https://puckapi.com/docs
|
|
160
|
+
|
|
161
|
+
## License
|
|
162
|
+
|
|
163
|
+
MIT
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling>=1.27"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "puckapi"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
description = "Python client for the PuckAPI NHL data API. No dependencies."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.9"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
license-files = ["LICENSE"]
|
|
13
|
+
authors = [{ name = "PuckAPI", email = "support@puckapi.com" }]
|
|
14
|
+
keywords = ["nhl", "sports-data", "api-client", "betting", "player-props", "odds", "puckapi"]
|
|
15
|
+
classifiers = [
|
|
16
|
+
"Development Status :: 4 - Beta",
|
|
17
|
+
"Intended Audience :: Developers",
|
|
18
|
+
"Operating System :: OS Independent",
|
|
19
|
+
"Programming Language :: Python :: 3",
|
|
20
|
+
"Programming Language :: Python :: 3.9",
|
|
21
|
+
"Programming Language :: Python :: 3.10",
|
|
22
|
+
"Programming Language :: Python :: 3.11",
|
|
23
|
+
"Programming Language :: Python :: 3.12",
|
|
24
|
+
"Programming Language :: Python :: 3.13",
|
|
25
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
26
|
+
"Typing :: Typed",
|
|
27
|
+
]
|
|
28
|
+
dependencies = []
|
|
29
|
+
|
|
30
|
+
[project.optional-dependencies]
|
|
31
|
+
pandas = ["pandas>=1.5"]
|
|
32
|
+
test = ["pytest>=7"]
|
|
33
|
+
|
|
34
|
+
[project.urls]
|
|
35
|
+
Homepage = "https://puckapi.com"
|
|
36
|
+
Documentation = "https://puckapi.com/docs"
|
|
37
|
+
Repository = "https://github.com/noahowsh/puckapi"
|
|
38
|
+
"Sign up" = "https://puckapi.com/signup"
|
|
39
|
+
|
|
40
|
+
[tool.hatch.version]
|
|
41
|
+
path = "src/puckapi/_version.py"
|
|
42
|
+
|
|
43
|
+
[tool.hatch.build.targets.wheel]
|
|
44
|
+
packages = ["src/puckapi"]
|
|
45
|
+
|
|
46
|
+
[tool.hatch.build.targets.sdist]
|
|
47
|
+
include = ["src", "tests", "README.md", "LICENSE", "pyproject.toml"]
|
|
48
|
+
|
|
49
|
+
[tool.pytest.ini_options]
|
|
50
|
+
testpaths = ["tests"]
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"""PuckAPI: Python client for the PuckAPI NHL data API."""
|
|
2
|
+
from ._core import (
|
|
3
|
+
APIConnectionError,
|
|
4
|
+
APIError,
|
|
5
|
+
AuthError,
|
|
6
|
+
InsufficientCreditsError,
|
|
7
|
+
NotFoundError,
|
|
8
|
+
RateLimitError,
|
|
9
|
+
to_dataframe,
|
|
10
|
+
)
|
|
11
|
+
from ._version import __version__
|
|
12
|
+
from .client import TOOLS, Client
|
|
13
|
+
|
|
14
|
+
__all__ = [
|
|
15
|
+
"APIConnectionError",
|
|
16
|
+
"APIError",
|
|
17
|
+
"AuthError",
|
|
18
|
+
"Client",
|
|
19
|
+
"InsufficientCreditsError",
|
|
20
|
+
"NotFoundError",
|
|
21
|
+
"RateLimitError",
|
|
22
|
+
"TOOLS",
|
|
23
|
+
"__version__",
|
|
24
|
+
"to_dataframe",
|
|
25
|
+
]
|