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

    Parameters
    ----------
    resource: Optional[Resource]
        a Google Classroom SDK Resource
    course_ids: List[str]
        a list of course ids to retrieve coursework for
    sync_db: sqlalchemy.engine.base.Engine
        an Engine instance for creating database connections

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

    Notes
    -----
    DataFrame columns are:
        courseId: Identifier of the course
        id: Classroom-assigned identifier of this course work, unique per course
        title: Title of this course work
        description: Optional description of this course work
        state: Status of this course work
        alternateLink: Absolute link to this course work in the Classroom web UI
        creationTime: Timestamp when this course work was created
        updateTime: Timestamp of the most recent change to this course work
        maxPoints: Maximum grade for this course work
        workType: Type of this course work
        submissionModificationMode: Setting to determine when students are allowed
            to modify submissions
        assigneeMode: Assignee mode of the coursework
        creatorUserId: Identifier for the user that created the coursework
        dueDate.year: Optional year, in UTC, that submissions are due
        dueDate.month: Optional month, in UTC, that submissions are due
        dueDate.day: Optional day, in UTC, that submissions are due
        dueTime.hours: Optional hour, in UTC, that submissions are due
        dueTime.minutes: Optional minute, in UTC, that submissions are due
        scheduledTime: Optional timestamp when this course work is scheduled to be published
        topicId: Identifier for the topic that this coursework is associated with
        CreateDate: Date this record was created by the extractor
        LastModifiedDate: Date this record was last updated by the extractor
    """

    coursework_df: DataFrame = request_latest_coursework_as_df(resource, course_ids)
    coursework_df = _sync_without_cleanup(coursework_df, sync_db)
    cleanup_after_sync(ASSIGNMENTS_RESOURCE_NAME, sync_db)

    return coursework_df

    Fetch Coursework API data for all courses and return a Coursework API DataFrame

    Parameters
    ----------
    resource: Optional[Resource]
        a Google Classroom SDK Resource
    course_ids: List[str]
        a list of course ids to retrieve coursework for
    sync_db: sqlalchemy.engine.base.Engine
        an Engine instance for creating database connections

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

    Notes
    -----
    DataFrame columns are:
        courseId: Identifier of the course
        id: Classroom-assigned identifier of this course work, unique per course
        title: Title of this course work
        description: Optional description of this course work
        state: Status of this course work
        alternateLink: Absolute link to this course work in the Classroom web UI
        creationTime: Timestamp when this course work was created
        updateTime: Timestamp of the most recent change to this course work
        maxPoints: Maximum grade for this course work
        workType: Type of this course work
        submissionModificationMode: Setting to determine when students are allowed
            to modify submissions
        assigneeMode: Assignee mode of the coursework
        creatorUserId: Identifier for the user that created the coursework
        dueDate.year: Optional year, in UTC, that submissions are due
        dueDate.month: Optional month, in UTC, that submissions are due
        dueDate.day: Optional day, in UTC, that submissions are due
        dueTime.hours: Optional hour, in UTC, that submissions are due
        dueTime.minutes: Optional minute, in UTC, that submissions are due
        scheduledTime: Optional timestamp when this course work is scheduled to be published
        topicId: Identifier for the topic that this coursework is associated with
        CreateDate: Date this record was created by the extractor
        LastModifiedDate: Date this record was last updated by the extractor
    
Fetch Coursework API data for all courses and return a Coursework API DataFrame
Parameters

Optional[Resource]
a Google Classroom SDK Resource
course_ids: List[str]
a list of course ids to retrieve coursework for
sync_db: sqlalchemy.engine.base.Engine
an Engine instance for creating database connections

Returns

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

Notes


Fetch Coursework API data for all courses and return a Coursework API DataFrame Parameters Optional [ Resource ] a Google Classroom SDK Resource course_ids : List [ str ] a list of course ids to retrieve coursework for sync_db : sqlalchemy . engine . base . Engine an Engine instance for creating database connections Returns DataFrame a Coursework API DataFrame with the current and previously fetched data Notes
def request_all_coursework_as_df(
    resource: Optional[Resource],
    course_ids: List[str],
    sync_db: sqlalchemy.engine.base.Engine,
) -> DataFrame:
    coursework_df: DataFrame = request_latest_coursework_as_df(resource, course_ids)
    coursework_df = _sync_without_cleanup(coursework_df, sync_db)
    cleanup_after_sync(ASSIGNMENTS_RESOURCE_NAME, sync_db)
    return coursework_df
def request_all_coursework_as_df ( resource : Optional [ Resource ] , course_ids : List [ str ] , sync_db : sqlalchemy . engine . base . Engine , ) -> DataFrame : coursework_df : DataFrame = request_latest_coursework_as_df ( resource , course_ids ) coursework_df = _sync_without_cleanup ( coursework_df , sync_db ) cleanup_after_sync ( ASSIGNMENTS_RESOURCE_NAME , sync_db ) return coursework_df
Fetch Coursework API data for all courses and return a Coursework API DataFrame
Parameters
Fetch Coursework API data for all courses and return a Coursework API DataFrame Parameters
"""
    Fetch Coursework API data for all courses and return a Coursework API DataFrame

    Parameters
    ----------
    resource: Optional[Resource]
        a Google Classroom SDK Resource
    course_ids: List[str]
        a list of course ids to retrieve coursework for
    sync_db: sqlalchemy.engine.base.Engine
        an Engine instance for creating database connections

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

    Notes
    -----
    DataFrame columns are:
        courseId: Identifier of the course
        id: Classroom-assigned identifier of this course work, unique per course
        title: Title of this course work
        description: Optional description of this course work
        state: Status of this course work
        alternateLink: Absolute link to this course work in the Classroom web UI
        creationTime: Timestamp when this course work was created
        updateTime: Timestamp of the most recent change to this course work
        maxPoints: Maximum grade for this course work
        workType: Type of this course work
        submissionModificationMode: Setting to determine when students are allowed
            to modify submissions
        assigneeMode: Assignee mode of the coursework
        creatorUserId: Identifier for the user that created the coursework
        dueDate.year: Optional year, in UTC, that submissions are due
        dueDate.month: Optional month, in UTC, that submissions are due
        dueDate.day: Optional day, in UTC, that submissions are due
        dueTime.hours: Optional hour, in UTC, that submissions are due
        dueTime.minutes: Optional minute, in UTC, that submissions are due
        scheduledTime: Optional timestamp when this course work is scheduled to be published
        topicId: Identifier for the topic that this coursework is associated with
        CreateDate: Date this record was created by the extractor
        LastModifiedDate: Date this record was last updated by the extractor
    """
resource
Optional[Resource]
course_ids
List[str]
sync_db
sqlalchemy.engine.base.Engine