yfpy.models.Settings
- class Settings(extracted_data)[source]
Bases:
YahooFantasyObject
Model class for “settings” data key.
Instantiate the Settings child class of YahooFantasyObject.
- Parameters:
extracted_data (dict) – Parsed and cleaned JSON data retrieved from the Yahoo Fantasy Sports REST API.
- cant_cut_list
Numeric boolean (0 or 1) representing if the league uses the Yahoo “can’t cut list”.
- Type:
- draft_together
Numeric boolean (0 or 1) representing if the league uses Yahoo Fantasy Draft Together live video chat during online drafts.
- Type:
- has_multiweek_championship
Numeric boolean (0 or 1) representing if the league has a multi-week championship matchup.
- Type:
- has_playoff_consolation_games
Numeric boolean (0 or 1) representing if the league has a consolation playoff bracket.
- Type:
- is_auction_draft
Numeric boolean (0 or 1) representing if the league uses an auction draft.
- Type:
- num_playoff_consolation_teams
The number of teams that make the consolation playoff bracket.
- Type:
- pickem_enabled
Numeric boolean (0 or 1) representing if the league has enabled the built-in Yahoo “pick ‘em” game that allows managers to pick winners of each fantasy matchup each week in the league.
- Type:
- post_draft_players
Value designating what happens to players after the draft (“W” for waivers, etc.).
- Type:
- roster_positions
A list of YFPY RosterPosition instances.
- Type:
- scoring_type
Value designating what type of scoring the league uses (“head” for head-to-head, etc.).
- Type:
- stat_categories
A YFPY StatCategories instance.
- Type:
- stat_modifiers
A YFPY StatModifiers instance.
- Type:
- trade_end_date
A date string representing when trading is no longer allowed (format: “YYYY-MM-DD”).
- Type:
- trade_ratify_type
Value designating how trades are ratified (“commish” for commissioner, etc.).
- Type:
- uses_faab
Numeric boolean (0 or 1) representing if the league uses FAAB (Free Agent Acquisition Budget).
- Type:
- uses_fractional_points
Numeric boolean (0 or 1) representing if the league allows fractional scoring.
- Type:
- uses_lock_eliminated_teams
Numeric boolean (0 or 1) representing if the league locks teams eliminated from the playoffs.
- Type:
- uses_median_score
(for paid subscribers to Yahoo Fantasy Commissioner Plus) Numeric boolean (0 or 1) representing if the league plays an extra game against the median each week.
- Type:
- uses_negative_points
Numeric boolean (0 or 1) representing if the league allows negative scoring.
- Type:
- uses_playoff_reseeding
Numeric boolean (0 or 1) representing if the league reseeds the playoffs once the fantasy regular season is complete.
- Type:
- waiver_type
Value designating what type of waivers are used by the league (“R” for rolling, etc.).
- Type:
Methods
Recursive method to un-type custom class type objects for serialization.
Deserialize JSON to a class object.
Pack up all object content into nested dictionaries for JSON serialization.
Derive snake case dictionary keys from custom object type camel case class names.
Serialize the class object to JSON.
- clean_data_dict()
Recursive method to un-type custom class type objects for serialization.
- Returns:
Dictionary that extracts serializable data from custom objects.
- Return type:
- classmethod from_json(json_data)
Deserialize JSON to a class object.
- Returns:
Class object derived from JSON data.
- Return type:
- serialized()
Pack up all object content into nested dictionaries for JSON serialization.
- Returns:
Serializable dictionary.
- Return type:
- subclass_dict()
Derive snake case dictionary keys from custom object type camel case class names.
- Returns:
Dictionary with snake case strings of all subclasses of YahooFantasyObject as keys and subclasses as values.
- Return type: