Workspace
The Workspace class manages static and dynamic file serving with support for multiple search paths (overlay), similar to how $PATH works for executables.
Overview
When assets are spread across multiple directories, Workspace provides a unified interface to serve them all:
API Summary
| Method | Description |
|---|---|
vuer.workspace.link(target, "/path") | Link file or callable to URL |
vuer.workspace.unlink("/path") | Remove a link |
vuer.workspace.find("file.txt") | Find file in overlay |
vuer.workspace.mount("./dir", to="/route") | Mount single directory |
vuer.workspace.paths | Access paths (read-only tuple) |
Usage Examples
Basic Usage
Overlay Behavior
The overlay works like $PATH - paths are searched in order:
Dynamic Links
Links can be added and removed at runtime. The link() method accepts either a file path or a callable:
Custom MIME Types
Add custom MIME types for auto-detection in link() and static file serving:
Future Workspace Types
The Workspace interface is designed for extensibility:
Workspace- Local filesystem (current)DashWorkspace- ML-Dash experiments (future)McapWorkspace- MCAP recordings (future)S3Workspace- S3 buckets (future)
All workspace types will share the same interface (overlay(), mount(), link()).