MCPcopy Create free account
hub / github.com/dagger/dagger / get_object

Method get_object

sdk/python/src/dagger/mod/_module.py:474–483  ·  view source on GitHub ↗

Get the object type definition for the given name.

(self, name: str)

Source from the content-addressed store, hash-verified

472 return await asyncify(self._converter.unstructure, obj, unstructure_as)
473
474 def get_object(self, name: str) -> ObjectType:
475 """Get the object type definition for the given name."""
476 try:
477 return self._objects[name]
478 except KeyError:
479 # Not expected to happen during invoke because registration should
480 # fail first.
481 msg = f"No '@dagger.object_type' decorated class named '{name}' was found"
482 extra = {"objects_found": self._objects.keys()}
483 raise ObjectNotFoundError(msg, extra=extra) from None
484
485 async def _get_parent_instance(
486 self,

Calls 2

ObjectNotFoundErrorClass · 0.90
keysMethod · 0.80