yfpy.models.YahooFantasyObject
- class YahooFantasyObject(extracted_data)[source]
Bases:
object
Base Yahoo Fantasy Sports data object from which all model classes inherit their methods and attributes.
Instantiate a Yahoo Fantasy Object.
- Parameters:
extracted_data (dict) – Parsed and cleaned JSON data retrieved from the Yahoo Fantasy Sports REST API.
- extracted_data
Parsed and cleaned JSON data retrieved from the Yahoo Fantasy Sports REST API.
- 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()[source]
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)[source]
Deserialize JSON to a class object.
- Returns:
Class object derived from JSON data.
- Return type:
- serialized()[source]
Pack up all object content into nested dictionaries for JSON serialization.
- Returns:
Serializable dictionary.
- Return type: