Skip to content

Commit 9bad58f

Browse files
feat: initial release v1.0.0
PyMLB StatsAPI - A clean, Pythonic wrapper for MLB Stats API Features: - Schema-driven API with automatic parameter validation - Intelligent routing of path and query parameters - Comprehensive test suite with stub capture/replay - Full CI/CD with GitHub Actions - Terraform-managed infrastructure with S3 backend - Type-safe with zero hardcoded models - Support for Python 3.10-3.13 - GitHub environments for PyPI publishing (pypi, testpypi) - CODEOWNERS with power-edge org owner and nikolauspschuetz
0 parents  commit 9bad58f

File tree

186 files changed

+60935
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

186 files changed

+60935
-0
lines changed

.env.example

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# PyPI Publishing Credentials
2+
# Copy this file to .env and fill in your actual tokens
3+
# .env is gitignored and will not be committed
4+
5+
# PyPI API Token (for production releases)
6+
# Get your token at: https://pypi.org/manage/account/token/
7+
TWINE_USERNAME=__token__
8+
TWINE_PASSWORD=pypi-your-token-here
9+
10+
# TestPyPI API Token (for testing releases)
11+
# Get your token at: https://test.pypi.org/manage/account/token/
12+
TEST_PYPI_USERNAME=__token__
13+
TEST_PYPI_PASSWORD=pypi-your-test-token-here
14+
15+
# MLB Stats API Configuration (optional)
16+
# Base path for saving API responses locally
17+
PYMLB_STATSAPI__BASE_FILE_PATH=./.var/local/mlb_statsapi
18+
19+
# API Schema Version (optional, defaults to 1.0)
20+
PYMLB_STATSAPI__SCHEMA_VERSION=1.0
21+
22+
# S3 Configuration (optional, for S3 URI generation)
23+
# PYMLB_STATSAPI__S3_BUCKET=your-bucket-name

.github/CODEOWNERS

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Code Owners for PyMLB StatsAPI
2+
#
3+
# These users/teams will be automatically requested for review when someone
4+
# opens a pull request that modifies files matching the patterns below.
5+
#
6+
# More info: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
7+
8+
# Default owners for everything in the repo
9+
* @nikolauspschuetz
10+
11+
# Core package code - requires review from maintainers
12+
/pymlb_statsapi/ @nikolauspschuetz
13+
14+
# Tests - maintainers review
15+
/tests/ @nikolauspschuetz
16+
17+
# Infrastructure and CI/CD - requires admin review
18+
/.github/ @nikolauspschuetz
19+
/scripts/ @nikolauspschuetz
20+
21+
# Documentation
22+
/docs/ @nikolauspschuetz
23+
*.md @nikolauspschuetz
24+
25+
# Configuration files - requires careful review
26+
pyproject.toml @nikolauspschuetz
27+
setup.py @nikolauspschuetz
28+
*.cfg @nikolauspschuetz
29+
*.ini @nikolauspschuetz

