Cloud archive catalog¶
List all cloud-stored archive artifacts — bags, videos, and images — via
client.platform.archive.
from olo import Client
def print_section(title: str, items: list[str]) -> None:
print(f"{title} ({len(items)})")
if items:
for line in items:
print(f" {line}")
else:
print(" (none)")
with Client() as client:
archive = client.platform.archive
print_section(
"Bags",
[
f"{bag.name} robot={bag.robot_name or bag.robot_id} location={bag.location.value}"
for bag in archive.list_bags()
],
)
print_section(
"Videos",
[
f"{video.filename} robot={video.robot_name or video.robot_id} location={video.location.value}"
for video in archive.list_videos()
],
)
print_section(
"Images",
[
f"{image.filename} robot={image.robot_name or image.robot_id} location={image.location.value}"
for image in archive.list_images()
],
)
import { connect } from "olo/web";
const client = connect();
function printSection(title: string, items: { label: string }[]): void {
console.log(`${title} (${items.length})`);
for (const item of items) {
console.log(` ${item.label}`);
}
if (items.length === 0) {
console.log(" (none)");
}
}
// Cloud platform archive catalog
printSection(
"Bags",
(await client.platform.archive.listBags()).map((bag) => ({
label: `${bag.name} robot=${bag.robotName || bag.robotId} location=${bag.location}`,
})),
);
printSection(
"Videos",
(await client.platform.archive.listVideos()).map((video) => ({
label: `${video.filename} robot=${video.robotName || video.robotId} location=${video.location}`,
})),
);
printSection(
"Images",
(await client.platform.archive.listImages()).map((image) => ({
label: `${image.filename} robot=${image.robotName || image.robotId} location=${image.location}`,
})),
);