Changelog#
All notable changes to labapi are documented here in release order.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning. This changelog is written for package users and maintainers, so entries call out user-visible behavior, supported runtime changes, and release-engineering details that affect development workflows.
Unreleased#
1.3.0 - 2026-11-18#
Added#
Support for Python 3.14.
Client(ssl_host_bundle=True)verifies TLS certificates against the operating system’s trust store viatruststore, for networks behind a TLS-inspecting proxy whose root CA is installed only in the OS store. It requires the newlabapi[truststore]extra.NotebookPage.copy_to()andNotebookDirectory.copy_to()acceptstrict=True, which makes an entry that fails to copy abort the copy instead of being warned about and skipped.A changelog page in the documentation, rendered from
CHANGELOG.md.
Changed#
Network failures (DNS, connect, TLS, proxy, timeout, or a stream broken mid-read) now raise the new
labapi.TransportError, a subclass ofApiError, instead ofrequestsexceptions. Its message names only the exception type and the endpoint path, and it chains no original exception, so the signed request URL no longer reaches tracebacks or logs.HTTP error messages no longer include the request’s query string or the response body. They carry the status code, the endpoint path, and LabArchives’ error code and description; for a non-XML body, its
Content-Typeand size instead.When
copy_to()fails partway, the page or directory it created is moved to API Deleted Items instead of being left in the destination.User.get_max_upload_size()returns at most 250 MiB, the largest file the attachment upload endpoint accepts, even when the account reports a higher limit.Attachment.from_file()raisesTypeErrorfor a path-like object whose path isbytes, where it used to fail anassert.Unit tests now run on Windows and macOS as well as Linux.
Refreshed the locked dependencies and the development tools (
ruff0.17.5,ty0.0.104,pyright1.1.414,pytest9.2.0). The only runtime requirements that changed are the ones listed under Security.
Deprecated#
The
Client(strict_cert=...)option. Passing it explicitly now emits aDeprecationWarning; behavior is otherwise unchanged, and it has no effect whenssl_host_bundle=True. Usessl_host_bundle=Trueinstead.
Removed#
Support for Python 3.10, which reached end of life in October 2026, and for Python 3.11.0 through 3.11.4.
labapinow requires Python 3.11.5 or newer, the oldest version the security fixes for the lockedpillow,filelockandsoupsievedependencies are published for.
Fixed#
Entries.create_json_entry()now serializes every value itsJsonDatatype accepts: other sequence and mapping types (such asrangeorMappingProxyType) are converted to lists and dicts instead of raisingTypeError. Bytes-like values are rejected with a clearTypeError.Any 2xx HTTP status counts as success. A 201, 202 or 204 response used to raise
ApiError.Query parameters with an empty value are kept when a request URL is signed, instead of being dropped.
Browser login no longer hangs when another program connects to the local callback port without sending a request, and no longer loses the authentication code when the browser closes the connection early.
When
LA_AUTH_BROWSERis set and listing the installed browsers fails,labapifalls back to automatic browser detection instead of raising.Client.login()keeps a notebook whose default-notebook flag is missing or malformed. It used to leave that notebook out ofuser.notebooks."name" in containerisTruefor an existing empty directory, andIndex.Name: "name" in user.notebooksisFalsewhen no notebook has that name.The
TraversalErrorraised for a path that passes through a page names the page, not the full requested path.Notebook.backup()downloads to a temporary file and replaces the destination only when the download completes, so an interrupted backup no longer destroys an existing archive.Notebook.export()shortens file and directory names to 240 UTF-8 bytes, so long names in non-ASCII scripts no longer exceed the filesystem’s limit, and exports a backup attachment that has no stored filename asattachment_<id>instead of failing withTypeError.copy.copy()andcopy.deepcopy()of anAttachmentor aStreamingResponseno longer raiseRecursionError, and anAttachmentcan be pickled.The temporary file behind an attachment is closed when reading or downloading it fails partway.
A failed streaming request reads at most 64 KiB of the error response instead of the whole body.
Examples:
populate_notebook.pyno longer reports a false authentication error on Windows consoles that cannot print✓; themodel_loggingandnotebook_loggingloggers no longer raiseNodeExistsErrorfor two logs in the same second; andNotebookLoggerworks without IPython installed.
Security#
Raised the minimum
cryptography(to 50.0.0),lxml(to 6.1.1), andrequests(to 2.33.0) requirements to versions carrying published security fixes: cryptography’s PKCS#7 padding-oracle fix (CVE-2026-69247), lxml’sxlink:hrefsanitization and bundled libxslt fixes (CVE-2026-49825, CVE-2025-7424, CVE-2025-11731), and requests’extract_zipped_pathsfix (CVE-2026-25645).
1.2.0 - 2026-08-19#
Added#
Entries now expose optional read-only creation, update, and version metadata.
Clientaccepts atimeoutparameter, applied to every request it makes.Notebook.backup()downloads a notebook’s native LabArchives backup archive or JSON response, with options to omit attachment payloads.Notebook.export()materializes a notebook as a local directory tree, preserving empty directories and pages, entry ordering, attachments, and per-page metadata. The optionallabapi[export]extra reads native backup archives; the default source falls back to the live API when needed.Notebook.urlandNotebookPage.urlreturn authenticated LabArchives Web UI links, backed by a newClient.web_url.Entries returned by
Notebook.search()now carry the samecreated_at,updated_at, andversionmetadata as entries loaded from a page.to_datetime()converts LabArchives ISO-8601 timestamps and can be used as anextract_etree()mapper.
Changed#
The project is now distributed under the MIT License, replacing CC0-1.0.
Client base URLs now discard fragments and warn when they contain query parameters that cannot be preserved in API requests.
Versioned documentation shows only the newest release candidate and keeps the root and
latest/aliases on the newest final release.The LabArchives
4999error is no longer reproducible against the current API and has been removed from the limitations guide. The handling inAttachmentEntry.contentis unchanged.extract_etree(..., raise_missing=False)now omits a value its mapper rejects, warning rather than raisingExtractionError, so one malformed optional value no longer aborts the whole extraction. Strict extraction is unchanged.Updated the locked indirect Pillow dependency from 12.2.0 to 12.3.0.
Updated the locked
cryptographydependency from 48.0.1 to 50.0.0.
Fixed#
Authentication honors configured timeouts and token expiry, and
LA_AUTH_BROWSER=edgereliably selects Microsoft Edge.Tree traversal correctly handles escaped names, membership checks with
Index.Name, notebook-path hashing, and relative paths rooted at a notebook.Attachment uploads rewind seekable files when needed; cached attachment downloads stream in chunks; and attachment updates report LabArchives error 4999 with actionable context.
json_syncpreserves JSON attachments with duplicate basenames and records failures for individual attachment downloads instead of abandoning the entry.create_json_entry()raisesPartialEntryCreateErrorwhen an attachment is orphaned, and unsupported entry wrappers are rejected before creation.XML responses retain their original encoding,
EntrySearchtolerates disappearing result pages, and extraction errors handle mappers without a__name__attribute.PlainTextEntry.contentrejects non-string values before an API request, the public parse exceptions are available fromlabapi, and the API Deleted Items directory cannot be deleted accidentally.Attachment downloads recover the original filename from a redirected Amazon S3 URL when the response headers omit one.
Attachment entries keep the filename LabArchives reports in page and search listings, and the filename supplied at upload time, in preference to a generated download filename.
Entry parsing tolerates missing optional fields:
extract_etree()acceptsraise_missing=False, and pages load entries that omitentry-dataorcaption.Browser detection falls back to the remaining candidates when a configured browser probe raises an error, instead of failing outright.
default_authenticate()reports missinglabapi[builtin-auth]dependencies only for browser setup, so an unrelatedImportErrorraised later in the authentication flow is no longer masked by that message.The model-logging example escapes metadata and uses an ASCII-safe success message.
The
csv_tableexample preserves spaces around inline markup.
Security#
ApiErrormasks sensitive URL query parameters in its messages and tracebacks.The built-in authentication callback uses an unguessable loopback path and a plain-text response.
1.1.1 - 2026-07-05#
Fixed#
Fixed README documentation links that returned 404 by publishing a stable
latest/docs alias alongside the versioned directories.Corrected documentation errors: the
enumerate_all()depth example,create(parents=False)raisingValueErrorfor any multi-segment path, the exception hierarchy (PathError,ExtractionError,TreeChildParseError),User.notebookscaching, the scope ofstrict_cert=False(relaxes strict X.509 validation only, not certificate verification), the folder-download output layout diagram, andUnknownEntryvsUnimplementedEntrywrapping.
Changed#
Expanded documentation: full
Notebook.search()coverage (lazyEntrySearch, zero-basedpage()access, result-page metadata) and a new “Obtain API Keys” section.Copy-edited the documentation and public docstrings for precision and concision.
Security#
Raised the minimum
cryptographyrequirement to 48.0.1 and updated the locked version, dropping wheels that bundle a vulnerable OpenSSL (Dependabot alert 15).
1.1.0 - 2026-06-02#
Added#
Attachment.from_file()now accepts filesystemstrorPathobjects in addition to file-like objects.Notebook.search()for paginated LabArchives entry search results using normal entry objects.Support for escaped separators (
\/) in notebook paths, enabling access to and creation of notebook nodes with literal slashes in their names.Official support for Python 3.10 and 3.11.
typing-extensionsas a runtime dependency so code can use backported typing helpers such asSelf,override, andBufferwhile supporting Python 3.10.Lazy environment-variable loading through
labapi.util.env.getenv(). Whenpython-dotenvis installed,.envis loaded on first credential lookup instead of duringlabapi.clientimport.
Changed#
Refactored the
json_syncexample into a reusable utility with comprehensive tests.Rewrote the
csv_tableexample for improved clarity and usability.Refactored the
folder_downloadexample into clearer reusable download logic.Reworked entry factory fallback handling. Unknown upstream LabArchives part types now load as
UnknownEntry, while recognized but unimplemented part types load asUnimplementedEntry; both still reject unsupported updates.Updated attachment cloning to use an explicit random-access capability check instead of requiring every file-like object to expose a reliable
seekable()method.Kept spooled attachment buffers open after
Attachment.from_file()returns, while still preserving the caller’s original file cursor position.
Fixed#
Fixed runtime typing in
Attachment.from_file()to support both file-like and path-like inputs correctly.Improved
Attachment.from_file()support for random-access binary streams that do not exposeseekable().Fixed relative path resolution bugs when using the
/operator with absolute and relativeNotebookPathobjects.
1.0.3 - 2026-04-15#
Changed#
Refined the client auth flow and browser detection behavior.
Simplified tree path handling.
Switched the
1.0type-check workflow frommypytoty.Refreshed package metadata, README content, and Zenodo configuration.
Updated
pillowandpytest.
Fixed#
Restored datetime-based URL signing support.
Improved browser detection robustness when detectable values arrive with incorrect types.
Fixed test compatibility issues in the
1.0maintenance branch.Reduced tree creation complexity in the
v1.0.3stabilization pass.
1.0.2 - 2026-04-10#
Changed#
Cleaned up the PyPI README and related package metadata.
1.0.1 - 2026-04-10#
Added#
Initial TestPyPI publishing workflow.
GitHub issue templates.
Reusable GitHub Actions checks and broader local tooling support.
Changed#
Improved versioning and generated documentation metadata.
Refreshed contributor and Sphinx configuration docs.
Updated
cryptography,pygments, andrequests.
1.0.0 - 2026-04-01#
Added#
Initial stable release of
labapi.Support for LabArchives authentication, notebook tree traversal, and page and entry operations from Python.
Project documentation and example workflows for common notebook automation tasks.