findmy

A package providing everything you need to work with Apple’s FindMy network.

Submodules

Classes

FindMyAccessory

A findable Find My-accessory using official key rollover.

KeyPair

A private-public keypair for a trackable FindMy accessory.

Package Contents

class findmy.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: RollingKeyPairSource

A findable Find My-accessory using official key rollover.

property paired_at: datetime.datetime

Date and time at which this accessory was paired with an Apple account.

property name: str | None

Name of this accessory.

property model: str | None

Model string of this accessory, as provided by the manufacturer.

property identifier: str | None

Internal identifier of this accessory.

property interval: datetime.timedelta

Official FindMy accessory rollover interval (15 minutes).

keys_at(ind: int | datetime.datetime) set[findmy.keys.KeyPair]

Get the potential primary and secondary keys active at a certain time or index.

classmethod from_plist(plist: IO[bytes]) FindMyAccessory

Create a FindMyAccessory from a .plist file dumped from the FindMy app.

class findmy.KeyPair(private_key: bytes, key_type: KeyType = KeyType.UNKNOWN, name: str | None = None)

Bases: HasPublicKey

A private-public keypair for a trackable FindMy accessory.

property key_type: KeyType

Type of this key.

property name: str | None

Name of this KeyPair.

classmethod new() KeyPair

Generate a new random KeyPair.

classmethod from_b64(key_b64: str) KeyPair

Import an existing KeyPair from its base64-encoded representation.

Same format as returned by KeyPair.private_key_b64.

property private_key_bytes: bytes

Return the private key as bytes.

property private_key_b64: str

Return the private key as a base64-encoded string.

Can be re-imported using KeyPair.from_b64.

property adv_key_bytes: bytes

Return the advertised (public) key as bytes.

dh_exchange(other_pub_key: cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePublicKey) bytes

Do a Diffie-Hellman key exchange using another EC public key.

__repr__() str