2.0.0b53
User
Package: flyte.remote
Represents a user in the Flyte platform.
class User(
pb2: UserInfoResponse,
)| Parameter | Type | Description |
|---|---|---|
pb2 |
UserInfoResponse |
Methods
| Method | Description |
|---|---|
get() |
Fetches information about the currently logged in user. |
name() |
Get the name of the user. |
subject() |
Get the subject identifier of the user. |
to_dict() |
Convert the object to a JSON-serializable dictionary. |
to_json() |
Convert the object to a JSON string. |
get()
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,
) -> UserFetches information about the currently logged in user. Returns: A User object containing details about the user.
| Parameter | Type | Description |
|---|---|---|
cls |
name()
def name()Get the name of the user.
subject()
def subject()Get the subject identifier of the user.
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.