0.2.1

User

Package: flyteplugins.union.remote

Represents a Union user.

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

Properties

Property Type Description
email None
first_name None
last_name None
subject None

Methods

Method Description
create() Create (invite) a new user.
delete() Delete a user.
get() Get a user by subject identifier.
listall() List all users in the organization.
to_dict() Convert the object to a JSON-serializable dictionary.
to_json() Convert the object to a JSON string.

create()

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.create.aio().

def create(
    cls,
    first_name: str,
    last_name: str,
    email: str,
) -> User

Create (invite) a new user.

Parameter Type Description
cls
first_name str The user’s first name.
last_name str The user’s last name.
email str The user’s email address.

delete()

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.delete.aio().

def delete(
    cls,
    subject: str,
)

Delete a user.

Parameter Type Description
cls
subject str

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,
    subject: str,
) -> User

Get a user by subject identifier.

Parameter Type Description
cls
subject str

listall()

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.listall.aio().

def listall(
    cls,
    limit: int,
    email: str | None,
) -> AsyncIterator[User]

List all users in the organization.

Parameter Type Description
cls
limit int Maximum number of users to return.
email str | None Filter by email (server-side, exact match).

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.