Package: teacherhelper
OverviewThis is a library of stuff that I have used to automate my work as a teacher.
With version 2.0, I've worked to increase the quality of the codebase by adding
unit tests, comitting to API stability (seecontributing),
creating this documentation site, and creating a CI/CD pipeline. My hope is
that these efforts make this codebase useful to others, and that others might
even consider contributing!InstallationYou can install this package via pip:pipinstallteacherhelperThen, perform the setup described insetup instructions.UsageOnce installed, thethcommand provides the following CLI utility:usage: th [-h] [--student STUDENT] [--parent PARENT] [--new]

optional arguments:
  -h, --help            show this help message and exit
  --student STUDENT, -s STUDENT
                        Lookup a student and print the result
  --parent PARENT, -p PARENT
                        Lookup a parent and print the result
  --new                 Regenerate the database by parsing student.csv and parent.csv in the $HELPER_DATA directory.Example Usagename='tommey'# Timmy needs a typing lesson, but this library is great for# data bunging!# **************************************************# ==== Student Information System inside Python ====# **************************************************fromteacherhelper.sisimportSis# some assembly required! See https://teacherhelper.jackdevries.com/setup/sis=Sis.read_cache()# fuzzy string matching is used to lookup the student object from the nameresult:Student|None=sis.find_student(name,threshold=80)ifresult:print(result)else:print(f'{name}not found')parent='Lisa Tommyparent'parent=sis.find_parent(name)ifparent:print(f'{parent.name=}::{parent.phone_number=}')# ***********************************# ==== Traverse Google Classroom ====# ***********************************fromteacherhelper.google.classroom_wrapperimportGoogleClassroomApiWrapper# See https://teacherhelper.jackdevries.com/google/classroom_wrapper/wrapper=google_classroom.GoogleClassroomApiWrapper(match_classrooms=['Ms. Smith','Ms. Fischer'],match_assignments=['4/25 Homework'])forclassroom,assignment,submissioninwrapper.traverse_submissions():assertclassroom['name']in('Ms. Smith','Ms. Fischer')assertre.match('4/25 Homework',assignment['title'])isnotNoneprint(submission)# ****************************# ==== Send Emails Easily ====# ****************************# see https://teacherhelper.jackdevries.com/EMAIL/fromteacherhelperimportEmail,Sisstudent=Sis.read_cache().find_student('Tommy Smith')withEmail(username="me@example.com",password="supersecret")aseml:eml.send(to=student.primary_conteact.email,subject="Tommy Needs Spelling Help",# the emailer supports markdown input, and will inject the resulting# html into a default template, or a template that you can create!message=f"""Hello Ms.{student.primary_contact.name},I noticed that{student.first_name}spelled his name like "tommey" on anassignment recently. Here are some spelling tools I would recommend:## List of Spelling Tools| Name                      | Website                          || ------------------------- | -------------------------------- || Khan Academy              | https://www.khanacademy.org/     || Grammarly                 | https://www.grammarly.com/       || Webster Dictionary Online | https://www.merriam-webster.com/ |""",cc=result.email)Documentation SiteVisit the documentation site atteacherhelper.jackdevries.comAbout the Docs SiteThe docs site willalwaysremain in sync with the latest release. Every
release is tagged on GitHub, so use version control to access documentation for
previous versions.