findmy.accessory ================ .. py:module:: findmy.accessory .. autoapi-nested-parse:: Module to interact with accessories that implement Find My. Accessories could be anything ranging from AirTags to iPhones. Classes ------- .. autoapisummary:: findmy.accessory.RollingKeyPairSource findmy.accessory.FindMyAccessory findmy.accessory.AccessoryKeyGenerator Module Contents --------------- .. py:class:: RollingKeyPairSource Bases: :py:obj:`abc.ABC` A class that generates rolling `KeyPair`s. .. py:property:: interval :type: datetime.timedelta :abstractmethod: KeyPair rollover interval. .. py:method:: keys_at(ind: int | datetime.datetime) -> set[findmy.keys.KeyPair] :abstractmethod: Generate potential key(s) occurring at a certain index or timestamp. .. py:method:: keys_between(start: int, end: int) -> set[findmy.keys.KeyPair] keys_between(start: datetime.datetime, end: datetime.datetime) -> set[findmy.keys.KeyPair] Generate potential key(s) occurring between two indices or timestamps. .. py:class:: FindMyAccessory(master_key: bytes, skn: bytes, sks: bytes, paired_at: datetime.datetime, name: str | None = None, model: str | None = None, identifier: str | None = None) Bases: :py:obj:`RollingKeyPairSource` A findable Find My-accessory using official key rollover. .. py:property:: paired_at :type: datetime.datetime Date and time at which this accessory was paired with an Apple account. .. py:property:: name :type: str | None Name of this accessory. .. py:property:: model :type: str | None Model string of this accessory, as provided by the manufacturer. .. py:property:: identifier :type: str | None Internal identifier of this accessory. .. py:property:: interval :type: datetime.timedelta Official FindMy accessory rollover interval (15 minutes). .. py:method:: keys_at(ind: int | datetime.datetime) -> set[findmy.keys.KeyPair] Get the potential primary and secondary keys active at a certain time or index. .. py:method:: from_plist(plist: IO[bytes]) -> FindMyAccessory :classmethod: Create a FindMyAccessory from a .plist file dumped from the FindMy app. .. py:class:: AccessoryKeyGenerator(master_key: bytes, initial_sk: bytes, key_type: findmy.keys.KeyType = KeyType.UNKNOWN) Bases: :py:obj:`findmy.keys.KeyGenerator`\ [\ :py:obj:`findmy.keys.KeyPair`\ ] KeyPair generator. Uses the same algorithm internally as FindMy accessories do. .. py:method:: __iter__() -> findmy.keys.KeyGenerator .. py:method:: __next__() -> findmy.keys.KeyPair .. py:method:: __getitem__(val: int) -> findmy.keys.KeyPair __getitem__(val: slice) -> Generator[findmy.keys.KeyPair, None, None]