src/google-classroom-extractor/edfi_google_classroom_extractor/api/courses.py
def request_all_courses_as_df(
    resource: Optional[Resource], sync_db: sqlalchemy.engine.base.Engine
) -> DataFrame:
    """
    Fetch Course API data for all courses and return a Courses API DataFrame

    Parameters
    ----------
    resource: Optional[Resource]
        a Google Classroom SDK Resource
    sync_db: sqlalchemy.engine.base.Engine
        an Engine instance for creating database connections

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

    Notes
    -----
    DataFrame columns are:
        id: Identifier for this course assigned by Classroom
        name: Name of the course
        section: Section of the course
        descriptionHeading: Optional heading for the description
        description: Optional description
        room: Optional room location
        ownerId: The identifier of the owner of a course
        creationTime: Creation time of the course
        updateTime: Time of the most recent update to this course
        enrollmentCode: Enrollment code to use when joining this course
        courseState: State of the course
        alternateLink: Absolute link to this course in the Classroom web UI
        teacherGroupEmail: The email address of a Google group containing all teachers of the course
        courseGroupEmail: The email address of a Google group containing all members of the course
        teacherFolder.id: The identifier of the teacher folder
        teacherFolder.title: The identifier of the teacher folder,
        teacherFolder.alternateLink: Absolute link to the teacher folder in the Classroom web UI
        guardiansEnabled: Whether or not guardian notifications are enabled for this course
        calendarId: The Calendar ID for a calendar that all course members can see
        CreateDate: Date this record was created by the extractor
        LastModifiedDate: Date this record was last updated by the extractor
    """

    courses_df = request_latest_courses_as_df(resource)
    courses_df = _sync_without_cleanup(courses_df, sync_db)
    cleanup_after_sync(COURSES_RESOURCE_NAME, sync_db)

    return courses_df

    Fetch Course API data for all courses and return a Courses API DataFrame

    Parameters
    ----------
    resource: Optional[Resource]
        a Google Classroom SDK Resource
    sync_db: sqlalchemy.engine.base.Engine
        an Engine instance for creating database connections

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

    Notes
    -----
    DataFrame columns are:
        id: Identifier for this course assigned by Classroom
        name: Name of the course
        section: Section of the course
        descriptionHeading: Optional heading for the description
        description: Optional description
        room: Optional room location
        ownerId: The identifier of the owner of a course
        creationTime: Creation time of the course
        updateTime: Time of the most recent update to this course
        enrollmentCode: Enrollment code to use when joining this course
        courseState: State of the course
        alternateLink: Absolute link to this course in the Classroom web UI
        teacherGroupEmail: The email address of a Google group containing all teachers of the course
        courseGroupEmail: The email address of a Google group containing all members of the course
        teacherFolder.id: The identifier of the teacher folder
        teacherFolder.title: The identifier of the teacher folder,
        teacherFolder.alternateLink: Absolute link to the teacher folder in the Classroom web UI
        guardiansEnabled: Whether or not guardian notifications are enabled for this course
        calendarId: The Calendar ID for a calendar that all course members can see
        CreateDate: Date this record was created by the extractor
        LastModifiedDate: Date this record was last updated by the extractor
    
Fetch Course API data for all courses and return a Courses API DataFrame
Parameters

Optional[Resource]
a Google Classroom SDK Resource
sync_db: sqlalchemy.engine.base.Engine
an Engine instance for creating database connections

Returns

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

Notes


Fetch Course API data for all courses and return a Courses API DataFrame Parameters Optional [ Resource ] a Google Classroom SDK Resource sync_db : sqlalchemy . engine . base . Engine an Engine instance for creating database connections Returns DataFrame a Courses API DataFrame with the current and previously fetched data Notes
def request_all_courses_as_df(
    resource: Optional[Resource], sync_db: sqlalchemy.engine.base.Engine
) -> DataFrame:
    courses_df = request_latest_courses_as_df(resource)
    courses_df = _sync_without_cleanup(courses_df, sync_db)
    cleanup_after_sync(COURSES_RESOURCE_NAME, sync_db)
    return courses_df
def request_all_courses_as_df ( resource : Optional [ Resource ] , sync_db : sqlalchemy . engine . base . Engine ) -> DataFrame : courses_df = request_latest_courses_as_df ( resource ) courses_df = _sync_without_cleanup ( courses_df , sync_db ) cleanup_after_sync ( COURSES_RESOURCE_NAME , sync_db ) return courses_df
Fetch Course API data for all courses and return a Courses API DataFrame
Parameters
Fetch Course API data for all courses and return a Courses API DataFrame Parameters
"""
    Fetch Course API data for all courses and return a Courses API DataFrame

    Parameters
    ----------
    resource: Optional[Resource]
        a Google Classroom SDK Resource
    sync_db: sqlalchemy.engine.base.Engine
        an Engine instance for creating database connections

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

    Notes
    -----
    DataFrame columns are:
        id: Identifier for this course assigned by Classroom
        name: Name of the course
        section: Section of the course
        descriptionHeading: Optional heading for the description
        description: Optional description
        room: Optional room location
        ownerId: The identifier of the owner of a course
        creationTime: Creation time of the course
        updateTime: Time of the most recent update to this course
        enrollmentCode: Enrollment code to use when joining this course
        courseState: State of the course
        alternateLink: Absolute link to this course in the Classroom web UI
        teacherGroupEmail: The email address of a Google group containing all teachers of the course
        courseGroupEmail: The email address of a Google group containing all members of the course
        teacherFolder.id: The identifier of the teacher folder
        teacherFolder.title: The identifier of the teacher folder,
        teacherFolder.alternateLink: Absolute link to the teacher folder in the Classroom web UI
        guardiansEnabled: Whether or not guardian notifications are enabled for this course
        calendarId: The Calendar ID for a calendar that all course members can see
        CreateDate: Date this record was created by the extractor
        LastModifiedDate: Date this record was last updated by the extractor
    """
resource
Optional[Resource]
sync_db
sqlalchemy.engine.base.Engine