A command-line tool that calculates how many consecutive seasons each player has been kept (not drafted) while remaining on a roster in your Sleeper fantasy football league.
For dynasty and keeper leagues, this tool analyzes your league's history and shows each player's projected tenure for the upcoming season:
| Column | Description |
|---|---|
| Player | Player's name |
| Pos | Position |
| Owner | Current roster owner |
| Tenure (YEAR) | Projected tenure for next season if kept |
Tenure is a league-wide concept tracking how many consecutive seasons a player has avoided the draft while remaining rostered.
Tenure resets to 0 when:
- Player is drafted by any team
- Player is not on any week 1 roster (dropped/not kept)
Tenure increments (+1) when:
- Player is on any team's week 1 roster
- Player was NOT drafted that season
- Player was in the league the previous season
| Season | Event | Tenure |
|---|---|---|
| 2022 | Drafted by Team A | 0 |
| 2023 | Kept by Team B (traded mid-season) | 1 |
| 2024 | Kept by Team B | 2 |
| 2025 | Drafted by Team C | 0 (reset) |
Requires Python 3.9+ and the requests library.
git clone https://github.com/knix24/sleeper-tenure-tracker.git
cd sleeper-tenure-tracker
pip install requestspython tenure_tracker.py <sleeper_username> [season] [options]Arguments:
sleeper_username: Your Sleeper username (or any league member)season: (optional) Season year, defaults to current year
Options:
--csv: Output in CSV format (for spreadsheets)--refresh: Force refresh of cached player database--league N: Select league number N (skips prompt when user has multiple leagues)-h, --help: Show help message
Fetching data for gridiron_guy... OK
League: Pigskin Prophets Dynasty
Tracing league history... OK (4 seasons: 2022, 2023, 2024, 2025)
Calculating tenure... OK
Fetching current rosters... OK
Fetching player database... OK (cached)
Player Pos Owner Tenure (2026)
========================================================
Josh Jacobs RB thunderfoot 4
Amon-Ra St. Brown WR thunderfoot 4
Jahmyr Gibbs RB thunderfoot 3
Bucky Irving RB thunderfoot 2
...
Courtland Sutton WR redzone_rick 3
Chase Brown RB redzone_rick 2
Total players with tenure greater than 1: 53
Results are sorted by owner (ascending), then by tenure (descending).
- Looks up the user and finds their leagues for the specified season
- Traces the league's history back through all previous seasons (via
previous_league_id) - For each season:
- Fetches draft picks to identify drafted players
- Fetches week 1 matchups to get rosters at season start
- Calculates tenure chronologically from oldest to newest season:
- Players drafted get tenure = 0
- Players kept (on week 1 roster, not drafted, were in league previous season) get tenure + 1
- Players not on any week 1 roster get tenure reset to 0
- Displays projected tenure for the next season (current tenure + 1) for all currently rostered keepers
- If you have multiple leagues, the tool prompts you to select one (use
--league Nto skip the prompt) - Player database is cached locally for 24 hours (
~/.cache/sleeper-tenure-tracker/) - Use
--refreshif you notice outdated player names in the output - Friendly error messages are shown if the API fails or a user/league isn't found
This tool uses the Sleeper API which is free and requires no authentication.