Example Applications#

These examples show complete scripts for JSON sync, folder export, and CSV table conversion. 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

Uploading JSON files to a page and downloading JSON attachments back to disk

none

Folder Structure Download

Exporting notebook pages and entries to local files for backup or review

none

CSV Table Upload/Download

Converting CSV data to LabArchives HTML tables and back to CSV

beautifulsoup4

Getting Started#

All published examples assume:

  • Python 3.10+.

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

  • Run the uv run --project ... commands below from the repository root.

  • Use page paths relative to the notebook root, together with --notebook "My Notebook".

Use these sample commands as starting points:

uv run --project examples/json_sync python examples/json_sync/json_sync.py upload examples/json_sync/sample_data "Experiments/2024/Data Analysis" --notebook "My Notebook"
uv run --project examples/folder_download python examples/folder_download/folder_download.py ./backup --notebook "My Notebook" --path "Experiments/2024"
uv run --project examples/csv_table 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 in the repository but are not covered by these Sphinx example pages.