Created
October 11, 2022 17:33
-
-
Save kevinlin1/dd3490a48483d365e7252a6b3a066ea3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from canvasapi import Canvas | |
import os | |
if __name__ == "__main__": | |
canvas = Canvas("https://canvas.uw.edu", os.getenv("TOKEN")) | |
course = canvas.get_course(os.getenv("COURSE_ID")) | |
groups = course.get_groups() | |
for group in groups: | |
students = ",".join(user.login_id for user in group.get_users()) | |
print(students + ":" + group.name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment