findmy ====== .. py:module:: findmy .. autoapi-nested-parse:: A package providing everything you need to work with Apple's FindMy network. Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/findmy/accessory/index /autoapi/findmy/errors/index /autoapi/findmy/keys/index /autoapi/findmy/reports/index /autoapi/findmy/scanner/index /autoapi/findmy/util/index Classes ------- .. autoapisummary:: findmy.FindMyAccessory findmy.KeyPair Package Contents ---------------- .. 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:: KeyPair(private_key: bytes, key_type: KeyType = KeyType.UNKNOWN, name: str | None = None) Bases: :py:obj:`HasPublicKey` A private-public keypair for a trackable FindMy accessory. .. py:property:: key_type :type: KeyType Type of this key. .. py:property:: name :type: str | None Name of this KeyPair. .. py:method:: new() -> KeyPair :classmethod: Generate a new random `KeyPair`. .. py:method:: from_b64(key_b64: str) -> KeyPair :classmethod: Import an existing `KeyPair` from its base64-encoded representation. Same format as returned by `KeyPair.private_key_b64`. .. py:property:: private_key_bytes :type: bytes Return the private key as bytes. .. py:property:: private_key_b64 :type: str Return the private key as a base64-encoded string. Can be re-imported using `KeyPair.from_b64`. .. py:property:: adv_key_bytes :type: bytes Return the advertised (public) key as bytes. .. py:method:: dh_exchange(other_pub_key: cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePublicKey) -> bytes Do a Diffie-Hellman key exchange using another EC public key. .. py:method:: __repr__() -> str