Example Applications#

These runnable examples show end-to-end workflows built on top of the core labapi APIs. Start with Installation if you still need to set up the recommended local interactive profile.

Example Matrix#

Example

Best For

Extra Packages

JSON Folder Sync

Syncing JSON attachments and previews between a local folder and a LabArchives page

none

Folder Structure Download

Exporting notebook structure to local files for backup, review, or archival

none

CSV Table Upload/Download

Converting CSV data to LabArchives HTML tables and round-tripping back to CSV

beautifulsoup4

Published Examples#

Getting Started#

All published examples assume:

  • Python 3.12+.

  • The recommended local interactive profile: labapi[dotenv,builtin-auth].

  • A repository-root working directory when you run uv run ... commands.

  • Notebook-relative page paths paired with --notebook "My Notebook".

Use these sample commands as known-good starting points:

uv run python examples/json_sync/json_sync.py upload examples/json_sync/sample_data "Experiments/2024/Data Analysis" --notebook "My Notebook"
uv run python examples/folder_download/folder_download.py ./backup --notebook "My Notebook" --path "Experiments/2024"
uv run --with beautifulsoup4 python examples/csv_table/csv_table.py upload examples/csv_table/sample_data.csv "Experiments/Results" --notebook "My Notebook"

Additional Local Examples#

The repository also includes examples/model_logging and examples/notebook_logging. They are maintained alongside the published examples above, but do not yet have dedicated Sphinx pages.