Library which uses Canvasapi (see https://canvasapi.readthedocs.io) to provide a CanvasRobot class.
Project description
CanvasRobot
Library which uses Canvasapi to provide a CanvasRobot class for GUI and commandline use (Rich)
Uses
Used
In word2quiz library.
Not yet ready for general use...
Examples:
import rich
import canvasrobot as cr
if __name__ == '__main__':
console = rich.console.Console(width=160, force_terminal=True)
robot = cr.CanvasRobot(reset_api_keys=False,
console=console)
# robot.update_database_from_canvas()
robot.create_folder_in_all_courses('Tentamens')
# result = robot.enroll_in_course("", 4472, 'u752058',
# 'StudentEnrollment') # (enrollment={'type': 'StudentEnrollment'}
# user = robot.search_user('u752058')
# print(user)
# if not user:
# print(robot.errors)
#COURSE_ID = 9999 # test course
#result = robot.create_folder_in_course_files(COURSE_ID, 'Tentamens')
# print(robot.course_metada(COURSE_ID))
# print(robot.unpublish_folderitems_in_course(COURSE_ID,
# foldername,
# files_too=True))
#course = robot.get_course(COURSE_ID)
# tab = robot.get_course_tab_by_label(COURSE_ID, "Files")
# print(tab.visibility)
# for course_id in (COURSE_ID, COURSE_ID2):
# result = robot.create_folder_in_course_files(course_id, 'Tentamens')
# result = robot.unpublish_subfolder_in_all_courses(foldername,
# files_too=True,
# check_only=True)
# if course_ids_missing_folder:
# logging.info(f"Courses with missing folder {foldername}: {course_ids_missing_folder}")
# QUIZZES -----------------------------
# filename = 'Q_A.docx'
# robot.create_quizzes_from_document(filename=filename,
# course_id=COURSE_ID,
# question_format='Vraag {}. Vertaal:',
# adjust_fontsize=True,
# testrun=False
# )
[]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
canvasrobot-0.8.13.tar.gz
(130.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file canvasrobot-0.8.13.tar.gz.
File metadata
- Download URL: canvasrobot-0.8.13.tar.gz
- Upload date:
- Size: 130.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46833c54e19f5a3de4a5f3a57a84d171c9a7b8c5f91a9710f76d7937e7f78197
|
|
| MD5 |
a5bddaa523c1aeb233d0aac65447adeb
|
|
| BLAKE2b-256 |
dfc52b1ee400c6f0aed96ee69c1b7280789995f0686d7a6feac13059ef7d9d38
|
File details
Details for the file canvasrobot-0.8.13-py3-none-any.whl.
File metadata
- Download URL: canvasrobot-0.8.13-py3-none-any.whl
- Upload date:
- Size: 35.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e1d4e0c1192f779662e3e644fb61a37a728c2d0a07b3bcd8e4cf466f07b40ce
|
|
| MD5 |
cd1e0b0bb2ac63960fa43d17ffcfa845
|
|
| BLAKE2b-256 |
cc1efc08f8212b6c6eae8a667ed4637d10e4ca1bc3edde6b5241e5052d864e29
|