Library which uses Canvasapi https://canvasapi.readthedocs.io/en/stable/getting-started.html 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.7.3.tar.gz
(25.6 kB
view details)
Built Distribution
File details
Details for the file canvasrobot-0.7.3.tar.gz
.
File metadata
- Download URL: canvasrobot-0.7.3.tar.gz
- Upload date:
- Size: 25.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.7 Darwin/23.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7bb024b3c77315a0847c0110afb78f6b848b32fe85f979662c1b174ea78055ed |
|
MD5 | f4bcc18d2ace8654b7dee5e79c12d19f |
|
BLAKE2b-256 | 13e7be1c1664025f41b5934a6c7f0a83295273ed77bee30cd7552adfd3f0896f |
File details
Details for the file canvasrobot-0.7.3-py3-none-any.whl
.
File metadata
- Download URL: canvasrobot-0.7.3-py3-none-any.whl
- Upload date:
- Size: 27.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.7 Darwin/23.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd43dd919d7c35bcb5a6b3b0d8e1701c0f6aa84365dfb801d0e33e75f51bf7b3 |
|
MD5 | d66dfcde762bf850ed873e24d9d52f7b |
|
BLAKE2b-256 | 371fe1584026cfc1201a1fd074c6b5624f8af2b57e8913816c17c8e57d00d18c |