Skip to main content

object_from_uuid

GitHub source

object_from_uuid

evo.objects.typed.base.object_from_uuid

object_from_uuid(context: IContext, uuid: UUID | str, version: str | None = None) -> _BaseObject

Download a GeoscienceObject by its UUID and create the appropriate typed instance.

This function downloads the object using its unique identifier (UUID) and automatically selects the correct typed class (e.g., PointSet, Regular3DGrid) based on the object's sub-classification.

Parameters:

NameTypeDescriptionDefault
contextIContextThe context for connecting to Evo APIs.required
uuidUUID | strThe UUID of the object to download (as a UUID object or string).required
versionstr | NoneOptional version ID string to download a specific version.None

Returns:

TypeDescription
_BaseObjectA typed GeoscienceObject instance (PointSet, Regular3DGrid, etc.).

Raises:

TypeDescription
ValueErrorIf no typed class is found for the object's sub-classification. Example:: from evo.objects.typed import object_from_uuid # Download latest version by UUID obj = await object_from_uuid(context, "b208a6c9-6881-4b97-b02d-acb5d81299bb") # Download specific version obj = await object_from_uuid(context, "b208a6c9-6881-4b97-b02d-acb5d81299bb", version="abc123")

What is the reason for your feedback?