Skip to main content

mavlab-logbook-client

Download and upload drone flight logs of a MAVLab flight log database from Python, without a browser download or drag and drop. Works with every log the server stores (Paparazzi .data/.log, ArduPilot .bin/.log/.tlog, PX4 .ulg, Betaflight .BFL, …). Pure Python 3.10+, no dependencies. The API follows the MATLAB tools, which share the login and the cache.

pip install mavlab-logbook-client
import mavlab_logbook_client as ml

ml.connect("logs.example.org")                     # or ml.connect("logs.example.org", key="logdb_…")
rows = ml.logbook()                                # the flights you may see, newest first (as pprz_logbook)
numbers = [r["flight"] for r in rows if "Hex" in r["aircraft"]]
mats = ml.fetch([1234, 1240])                      # flight numbers, as in /flight/1234: MATLAB exports, one per log
mats = ml.fetch([1234, 1240], scope="flight")      # one .mat per number instead (as pprz_fetch)
logs = ml.fetch_raw([1234, 1240])                  # the original logs, untouched: one path per log
logs[0]                      # e.g. ~/.cache/mavlab-logbook-client/logs/<sha256>/24_10_30__16_27_37_SD.data (.log next to it)
receipts = ml.upload(["flight.data", "LOG00030.BFL"], wait=True)
receipts[0]["flight_ids"]                          # the flights the server found, for ml.fetch

connect(server, key) does the authentication. The server is required (https:// is added to a bare host name; http:// is refused except for localhost, so keys never travel unencrypted); the key defaults to LOGDB_API_KEY (a key from your account page, as for upload_logs.py; not used when LOGDB_SERVER names another server), else the key of the last browser login to that server. Values taken from the environment are announced and named in errors. Without a key, connect opens the browser: sign in, check that the page shows the same code as the terminal and press Allow. That key acts as you for a week and is stored for the next connect. connect(..., login=False) raises AuthError instead (for unattended scripts); insecure=True accepts a self-signed certificate. connect returns a Client with the same methods, for using several servers at once.

ml.revoke_all() revokes your browser-login keys on every computer (Python and MATLAB) and forgets the stored one. Keys made on the account page are revoked there.

The logbook (ml.logbook(), as MATLAB's pprz_logbook) is a list of dicts, one per flight, newest first: flight (the number for fetch), date (takeoff, UTC datetime; None when unknown), date_ok (False when the log's clock was not set and no date was entered), aircraft, duration_min, pic, project, goal, verdict, simulation (True for a simulated flight) and log. It holds the flights the parser judged real; all=True adds uncertain and ground records. Paper records are left out. pandas.DataFrame(rows) makes a table of it.

Fetching works as MATLAB's pprz_fetch: fetch downloads the MATLAB exports (.mat, v7.3 = HDF5, e.g. for h5py; the format is in the MATLAB README) and exists for Paparazzi logs. scope chooses what each file holds: "selected" (default) the given flights of each log, 10 s before takeoff to 10 s after landing; "all" every flight of those logs; "log" the whole log; these return one file per log. "flight" returns one file per number. Exports are cached (shared with MATLAB) and reused while they would be identical; a change of the log, parser or logbook data fetches them again.

fetch_raw downloads the original log files that hold the flights (.data with its .log, .BFL, .ulg, …), whole and untouched, one path per log. One never changes (it is named by its SHA-256, which is checked after each download). For both, force=True downloads again; without a connection or when the server fails (HTTP 5xx) the cached copies are used, with a warning.

Uploads pair a .data with the .log next to it (whichever of the two you pass). A log already on the server is skipped. name="Hex 1/LOG00030.BFL" sets the stored name of a single file, which can link it to a fleet aircraft. With wait=True each call returns once the server has parsed the log, else as soon as it accepted it.

Command line

mavlab-logbook-client --server logs.example.org status                       # signs in if needed; user, key and cache
mavlab-logbook-client --server logs.example.org logbook                      # tab-separated flights; --all
mavlab-logbook-client --server logs.example.org fetch 1234 1240               # prints the .mat paths; --scope flight
mavlab-logbook-client --server logs.example.org fetch-raw 1234 1240           # prints the paths of the original logs
mavlab-logbook-client --server logs.example.org upload flight.data LOG00030.BFL --wait
mavlab-logbook-client --server logs.example.org revoke-all                    # keys of browser logins, all computers
mavlab-logbook-client --server logs.example.org --key logdb_… fetch 1234      # as connect(server, key)

Where files are kept

Linux macOS Windows
Login (config.json) ~/.config/mavlab-logbook-client ~/Library/Application Support/mavlab-logbook-client %APPDATA%\mavlab-logbook-client
Cache ~/.cache/mavlab-logbook-client ~/Library/Caches/mavlab-logbook-client %LOCALAPPDATA%\mavlab-logbook-client\Cache

config.json holds API keys and is readable by you only; XDG_CONFIG_HOME/XDG_CACHE_HOME are respected on Linux. MAVLAB_LOGBOOK_CACHE (or ml.set_cache_dir(folder), also seen by MATLAB) and MAVLAB_LOGBOOK_CONFIG choose other folders. The cache holds mat/<server>/ (exports, from fetch and MATLAB), logs/<sha256>/ (original files) and flights/<server>/ (which log each flight is in, for offline use); delete it at any time to free space.

Metadata

Release files for mavlab-logbook-client 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mavlab-logbook-client 0.1.1
File Size Uploaded Provenance Actions
mavlab_logbook_client-0.1.1.tar.gz 23.5 kB With provenance Details for mavlab_logbook_client-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mavlab-logbook-client 0.1.1
File Interpreter ABI Platform Actions
mavlab_logbook_client-0.1.1-py3-none-any.whl Python 3 none any Details for mavlab_logbook_client-0.1.1-py3-none-any.whl

Total release size: 42.4 kB

Release files / mavlab_logbook_client-0.1.1.tar.gz

Download URL mavlab_logbook_client-0.1.1.tar.gz
Size 23.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b367214530eed4eb5307df17a59c5ec2cd83b33797b190591158b2fb60133bec
BLAKE2b-256 checksum
How to use checksums
3fbfbef020b920d0c955341ce13f6f40c771bc84861aed1a067a96df3dd2969e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Release files / mavlab_logbook_client-0.1.1-py3-none-any.whl

Download URL mavlab_logbook_client-0.1.1-py3-none-any.whl
Size 18.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
00c04ceef0ced75d8794c327ab64f34c3f6f0f23b55d6334293a63a9a5b00543
BLAKE2b-256 checksum
How to use checksums
fade2536d539208853cabc3fc71e9052da1b34d7f7c727e80848b3e06dcb712a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Security for mavlab-logbook-client 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mavlab_logbook_client-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page