Skip to content

DJILog

Main entry point for parsing DJI flight log files.

DJILog dataclass

DJILog(inner: bytes, prefix: Prefix, version: int, details: Details, auxiliary_version: AuxiliaryVersion | None = None)

Parsed DJI flight log.

Use :meth:from_bytes to construct. After construction the version and details attributes are available for all log versions without decryption.

from_bytes classmethod

from_bytes(data: bytes) -> DJILog

Parse header, details, and auxiliary blocks from raw log bytes.

keychains_request

keychains_request() -> KeychainsRequest

Build a KeychainsRequest by parsing KeyStorage records.

For v13+, this iterates the record stream with an empty keychain to extract the encoded feature points needed for the API call.

fetch_keychains

fetch_keychains(api_key: str, *, cache: bool = True, verify: bool = True) -> list[list[KeychainFeaturePoint]]

Fetch decoded keychains from DJI API.

Only needed for v13+ logs. Returns empty list for older versions.

records

records(keychains: list[list[KeychainFeaturePoint]] | None = None) -> list[Record]

Parse and decrypt all records from the binary stream.

For v13+ logs, keychains must be provided (from :meth:fetch_keychains).

frames

frames(keychains: list[list[KeychainFeaturePoint]] | None = None) -> list[Frame]

Parse records and convert to normalized frames.

For v13+ logs, keychains must be provided (from :meth:fetch_keychains).