기반 함수

This module defines a few utilities that ease complexities to support both synchronous and asynchronous API functions, using some tricks with Python metaclasses.

Unless your are contributing to the client SDK, probably you won’t have to use this module directly.

class ai.backend.client.func.base.APIFunctionMeta(name, bases, attrs, **kwargs)

Converts all methods marked with api_function() into session-aware methods that are either plain Python functions or coroutines.

mro()

Return a type’s method resolution order.

class ai.backend.client.func.base.BaseFunction
@ai.backend.client.func.base.api_function(meth)

Mark the wrapped method as the API function method.