Skip to content

Configure the Gradescope Autograder fully-automatically using a Python script.

License

Notifications You must be signed in to change notification settings

scpd-proed/gradescope-api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gradescope API

This is an initial attempt at reverse engineering gradescope to allow for automated submission and controlling other behaviour in an automated way as there is no official gradescope API.

Some initial endpoint info was gotten from this MIT paper.

Design Philosophy

This is not an API wrapper in reality, and more of a scraping tool. Therefore a lot is done to minimize the ammount of requests done. As such we do expensive things like loading rosters lazily but all at once. This means we keep a lot of data locally (which is a space cost) but that allows us to not make network calls as often and lets us update the local copy alongside posts.

Design Structure

The primary structure used to interact with gradescope is the session. This is equivalent to going to the website and hitting Log In and will give you access to the things you can access through the website normally.

Sessions

session = GSConnection()

This creates a session but does not do any login work. This leaves the connection in an inactive state. In order to activate it you can call the following:

session.login('[email protected]', 'my_password')

Scripts

In order to execute the script locally, do the following:

  • copy the .env.example to .env and fill in the variables
  • run the following using bash: source scripts/source-env.sh
  • run : python3 pyscope/pyscope.py

About

Configure the Gradescope Autograder fully-automatically using a Python script.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 96.2%
  • Dockerfile 2.6%
  • Shell 1.2%