Inventory¶
Runnable example
python/examples/inventory_manage.py — make a temp dir → copy → move → list, then clean up.
resoio.inventory.InventoryClient ¶
Bases: _BaseClient[InventoryStub]
Async, stateless client for the Resonite IO Inventory service.
Use as an async context manager so the gRPC channel closes
deterministically. Socket resolution mirrors :class:resoio.ConnectionClient.
Source code in src/resoio/_client.py
list
async
¶
List the entries directly under path (ls).
mkdir
async
¶
Create a folder at path (mkdir).
copy
async
¶
Copy src to dst (cp); set recursive for folders
(cp -r).
Source code in src/resoio/inventory.py
move
async
¶
Move src to dst (mv; folders move recursively).
Source code in src/resoio/inventory.py
remove
async
¶
Remove path (rm); set recursive for folders (rm
-r).
Source code in src/resoio/inventory.py
spawn
async
¶
Spawn the item at path into the current world.
fetch_thumbnail
async
¶
Fetch the thumbnail image of the item at path.
Resolves the item's Record.ThumbnailURI server-side and returns
the raw image bytes plus their content type. Raises NotFound if
the item does not exist or has no thumbnail.
Source code in src/resoio/inventory.py
resoio.inventory.InventoryListing
dataclass
¶
Contents of a directory returned by :meth:InventoryClient.list.
resoio.inventory.InventoryEntry
dataclass
¶
InventoryEntry(
name: str,
path: str,
kind: InventoryEntryKind,
record_id: str,
asset_uri: str,
is_public: bool,
last_modified_unix_nanos: int,
)
One inventory entry (a folder or an item record).
| ATTRIBUTE | DESCRIPTION |
|---|---|
record_id |
Resonite cloud record id, empty for local-only entries.
TYPE:
|
asset_uri |
TYPE:
|
last_modified_unix_nanos |
Last-modified time in UTC nanoseconds since the Unix epoch.
TYPE:
|
resoio.inventory.InventoryEntryKind ¶
Bases: Enum
Kind of an inventory entry (mirrors Resonite Record.RecordType).
resoio.inventory.InventoryMutationResult
dataclass
¶
Result of a mutation (mkdir / cp / mv / rm).
resoio.inventory.InventorySpawnResult
dataclass
¶
Result of spawning an item into the world.
resoio.inventory.InventoryThumbnail
dataclass
¶
Thumbnail image of an inventory item.
| ATTRIBUTE | DESCRIPTION |
|---|---|
data |
Raw image bytes as stored on the Resonite CDN (typically WebP); returned verbatim, not re-encoded.
TYPE:
|
content_type |
MIME type of
TYPE:
|