src/google-classroom-extractor/edfi_google_classroom_extractor/api/teachers.py
def request_all_teachers_as_df(
    resource: Optional[Resource],
    course_ids: List[str],
    sync_db: sqlalchemy.engine.base.Engine,
) -> DataFrame:
    """
    Fetch Teachers API data for a range of courses and return a Teachers API DataFrame
    with current and previously fetched data

    Parameters
    ----------
    resource: Optional[Resource]
        a Google Classroom SDK Resource or None
    course_ids: List[str]
        a list of Google Classroom course ids as a string array
    sync_db: sqlalchemy.engine.base.Engine
        an Engine instance for creating database connections

    Returns
    -------
    DataFrame
        a Teachers API DataFrame with the current and previously fetched data

    Notes
    -----
    DataFrame columns are:
        courseId: Identifier of the course
        userId: Identifier of the user
        profile.id: Identifier of the user
        profile.name.givenName: The user's first name
        profile.name.familyName: The user's last name
        profile.name.fullName: The user's full name formed by concatenating the first and last name values
        profile.emailAddress: Email address of the user
    """

    teachers_df: DataFrame = request_latest_teachers_as_df(resource, course_ids)
    teachers_df = _sync_without_cleanup(teachers_df, sync_db)
    cleanup_after_sync(TEACHERS_RESOURCE_NAME, sync_db)

    return teachers_df

    Fetch Teachers API data for a range of courses and return a Teachers API DataFrame
    with current and previously fetched data

    Parameters
    ----------
    resource: Optional[Resource]
        a Google Classroom SDK Resource or None
    course_ids: List[str]
        a list of Google Classroom course ids as a string array
    sync_db: sqlalchemy.engine.base.Engine
        an Engine instance for creating database connections

    Returns
    -------
    DataFrame
        a Teachers API DataFrame with the current and previously fetched data

    Notes
    -----
    DataFrame columns are:
        courseId: Identifier of the course
        userId: Identifier of the user
        profile.id: Identifier of the user
        profile.name.givenName: The user's first name
        profile.name.familyName: The user's last name
        profile.name.fullName: The user's full name formed by concatenating the first and last name values
        profile.emailAddress: Email address of the user
    
Fetch Teachers API data for a range of courses and return a Teachers API DataFrame
with current and previously fetched data

Parameters

Optional[Resource]
a Google Classroom SDK Resource or None
course_ids: List[str]
a list of Google Classroom course ids as a string array
sync_db: sqlalchemy.engine.base.Engine
an Engine instance for creating database connections

Returns

DataFrame
a Teachers API DataFrame with the current and previously fetched data

Notes


Fetch Teachers API data for a range of courses and return a Teachers API DataFrame with current and previously fetched data Parameters Optional [ Resource ] a Google Classroom SDK Resource or None course_ids : List [ str ] a list of Google Classroom course ids as a string array sync_db : sqlalchemy . engine . base . Engine an Engine instance for creating database connections Returns DataFrame a Teachers API DataFrame with the current and previously fetched data Notes
def request_all_teachers_as_df(
    resource: Optional[Resource],
    course_ids: List[str],
    sync_db: sqlalchemy.engine.base.Engine,
) -> DataFrame:
    teachers_df: DataFrame = request_latest_teachers_as_df(resource, course_ids)
    teachers_df = _sync_without_cleanup(teachers_df, sync_db)
    cleanup_after_sync(TEACHERS_RESOURCE_NAME, sync_db)
    return teachers_df
def request_all_teachers_as_df ( resource : Optional [ Resource ] , course_ids : List [ str ] , sync_db : sqlalchemy . engine . base . Engine , ) -> DataFrame : teachers_df : DataFrame = request_latest_teachers_as_df ( resource , course_ids ) teachers_df = _sync_without_cleanup ( teachers_df , sync_db ) cleanup_after_sync ( TEACHERS_RESOURCE_NAME , sync_db ) return teachers_df
Fetch Teachers API data for a range of courses and return a Teachers API DataFrame
with current and previously fetched data
Fetch Teachers API data for a range of courses and return a Teachers API DataFrame with current and previously fetched data
"""
    Fetch Teachers API data for a range of courses and return a Teachers API DataFrame
    with current and previously fetched data

    Parameters
    ----------
    resource: Optional[Resource]
        a Google Classroom SDK Resource or None
    course_ids: List[str]
        a list of Google Classroom course ids as a string array
    sync_db: sqlalchemy.engine.base.Engine
        an Engine instance for creating database connections

    Returns
    -------
    DataFrame
        a Teachers API DataFrame with the current and previously fetched data

    Notes
    -----
    DataFrame columns are:
        courseId: Identifier of the course
        userId: Identifier of the user
        profile.id: Identifier of the user
        profile.name.givenName: The user's first name
        profile.name.familyName: The user's last name
        profile.name.fullName: The user's full name formed by concatenating the first and last name values
        profile.emailAddress: Email address of the user
    """
resource
Optional[Resource]
course_ids
List[str]
sync_db
sqlalchemy.engine.base.Engine