get_object#

geodesic.entanglement.object.get_object(*, name, object_class=None, domain=None, category=None, type=None, project=None, version_datetime=None, deleted=False)[source]#

Gets a single object.

This is a wrapper around get_objects that ensures only one object is returned. This function raises if get_objects doesn’t return exactly one Object.

Parameters:
  • name (str) – the name of the object to get. This is required.

  • object_class (str | None) – the class of the object to get. This is optional.

  • domain (str | None) – the domain of the object to get. This is optional.

  • category (str | None) – the category of the object to get. This is optional.

  • type (str | None) – the type of the object to get. This is optional.

  • project (Project | str | None) – the project to get the object from. This is optional, and will default to the active project if not specified.

  • version_datetime (str | datetime | None) – search for versions of nodes that were valid at this datetime.

  • deleted (bool) – If true, will return deletd objects

Returns:

An Object matching the query.

Return type:

Object