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)
mats = ml.fetch(log=4824) # a whole log by its log number (Logs page), also without flights
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.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mavlab_logbook_client-0.2.0.tar.gz | 24.3 kB | With provenance | Details for mavlab_logbook_client-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mavlab_logbook_client-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for mavlab_logbook_client-0.2.0-py3-none-any.whl |
Total release size: 43.6 kB
Release files / mavlab_logbook_client-0.2.0.tar.gz
| Download URL | mavlab_logbook_client-0.2.0.tar.gz |
|---|---|
| Size | 24.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8c6cb34008a400069d8ef95b1145828492cb5026f7f4aacb2282e4c8d481685c
|
|
BLAKE2b-256 checksum How to use checksums |
50d8b744e8b48e50d8fdbf817c9bde821080fd179ad8396e39d423274e600fc5
|
| 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 19, 2026.
Transparency logRelease files / mavlab_logbook_client-0.2.0-py3-none-any.whl
| Download URL | mavlab_logbook_client-0.2.0-py3-none-any.whl |
|---|---|
| Size | 19.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6b9a38a893693ac4fcba1575cc61728b1f7270f22c8d026f894d404c6ebe261e
|
|
BLAKE2b-256 checksum How to use checksums |
067f7fb4b25bdbed11e88f7b451c9f01900d5c4345489c3969e89ada55706e85
|
| 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 19, 2026.
Transparency logSecurity for mavlab-logbook-client 0.2.0
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.
Attestation for mavlab_logbook_client-0.2.0.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 19, 2026.
Transparency logA 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.