Skip to main content

BaseObject

GitHub source

BaseObject

evo.objects.typed.base.BaseObject

Base object for all Geoscience Objects, containing common properties.

create

create(context: IContext, data: BaseObjectData, parent: str | None = None, path: str | None = None) -> BaseObject

Create a new object.

The type of Geoscience Object created is determined by the type of data provided.

Parameters:

NameTypeDescriptionDefault
contextIContextThe context containing the environment, connector, and cache to use.required
dataBaseObjectDataThe data that will be used to create the object.required
parentstr | NoneOptional parent path for the object.None
pathstr | NoneFull path to the object, can't be used with parent.None

replace

replace(context: IContext, reference: str, data: BaseObjectData) -> BaseObject

Replace an existing object.

The type of Geoscience Object that will be replaced is determined by the type of data provided. This must match the type of the existing object.

Parameters:

NameTypeDescriptionDefault
contextIContextThe context containing the environment, connector, and cache to use.required
referencestrThe reference of the object to replace.required
dataBaseObjectDataThe data that will be used to create the object.required

create_or_replace

create_or_replace(context: IContext, reference: str, data: BaseObjectData) -> BaseObject

Create or replace an existing object.

If the object identified by reference exists, it will be replaced. Otherwise, a new object will be created.

The type of Geoscience Object that will be created or replaced is determined by the type of data provided. This must match the type of the existing object if it already exists.

Parameters:

NameTypeDescriptionDefault
contextIContextThe context containing the environment, connector, and cache to use.required
referencestrThe reference of the object to create or replace.required
dataBaseObjectDataThe data that will be used to create the object.required

What is the reason for your feedback?