2.0.0b35

User

Package: flyte.remote

class User(
    pb2: UserInfoResponse,
)
Parameter Type Description
pb2 UserInfoResponse

Methods

Method Description
get() Fetches information about the currently logged in user.
name()
subject()
to_dict() Convert the object to a JSON-serializable dictionary.
to_json() Convert the object to a JSON string.

get()

This method can be called both synchronously or asynchronously.

Default invocation is sync and will block. To call it asynchronously, use the function .aio() on the method name itself, e.g.,: result = await User.get.aio().

def get(
    cls,
) -> User

Fetches information about the currently logged in user. Returns: A User object containing details about the user.

Parameter Type Description
cls

name()

def name()

subject()

def subject()

to_dict()

def to_dict()

Convert the object to a JSON-serializable dictionary.

Returns: dict: A dictionary representation of the object.

to_json()

def to_json()

Convert the object to a JSON string.

Returns: str: A JSON string representation of the object.