Skip to content

processor

Logic to process decrypted/text-only data

Classes:

CacheProcessor

CacheProcessor()

CacheProcessor class

C-tor

Methods:

process_data

process_data(data: List[Dict[str, Any]] | Dict[str, Any] | None, data_type: Literal['devices', 'items'], only_airtag: bool = True, insert_db: bool = False) -> Dict[str, List[Dict[str, Any]]] | None

Function to process data

Parameters:

  • data

    (List[Dict[str, Any]] | Dict[str, Any] | None) –

    Decrypted/text-only (not bytes) data in dict or list of dict

  • data_type

    (Literal['devices', 'items']) –

    Devices or Items to be processed

  • only_airtag

    (bool, default: True ) –

    Boolean to only store AirTag records in output

  • insert_db

    (bool, default: False ) –

    True if insert to DB requested, False otherwise

Returns:

  • Dict[str, List[Dict[str, Any]]] | None

    Dict with slots and positions parsed/processed, None otherwise