.github/CONTRIBUTORS.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Contributors
2+
3+
This project is developed and maintained by:
4+
5+
- **Nikolaus Schuetz** ([@nikolauspschuetz](https://github.com/nikolauspschuetz)) - Project Author and Lead Developer
6+
7+
## Contributing
8+
9+
We welcome contributions! Please see [CONTRIBUTING.md](../CONTRIBUTING.md) for guidelines on how to contribute to this project.
10+
11+
## Acknowledgments
12+
13+
This project was built with:
14+
- The excellent [MLB Stats API](https://statsapi.mlb.com/)
15+
- Modern Python tooling (uv, ruff, pytest, behave)
16+
- Community feedback and suggestions
17+
18+
Thank you to everyone who uses and supports this project!
19+
20+
---
21+
22+
**Note:** If you're viewing the GitHub contributors graph and see incorrect information, this may be due to GitHub's caching system. The git history has been properly consolidated under a single author. GitHub's contributor graphs can take 24-48 hours to update after history rewrites.

.github/FUNDING.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Funding options for PyMLB StatsAPI
2+
# These links will appear in the "Sponsor" button on GitHub
3+
4+
# Ko-fi
5+
ko_fi: nikolauspschuetz # Replace with your Ko-fi username
6+
7+
## GitHub Sponsors
8+
#github: YOUR_GITHUB_USERNAME # Replace with your GitHub username if you have GitHub Sponsors enabled
9+
10+
# Patreon
11+
patreon: nikolauspschuetz # Replace with your Patreon username
12+
13+
# Buy Me A Coffee
14+
custom: ['https://www.buymeacoffee.com/nikolauspschuetz'] # Replace with your Buy Me A Coffee link
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
name: Bug Report
2+
description: Report a bug or unexpected behavior
3+
title: "[Bug]: "
4+
labels: ["bug"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for taking the time to report a bug! Please fill out the information below to help us resolve the issue.
10+
11+
- type: checkboxes
12+
id: checklist
13+
attributes:
14+
label: Pre-submission Checklist
15+
description: Please verify the following before submitting
16+
options:
17+
- label: I have searched for existing issues that describe this bug
18+
required: true
19+
- label: I have tested with the latest version of pymlb-statsapi
20+
required: true
21+
- label: I have read the documentation
22+
required: false
23+
24+
- type: textarea
25+
id: description
26+
attributes:
27+
label: Bug Description
28+
description: A clear and concise description of what the bug is
29+
placeholder: Describe the issue...
30+
validations:
31+
required: true
32+
33+
- type: textarea
34+
id: reproduction
35+
attributes:
36+
label: Steps to Reproduce
37+
description: Provide detailed steps to reproduce the issue
38+
placeholder: |
39+
1. Import the library with...
40+
2. Call method...
41+
3. See error...
42+
value: |
43+
```python
44+
from pymlb_statsapi import api
45+
46+
# Your code that reproduces the issue
47+
48+
```
49+
validations:
50+
required: true
51+
52+
- type: textarea
53+
id: expected
54+
attributes:
55+
label: Expected Behavior
56+
description: What did you expect to happen?
57+
placeholder: I expected...
58+
validations:
59+
required: true
60+
61+
- type: textarea
62+
id: actual
63+
attributes:
64+
label: Actual Behavior
65+
description: What actually happened? Include error messages and stack traces
66+
placeholder: |
67+
The following error occurred:
68+
```
69+
Traceback (most recent call last):
70+
...
71+
```
72+
validations:
73+
required: true
74+
75+
- type: input
76+
id: version
77+
attributes:
78+
label: PyMLB StatsAPI Version
79+
description: Which version are you using?
80+
placeholder: "1.0.0 (from pip show pymlb-statsapi)"
81+
validations:
82+
required: true
83+
84+
- type: input
85+
id: python-version
86+
attributes:
87+
label: Python Version
88+
description: Which Python version are you using?
89+
placeholder: "3.11.0 (from python --version)"
90+
validations:
91+
required: true
92+
93+
- type: dropdown
94+
id: os
95+
attributes:
96+
label: Operating System
97+
description: What operating system are you using?
98+
options:
99+
- Linux
100+
- macOS
101+
- Windows
102+
- Other (specify in additional context)
103+
validations:
104+
required: true
105+
106+
- type: textarea
107+
id: context
108+
attributes:
109+
label: Additional Context
110+
description: |
111+
Any other information that might be relevant:
112+
- Are you behind a proxy or firewall?
113+
- Are you using any custom configuration?
114+
- Does this happen consistently or intermittently?
115+
placeholder: Add any other context about the problem here
116+
117+
- type: textarea
118+
id: logs
119+
attributes:
120+
label: Relevant Logs
121+
description: Please paste any relevant log output
122+
render: shell
123+
placeholder: |
124+
Paste logs here...
125+
126+
- type: checkboxes
127+
id: willingness
128+
attributes:
129+
label: Contribution
130+
description: Would you be willing to contribute a fix for this issue?
131+
options:
132+
- label: I am willing to submit a pull request to fix this issue

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Question or Discussion
4+
url: https://github.com/power-edge/pymlb_statsapi/discussions
5+
about: Ask questions and discuss ideas with the community
6+
- name: Documentation
7+
url: https://pymlb-statsapi.readthedocs.io/
8+
about: Read the full documentation on ReadTheDocs
9+
- name: MLB Stats API Documentation
10+
url: https://statsapi.mlb.com/docs/
11+
about: Official MLB Stats API documentation
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Documentation Issue
2+
description: Report an issue with documentation or suggest improvements
3+
title: "[Docs]: "
4+
labels: ["documentation"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for helping improve our documentation!
10+
11+
- type: dropdown
12+
id: doc-type
13+
attributes:
14+
label: Documentation Type
15+
description: What type of documentation issue is this?
16+
options:
17+
- API Reference
18+
- Schema Reference
19+
- Getting Started Guide
20+
- Examples
21+
- README
22+
- Code Comments
23+
- Other
24+
validations:
25+
required: true
26+
27+
- type: input
28+
id: location
29+
attributes:
30+
label: Documentation Location
31+
description: Please provide a link or path to the relevant documentation
32+
placeholder: "https://pymlb-statsapi.readthedocs.io/en/latest/..."
33+
validations:
34+
required: true
35+
36+
- type: textarea
37+
id: issue
38+
attributes:
39+
label: Issue Description
40+
description: Describe the issue with the current documentation
41+
placeholder: |
42+
The documentation for X is unclear because...
43+
OR
44+
The documentation is missing information about...
45+
validations:
46+
required: true
47+
48+
- type: textarea
49+
id: suggestion
50+
attributes:
51+
label: Suggested Improvement
52+
description: How would you improve this documentation?
53+
placeholder: |
54+
I suggest adding...
55+
OR
56+
This could be clarified by...
57+
validations:
58+
required: true
59+
60+
- type: textarea
61+
id: example
62+
attributes:
63+
label: Example (Optional)
64+
description: If applicable, provide an example of what improved documentation might look like
65+
placeholder: |
66+
```markdown
67+
## Suggested Documentation
68+
69+
Your suggested text here...
70+
```
71+
72+
- type: checkboxes
73+
id: willingness
74+
attributes:
75+
label: Contribution
76+
description: Would you be willing to contribute a documentation fix?
77+
options:
78+
- label: I am willing to submit a pull request to improve this documentation

0 commit comments

Comments
 (0)