Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion simvue/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,9 @@ def get_artifacts_as_files(
@prettify_pydantic
@pydantic.validate_call
def get_folder(
self, folder_path: typing.Annotated[str, pydantic.Field(pattern=FOLDER_REGEX)]
self,
folder_path: typing.Annotated[str, pydantic.Field(pattern=FOLDER_REGEX)],
read_only: bool = True,
) -> Folder | None:
"""Retrieve a folder by identifier

Expand All @@ -637,6 +639,10 @@ def get_folder(
folder_path : str
the path of the folder to retrieve on the server.
Paths are prefixed with `/`
read_only : bool, optional
whether the returned object should be editable or not,
default is True, the object is a cached copy of data
from the server.

Returns
-------
Expand All @@ -654,6 +660,8 @@ def get_folder(

try:
_, _folder = next(_folders)
if not read_only:
_folder.read_only(read_only)
return _folder
except StopIteration:
return None
Expand Down