Skip to main content

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

CanvasAPI

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
    #                                    )

[PyPI version]

Project details


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.8.tar.gz (130.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

canvasrobot-0.8.8-py3-none-any.whl (34.9 kB view details)

Uploaded Python 3

File details

Details for the file canvasrobot-0.8.8.tar.gz.

File metadata

  • Download URL: canvasrobot-0.8.8.tar.gz
  • Upload date:
  • Size: 130.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.4

File hashes

Hashes for canvasrobot-0.8.8.tar.gz
Algorithm Hash digest
SHA256 efb39bbb49cee4e08e6967107fe2bdf9d6b6242ade121095d5652b9311dd1fc9
MD5 9e65e1537f2cbae34ea346e5df3c8ecb
BLAKE2b-256 4471621af73667ced8c0008c9511b232dc31dae60d8bdbd302fefe663f3689d8

See more details on using hashes here.

File details

Details for the file canvasrobot-0.8.8-py3-none-any.whl.

File metadata

File hashes

Hashes for canvasrobot-0.8.8-py3-none-any.whl
Algorithm Hash digest
SHA256 3bd62ab2dfd26216cd1996c16c86d287f3a3b940b25dd615573d23cae27abb9e
MD5 5c2030eaae2e3a97f262248a4d33bf63
BLAKE2b-256 75d2df3a4d094c8bd15ee57fce8578db47c78a2a857c7d04ee05d695977368a8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page