Elo rating system for fantasy sports leagues (Fantrax NBA, with multi-season dynasty support).
Project description
elo-system
An Elo rating system for fantasy sports leagues. It scrapes weekly scoreboards from a fantasy platform, converts them into per-week Elo ratings, and supports multi-season dynasty ratings with an offseason regression-to-mean adjustment.
- Platforms: Fantrax (NBA, head-to-head categories) is implemented. A Sleeper backend is planned.
- Outputs: per-season and combined-dynasty rating frames, written to CSV (a Postgres backend is scaffolded but not yet wired up).
Installation
The project depends on a fork of fantraxapi (the PyPI release is broken for
H2H-rotisserie leagues), so it installs from source rather than from PyPI:
python -m venv .venv
source .venv/bin/activate
pip install -e . # add [dev] for the test/lint tooling
requirements.frozen holds the exact, reproducible dependency pins (including
the fantraxapi fork commit) used during development.
Layout
elo_system/
elo_system.py EloSystem orchestrator (config + reader/writer wiring)
tools/
elo_league.py EloLeague: season management + run/dynasty pipeline
elo_data.py EloCSV / EloSQL persistence backends
basics/ LeagueBase/DataBase, Elo math, config IO, constants
helpers/ scraper, league, formatter, calculator, frame_manager
Tests
python -m pytest # run from the repo root
See CONTRIBUTING.md for development notes and conventions, and CHANGELOG.md for release history.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file elo_system-1.0.0.tar.gz.
File metadata
- Download URL: elo_system-1.0.0.tar.gz
- Upload date:
- Size: 54.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fcddaa53cbec411847854ad7e571898f8430c505ebd13715807a839b1a5c75ce
|
|
| MD5 |
d94773c5cec2f2aa367452fe4e685986
|
|
| BLAKE2b-256 |
afce06fa2ed7a976de71a268f8b1047b60bfe2c214776b6378794acf93bd01e0
|
File details
Details for the file elo_system-1.0.0-py3-none-any.whl.
File metadata
- Download URL: elo_system-1.0.0-py3-none-any.whl
- Upload date:
- Size: 45.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66019c1c52e0ba7c7b48470c77b1194fe14e2a486abcf8ce18eadb54afd81350
|
|
| MD5 |
6974449d346efda7d1e56ef82ae3606a
|
|
| BLAKE2b-256 |
b6ed123affc7c7ced40048eeddec0ec673056fbd74c2fa1b98607ae4c9c30834
|