MCPcopy Index your code
hub / github.com/dagger/dagger / register

Method register

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

Register the module and its types with the Dagger API.

(self)

Source from the content-addressed store, hash-verified

114 await dag.current_function_call().return_value(dagger.JSON(output))
115
116 async def register(self):
117 """Register the module and its types with the Dagger API."""
118 try:
119 result = await self._typedefs()
120 output = json.dumps(result)
121 except TypeError as e:
122 raise RegistrationError(str(e), e) from e
123 await anyio.Path(TYPE_DEF_FILE).write_text(output)
124
125 async def _typedefs(self) -> str: # noqa: C901, PLR0912, PLR0915
126 if not self._main_name:

Callers 7

mainFunction · 0.45
test_cli_exec_errorsFunction · 0.45
test_log_output_stringioFunction · 0.45
test_stderrFunction · 0.45

Calls 3

_typedefsMethod · 0.95
RegistrationErrorClass · 0.90
PathMethod · 0.45

Tested by 6

test_cli_exec_errorsFunction · 0.36
test_log_output_stringioFunction · 0.36
test_stderrFunction · 0.36