Saravanan666/pypi-org huggingface dataset:
Package: canvasdl
CanvasdlTired of managing your course content on 5-10 different platforms?
Canvasdl comes to the rescue and saves you hours of work when studying and completing assignments.
This convenient package:Synchronizes all your course content to local filesSynchronizes your assignment dates to google calendarShows you what items are newRemembers your progress through course materialsKeeps you up to date without overwhelming you with useless notificationsSynchronizes content available on:Canvas:AnnouncementsAssignmentsCourse filesVideo recordingsCourse websitesEd DiscussionGoogle DrivePiazzaGradescopeDeveloped for:Students at Columbia UniversityLinux OS.Useful for any school using any of the listed platformsContact developer for other OS/platforms support.InstallationMake sure you are using python3.10+Install the packagepipinstallcanvasdlObtain Canvas API keyColumbia University studentsGo to Courseworks > Account > SettingsClick on "New Access Token"[Optional] Obtain Google CalendarAPI key[Optional] Specify customCalendar IDConfigure your settings:canvasdl--configureInstall package for local file managementxattrmediainfo[Optional] Install package for UI progress during synchronizationpython-pyqt6pip install PyQt6UsageRun command to synchronize all content and check for updatescanvasdlQuickstartTo quickly experiment with the package you can run thequickstartin Google Collab.
Package: canvasgrader
This package provides a simple interface with the Canvas grading API to
save you the hassle of dealing with the web gradebook.InstallationpipinstallcanvasgraderUsageGenerate a new Access Token athttps://<canvas-installation>/profile/settingsGrab your course ID from the web interface:https://<canvas-installation>/courses/<course-id>Choose akeyby which you want to identify students>>>fromcanvasgraderimportCanvasGrader>>>api_key='your access token'>>>canvas_grader=CanvasGrader(api_key=api_key,base_uri='umich.instructure.com',course_id=85425,id_key='sis_login_id')>>>assignment_id=canvas_grader.create_assignment(name='Homework 01',points_possible=4)>>>canvas_grader.grade_assignment(assignment_id,{'mterwil':4,})Alternatively, you may place the API key in a dotfile:$echo"my api key">~/.canvasgrader$chmod600~/.canvasgrader
Package: canvas-langchain
Canvas langchain document loaderFeatures:Indexes Canvas Modules, Pages, Announcements, Assignments and FilesThe following file types are supported:mdhtmhtmldocxxlsxlsxpptxpdfrtftxt(docsupport would require libreoffice, so has not been implemented in this library)Running locally (development)You can build/run the provided Dockerfile, or install dependencies as described belowDockerEditcanvas-test.py, fill in the correctapi_url,api_key, andcourse_id.Run (this also builds docker):dockerrun-it$(dockerbuild-q.)Install Dependenciespipinstall-rrequirements.txtUsage example:fromcanvas_langchain.canvasimportCanvasLoaderloader=CanvasLoader(api_url="https://CANVAS_API_URL_GOES_HERE",course_id=CANVAS_ID_GOES_HERE,api_key="API_KEY_GOES_HERE")try:documents=loader.load()print("\nDocuments:\n")print(documents)print("\nInvalid files:\n")print(loader.invalid_files)print("")print("\nErrors:\n")print(loader.errors)print("")print("\nIndexed:\n")print(loader.indexed_items)print("")print("\nProgress:\n")print(loader.get_details('DEBUG'))print("")exceptException:details=loader.get_details('DEBUG')If errors are present,loader.errorswill contain one list element per error. It will consist of an error message (key namedmessage) and if the error pertains to a specific item within canvas, it will list theentity_typeand theentity_idof the resource where the exception occurred.
Package: canvaslms
canvaslms: A CLI to Canvas LMS.This program provides a command-line interface for Canvas. The command
iscanvaslmsand it has several subcommands in the same style as Git.canvaslmsprovides output in a format useful for POSIX tools, this
makes automating tasks much easier.Let's consider how to grade students logging into the student-shell SSH
server. We store the list of students' Canvas and KTH IDs in a file.canvaslms users -c DD1301 -s | cut -f 1,2 > students.csvThen we check who has logged into student-shell.ssh student-shell.sys.kth.se last | cut -f 1 -d " " | sort | uniq \
  > logged-in.csvFinally, we check who of our students logged in.for s in $(cut -f 2 students.csv); do
  grep $s logged-in.csv && \Finally, we can set their grade to P and add the comment "Well done!" in
