src/canvas-extractor/tests/data_generation/users.py
def generate_and_load_users(account: Account, record_count: int) -> List[User]:
    """
    Generate and load a number of users into the Canvas API.

    Parameters
    ----------
    canvas : Canvas
        A Canvas SDK object
    record_count : int
        The number of users to generate.

    Returns
    -------
    List[User]
        A list Canvas SDK User objects representing the created users
    """
    assert record_count > 0, "Number of users to generate must be greater than zero"

    users: List[Dict] = generate_users(record_count)

    result: List[User] = []
    try:
        result = load_users(account, users)
    except Exception as ex:
        logger.exception(ex)

    return result

    Generate and load a number of users into the Canvas API.

    Parameters
    ----------
    canvas : Canvas
        A Canvas SDK object
    record_count : int
        The number of users to generate.

    Returns
    -------
    List[User]
        A list Canvas SDK User objects representing the created users
    
Generate and load a number of users into the Canvas API.
Parameters

canvas : Canvas
A Canvas SDK object
record_count : int
The number of users to generate.

Returns

List[User]
A list Canvas SDK User objects representing the created users
Generate and load a number of users into the Canvas API . Parameters canvas : Canvas A Canvas SDK object record_count : int The number of users to generate . Returns List [ User ] A list Canvas SDK User objects representing the created users
def generate_and_load_users(account: Account, record_count: int) -> List[User]:
    assert record_count > 0, "Number of users to generate must be greater than zero"
    users: List[Dict] = generate_users(record_count)
    result: List[User] = []
    try:
        result = load_users(account, users)
    except Exception as ex:
        logger.exception(ex)
    return result
def generate_and_load_users ( account : Account , record_count : int ) -> List [ User ] : assert record_count > 0 , "Number of users to generate must be greater than zero" users : List [ Dict ] = generate_users ( record_count ) result : List [ User ] = [ ] try : result = load_users ( account , users ) except Exception as ex : logger . exception ( ex ) return result
Generate and load a number of users into the Canvas API.
Generate and load a number of users into the Canvas API .
"""
    Generate and load a number of users into the Canvas API.

    Parameters
    ----------
    canvas : Canvas
        A Canvas SDK object
    record_count : int
        The number of users to generate.

    Returns
    -------
    List[User]
        A list Canvas SDK User objects representing the created users
    """
account
Account
record_count
int