An opinionated collection of processes that extracts and constructs sports related data artifacts from public applications
Python 3.8+ Required
# latest
pip install git+https://github.com/lightning-dabbler/sports.git
# Tag
pip install git+https://github.com/lightning-dabbler/sports.git@TAG
$ sports --help
Usage: sports [OPTIONS] COMMAND [ARGS]...
This is the main sports entrypoint
Options:
-v, --verbose
-s, --serialize
--help Show this message and exit.
Commands:
fox-sports Executes Fox Sports related CLI commands
$ sports fox-sports matchups --help
Usage: sports fox-sports matchups [OPTIONS]
Retrieves Fox Sports Matchups Data
Options:
-f, --force Make nested Directories if necessary
--complete Export all Data Files
-g, --groups [matchup-stats|fox-lines|team-stats]
Groups of datasets to export
-d, --datasets [matchups|matchup-team-leaders-stats|matchup-team-stats|fox-odds|fox-projections|team-stats|team-player-stats|team-roster|player-stats|advanced-player-stats]
Datasets to export
-b, --batch-size INTEGER Batch size of data to hold in memory per
data feed before writing to data file
-p, --parallel INTEGER Number of Concurrent Workers
--tz TEXT Timezone of current data pull
--config LOADS Inline configuration details
-c, --compression [disable|infer_from_extension|.bz2|.gz]
-ft, --file-type [json-lines|csv]
-o, --output <output> location to export data file(s) to
-s, --sport TEXT Sport in Fox Sports to pull data for
[required]
-dt, --date TEXT YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss
--help Show this message and exit.
Example execution:
$ sports -vv fox-sports matchups -s nba -b 2000 -dt 2022-02-16 --complete -f
Clone Repository:
git clone https://github.com/lightning-dabbler/sports.git
Enter main sports docker container:
make enter
Enter Development container:
make up
Clone Repository:
git clone https://github.com/lightning-dabbler/sports.git
Repository uses poetry==1.1.13 & Python 3.8+
make install-deps # It's imperative to use an isolated environment before running this command or one will risk Python dependencies in their environment being removed and pip being upgraded
make init
- pre-commit==2.17.0
- docker 20.10.5+
- docker-compose 1.29.0+
- poetry==1.1.13
- Python 3.8+
make
Osarodion Irabor