Students

class students.StudentsAPI[source]

Interface for the PythonAnywhere Students API.

This class uses the get_api_endpoint function from pythonanywhere.api.base to construct the API URL, which is stored in the class variable base_url. It then calls the call_api method with the appropriate arguments to perform student-related actions.

Supported HTTP Methods:
  • GET

  • DELETE

Methods:
delete(student_username: str) int | None[source]

Returns 204 if student has been successfully removed, raises otherwise.

Parameters:

student_username – student username to be removed

Returns:

204 if student has been successfully removed

get() dict | None[source]

Returns list of PythonAnywhere students related with user’s account.

Returns:

dictionary with students info