Canvas. We set the grades for the two assignments whose titles match the
regular expression(Preparing the terminal|The terminal).canvaslms grade -c DD1301 -a "(Preparing the terminal|The terminal)" \
      -u $(grep $s students.csv | cut -f 1) \
      -g P -m "Well done!"
doneInstallationJust install the PyPI package:python3 -m pip install canvaslmsSome subcommands usepandoc, so you will likely have toinstall
pandocon your system manually.
Package: canvaslms-sync
Canvas LMS folder syncThis is a command-line tool and Python package to synchronise a local folder with one in a Canvas LMS course.In order to use this, you need a Canvas API token linked to an account which has permission to create files in your target course's Files section.
Seethe Canvas API documentationfor instructions on how to get a token.InstallationPython 3.8 or newer is required.To install the package, run:pip install canvaslms_syncThis provides a shell commandcanvas_sync.Usagecanvas_sync local_folder remote_url -t CANVAS_API_TOKENYou can store your Canvas API token in a file like this:[Canvas]
canvas_api_token = TOKENBy default, the script looks for this file incredentials.iniin the current working directory, but you can specify a different path with the-coption.Hidden files and folders (those whose names start with.) are ignored by default. You can include them with the--include-hiddenoption.DevelopmentI followed thePython packaging tutorialto make this package.To build this package, you needtwineandbuild:python3 -m pip install twine buildFirst, build the distributable files:python3 -m buildThat produces.tar.gzand.whlfiles in./dist.
You can try installing the package in a different virtualenv withpip install dist/canvaslms_sync-$VERSION-py3-none-any.whl.To upload to PyPI:python3 -m twine upload --repository pypi dist/*
Package: canvas-markdown-quiz
Canvas-markdown-quizAdd markdown support for Canvas LMS quizzes.FeaturesMarkdown parsingLatex Rendering (usingUpmathas backend)One markdown file per quizQuick StartMarkdown WritingFollowingtest_quiz.md, create your own quiz markdown file, likequiz1.md.The structure of this md file should be like this:---(Some quiz configs)---# Your Title(Your description)

---

(Block 1)

---

(Block 2)

---

...

---

(Block n)Quiz config should be formatted as YAML, and the options are available atthis page. You don't have to set title and description parameter in this config.Each block is a question, and it should be like this:---```yamlquestion_type:multiple_choice_questionpoints_possible:1answers:-answer_text:"Option1"answer_weight:100-answer_text:"Option2"answer_weight:0```Question description goes here.```cpp#include<stdio.h>intmain(){printf("Hello World!");}```---Quiz question config should be formatted as YAML, and the options are available atthis page. You don't have to set the text parameter in this config.InstallationInstallcanvas-markdown-quiz# using pip for pythonpipinstallcanvas-markdown-quiz# using pip3 for python3pip3installcanvas-markdown-quizNote: If you cannot installcanvasapi, please check your network connection. We recommend you to useTsinghua mirrorin the mainland of China.Run commandOpen your project directory, and type the following command to run.For the first time, it will ask you some questions to save the configuration file.cvs-makequiz<mdfilename>Snapshot
Package: canvas-markup
Canvas-markupCanvas-markup - It lib is used to render html to imageExample#  main.py:importcanvas_markupimportasynciomarkup=canvas_markup.Markup()# Rendering the file index.ejs and saving it as a png.markup.renderFile('./index.html',{'title':'Markup','description':'Made with Canvas-Markup©'})# Setting the viewport of the display to 1920x1080.markup.setViewport(1920,1080)asyncio.run(markup.save('./image.png'))See index.html<style>
    * {
        font-family: arial;
    }
</style>
Package: canvas-parent-api
Canvas Parent APIThis is an async wrapper for theCanvas APIfrom Instructure.  There are a few types of objects this will retrieve based on the assumption that you are a parent with students enrolled with Canvas.The types of objects that can be returned include:Observees (Students)CoursesAssignmentsSubmissionsThis module is provided for use with the Home Assistant custom integrationCanvashowever it could be useful as a standalone module for your own projects as well.InstallingTo install the module use:python3-mpipinstallcanvas-parent-apiGet API TokenIf you are a parent, you will have a Canvas Parent account.  To get an API token, you must sign into the Canvas Parent application from a web browser.  This is typically using: https://.instructure.com/login/canvasOnce you have signed into your account, navigate to Account > Settings.Under "Approved Integrations" click "+ New Access Token" to create a new API Token.Enter a Purpose and Expiration date (blank for no expiration).Be sure to save your API token, as you will have to generate a new token if this is lost.UsageExample usage to get students, printing names:importasynciofromcanvas_parent_apiimportCanvasbase_url="https://school.instructure.com"api_token="randomstringthatisntreallyatoken"asyncdefget_students():client=Canvas(f"{base_url}",f"{api_token}")returnawaitclient.observees()students=asyncio.run(get_students())forstudentinstudents:print(student.name)Patch Notes0.0.12:Added pagination support to automatically paginate to end of available requests0.0.9:Added Submissions
Package: canvas-pilot
Canvas PilotA command-line tool for managing your Canvas courses, fetching assignments, and grades.InstallationTo install the Canvas CLI, run the following command:pipinstallcanvas-pilotConfigurationBefore using the Canvas CLI, you'll need to configure it with your Canvas API key and domain.Retrieving your Canvas API KeyTo retrieve your Canvas API key, follow these steps:Log in to your Canvas account.Click on "Account" in the left-hand side menu.Click on "Settings" from the dropdown.Scroll down to the "Approved Integrations" section and click on "+ New Access Token".In the pop-up window, optionally enter a purpose for the token and set its expiry date.Click on "Generate Token".Copy the token displayed in the "Token" field. This is your Canvas API key.Important:Keep your API key safe and secure, like you would with a password. Don't share it with anyone.Getting your Canvas DomainYour Canvas domain is the URL you use to access Canvas. For example, if you access Canvas by navigating tohttps://canvas.<yourinstitution>.com, then your Canvas domain iscanvas.<yourinstitution>.com.Once you have your API key and domain, run the following command and follow the prompts to configure the Canvas CLI:canvasconfigureYou can reconfigure the Canvas API key and domain at any time by runningcanvas configureagain. You will be prompted to update your keys.UsageFetch CoursesTo fetch the list of your Canvas courses, run:canvasfetchcoursesFetch AssignmentsTo fetch assignments for all your Canvas courses, run:canvasfetchassignmentsTo fetch assignments for a specific course, provide the course ID:canvasfetchassignments<course_id>To export the assignments/exams deadlines to an.icsfile, add the-eor--exportflag:canvasfetchassignments--exportFetch GradesTo fetch grades for all your Canvas courses, run:canvasfetchgradesTo fetch grades for a specific course, provide the course ID:canvasfetchgrades<course_id>To export the grades to a.csvfile, add the-eor--exportflag:canvasfetchgrades--exportHelpTo display help information for the command-line interface and its subcommands, run:canvas--helpContributingContributions are welcome! If you find a bug, have a feature request, or want to improve the Canvas CLI, please open an issue or submit a pull request.LicenseThis project is licensed under the GPLv3+ License. See theLICENSEfile for details.
Package: canvasplus
An improved Canvas widget for tkinter with more functionality to display graphical elements like lines or text.Tkinter's Canvas widget has some limitations which are adressed in this package.Simmilar to the default tkinter Canvas widget, e.g canvas.create_rectangle, other canvas objects can be created.AvailabilityTo start, make sure you have CanvasPlus installed or cloned. You can do this with one of two methods.Option 1: PipPip install this packagepip install CanvasPlusOption 2: GithubDownload a zip file containing all files.git clone https://github.com/Luke-zhang-04/CanvasPlus.gitorClone the latest stable ReleaseImportingIt is advised that you do not import the entire module.fromCanvasPlusimportCanvasPlusCanvasPlus()importCanvasPlusCanvasPlus.CanvasPlus()UsageUsage is very simple, especially for those with experience using tkinter canvas.For complete documentation, head over thethe wikiExample:#ImportsfromCanvasPlusimportCanvasPLusfromtkinterimportTk,StringVar,DoubleVar#set up canvasroot=Tk()canvas=CanvasPlus(root,width=800,height=800,background="white")canvas.pack()#create circle functioncanvas.create_circle(300,600,100,fill="black",outline="green",width=3)#create rounded rectangle functioncanvas.create_round_rectangle(400,550,500,650,radius=75,fill="blue",outline="orange",width=5)#create arrow function and rotate it to by 310 degrees clockwisearrow=canvas.create_arrow(600,600,50,50,150,20,fill="grey",outline="black")canvas.rotate(arrow,600,600,310,unit="deg")#create a rectangle and convert it to a polygon; then rotate it by pi/4 radians (45 degrees)rect=canvas.create_rectangle(100,550,200,650,fill="#f7a8c6",width=0)canvas.clone(rect)rect=canvas.poly(rect)canvas.rotate(rect,150,600,math.pi/4)#create an entry and set it's default valuecontent=StringVar()canvas.create_entry(0,0,anchor="nw",textvariable=content,fg="blue",bg="gold")content.set("This is CanvasPlus%s"%_canvasPlusVersion)#create button to print the value in the previously cretaed entrycanvas.create_button(5,25,anchor="nw",text="button",width=50,highlightbackground="red",command=lambdae=content:print(e.get()))#create checkbutton and toggle it_,checkbutton=canvas.create_checkbutton(5,50,anchor="nw",bg="brown",fg="white",text="My Checkbutton")checkbutton.toggle()#create a labelcanvas.create_label(5,75,font=("Times","24"),fg="black",bg="green",text="By Luke-zhang-04",anchor="nw")#flip exampleaPrime=canvas.create_polygon(500,10,500,20,550,25,600,20,600,10,fill="yellow",outline="black")a=canvas.clone(aPrime)canvas.flip(a,m=.5,b=-200)canvas.update()canvas.mainloop()
Package: canvasrobot
CanvasRobotLibrary which usesCanvasapito provide a CanvasRobot class for GUI and commandline use (Rich)
Uses
Used in word2quiz library.Not ready for general use...Examples:importrichimportcanvasrobotascrif__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#                                    )[]
Package: canvassyncer
Canvas-SyncerAn async python script that synchronizes files and folders across Canvas Files and local, with extremely fast speed.InstallationYou may use one of the followingThrough BinaryFor Windows users, you can find binary(.exe) file here:https://github.com/BoYanZh/Canvas-Syncer/releases. Unzip it and double clickcanvassyncer.exefile to run, or calling it in shell.Throughpippip3install-UcanvassyncerIf you have not installedpipyet, you may refer tohttps://pip.pypa.io/en/stable/installing/or the search engine to get yourpip.From Sourcegitclonehttps://github.com/BoYanZh/Canvas-Syncer&&cdCanvas-Syncer
pipinstall-e.UsagecanvassyncerThen input the information following the guide.Note:courseCodeshould be something likeVG100,ECE4530JcourseIDshould be an integer. Check the canvas link of the course. e.g.courseID = 7forhttps://jicanvas.com/courses/7.You can usecanvassyncer -hto get help.Optional arguments:-h, --help            show this help message and exit
  -r                    recreate config file
  -y                    confirm all prompts
  --no-subfolder        do not create a course code named subfolder when synchronizing files
  -p PATH, --path PATH  appoint config file path
  -c CONNECTION, --connection CONNECTION
                        max connection count with server
  -x PROXY, --proxy PROXY
                        download proxy
  -V, --version         show program's version number and exit
  -d, --debug           show debug information
  --no-keep-older-version
                        do not keep older versionHow to get your token?Open Your Canvas-Account-Approved Integrations-New Access TokenOr it can be easily achieved withhttps://github.com/BoYanZh/JI-Authif you are a UM-SJTU-JI student.ContributionPlease feel free to create issues and pull requests.
Package: canvas-tools
Canvas ToolsA set of tools for working with Canvas.Currently available toolscanvas_group_csv: Export your canvas student groups into a CSV file. Ready for Zoom breakout room CSV import.canvas_download_annotated_pdf: Download all annotated PDFs from a specific assignment. PDF files only.canvas_download_quiz_questions: Export a CSV file from a quiz with questions and answers.Installpip3 install canvas_toolsUsageRuncanvas_group_csv -h(replacecanvas_group_csvwith the command that you are using) will give you the help documentation for that command.
Package: canvasutils
CanvasUtilsUtilities for interacting with Canvas using Python and the canvasapi.Installationpipinstallcanvasutilscanvasutilsdepends on theipywidgetspackages. To make sure widgets render correctly in notebooks, you may need to enable the widgets extension in Jupyter followingthese instructions in the ipywidgets docs, in particular, followthese instructionsif using Jupyter Lab.FeaturesSubmit files to Canvas from within a Jupyter notebook with user-friendly widgets.Convert files to formats like.htmlfrom with canvas.Create assignments (coming)Create assignment rubrics (coming)DependenciesSee the filepyproject.toml, under the section[tool.poetry.dependencies].UsageAssignment Submission in JupyterThe submit module is made to be used within a Jupyter notebook (.ipynb file). See the providedexample.ipynb. There are two available submission interfaces, widget-based drop-down menus, or text-based entries.Widget Submissionapi_url="https://canvas.instructure.com/"course_code=123456fromcanvasutils.submitimportsubmitsubmit(course_code,api_url=api_url,token=False)# token=False allows you to enter token interactivelyText-based Submissionsubmit(course_code,api_url=api_url,token=False,no_widgets=True)Notebook Conversion in JupyterNote that this command will convert the most recently saved version of a notebook.You should save your notebook before executing this command in a cell.fromcanvasutils.submitimportconvert_notebookconvert_notebook('example.ipynb',to_format="html")Notebooksuccessfullyconverted!ContributorsContributions are welcomed and recognized. You can see a list of contributors in thecontributors tab.CreditsThis package was originally based onthis repositorycreated by Emily Gubski and Steven Wolfram.
Package: canvasvg
This module provides functionconvertthat convert all or selected
items placed on given canvas object.Supported items:lineslines with arrowspolygonssmoothed lines and polygonsovals (i.e. circle & ellipse)arcs (all kind, i.e. ARC, CHORD, PIESLICE)rectanglestext (unwrappedonly i.e. attributewidth = 0)Unsupported items:imagesbitmapswindowsStipples are not applied.Public functionsconvert(document, canvas, items=None, tounicode=None)document— SVG document, object that support DOM, i.e. providescreateElementmethod etc. (functionSVGdocumentcan be used
to get such object)canvas— Tkinter.Canvas objectitems— list of objects to convert; ifNonethen all items
are convertedtounicode— user function that should return proper unicode
string if Tkinter app use other then ASCII encoding. By defaulttounicode = lambda text:unicode(text).encode('utf-8').
Thanks toJan Böckerwho provided solution.SVGdocumentTakes no arguments, returns SVG document;  class provided in standardxml.dom.minidommodule is used.saveall(filename, canvas, items=None, margin=10, tounicode=None)Helper function: saves whole canvas or selected items in SVG file,
sets proper  dimensions, and viewport;  additionalmargincan
be set.warnings(mode)Module might emit warnings. By default it use custom function which
prints message on the standard error. You can change this by calling
methodcanvasvg.warnings(mode)with three possible values:canvasvg.PYTHON— usewarnfrom the standard modulewarnings;canvasvg.MODULE— use the custom function;canvasvg.NONE— do not print any message.configure(*flags)Module might use either<path>or<line>tag for segment
representation. By default it uses<line>. The behaviour could be changed
globally by callingcanvasvg.configure(*flags)with one of consequent
values:canvasvg.SEGMENT_TO_LINE— use<line>tag;canvasvg.SEGMENT_TO_PATH— use<path>tag.ChangelogBelow are major changes made before moving onGithub.2013-07-23 — support for “raw” smoothed lines (contributed by Marc Culler, author ofplink)2011-02-20 — python3 compatibility2011-01-25 — updatesaveall: use list of items to export2008-11-08 — addedtounicode, optional argument2006-12-01 — initial release