evo.objects.typed.base.object_from_path
object_from_path(context: IContext, path: str, version: str | None = None) -> _BaseObject
Download a GeoscienceObject by its path and create the appropriate typed instance.
This function downloads the object using its path (the hierarchical location/name in the workspace) and automatically selects the correct typed class (e.g., PointSet, Regular3DGrid) based on the object's sub-classification.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
context
|
IContext
|
The context for connecting to Evo APIs. |
required |
path
|
str
|
The object path (e.g., "my-folder/my-object.json" or "/my-folder/my-object.json"). |
required |
version
|
str | None
|
Optional version ID string to download a specific version. |
None
|
Returns:
| Type | Description |
|---|---|
_BaseObject
|
A typed GeoscienceObject instance (PointSet, Regular3DGrid, etc.). |
Raises:
| Type | Description |
|---|---|
ValueError
|
If no typed class is found for the object's sub-classification. Example:: from evo.objects.typed import object_from_path # Download latest version by path obj = await object_from_path(context, "my-folder/pointset.json") # Download specific version obj = await object_from_path(context, "my-folder/pointset.json", version="abc123") |