Skip to content

Commit 4ff87d0

Browse files
feat: finalize library with ETL exports and entity relationship examples
- Add entity relationships example showing data flow patterns - Create schema export utilities for ETL pipeline generation - Simplify README to focus on API wrapper functionality - Generate machine-readable endpoint and ETL mapping schemas - Remove ETL-specific ERD (moved to separate mlb-etl-datamart project) - All tests passing (98 unit tests, 39 BDD scenarios)
1 parent f0e4663 commit 4ff87d0

File tree

7 files changed

+3079
-0
lines changed

7 files changed

+3079
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,11 @@ The **[Schema Reference](https://pymlb-statsapi.readthedocs.io/en/latest/schemas
101101
- **Examples** - Check the `examples/` directory for working code samples
102102
- **Testing Guide** - See the [Testing](https://pymlb-statsapi.readthedocs.io/en/latest/testing.html) documentation
103103

104+
### For ETL and Data Engineering
105+
106+
- **[MLB ETL Data Mart](https://github.com/power-edge/mlb-etl-datamart)** - Complete ETL pipeline and data mart built on this library
107+
- **Schema Export**: Use `pymlb_statsapi.export.save_exports()` to generate machine-readable schemas for pipeline generation
108+
104109
## 🏗️ Architecture
105110

106111
### Config-Driven Design
@@ -133,6 +138,22 @@ Each schema defines which parameters are path parameters vs query parameters. Me
133138
}
134139
```
135140

141+
### 📊 API Structure Overview
142+
143+
The MLB Stats API consists of 20 endpoints with 100+ methods. Each endpoint represents a different aspect of baseball data:
144+
145+
**Core Data Flow**: Season → Schedule → Game → Teams/Players → Stats
146+
147+
**Key Endpoints**:
148+
- **Game**: Live data, boxscores, play-by-play (`liveGameV1` supports timecode for historical snapshots)
149+
- **Team**: Rosters, stats, history, affiliates
150+
- **Person**: Player data, awards, performance stats
151+
- **Stats**: Performance metrics, leaders, grouped statistics
152+
- **Schedule**: Game schedules, postseason series
153+
- **Config**: Reference data (positions, game types, etc.)
154+
155+
**Parameter Intelligence**: The library automatically routes parameters to path vs query based on endpoint schemas, and accepts both integers and strings for flexible usage.
156+
136157
### Clean API: Intelligent Parameter Routing
137158

138159
The library automatically routes parameters to path or query parameters based on schema configuration:

0 commit comments

Comments
 (0)