Third-party access / Teacher(script) fetches student repositories

Hello,

I wonder if I am asking this from a correct category … because what I understood so far is that API might be tied to personal access tokens. Boot me out, if I am talking nonsense and asking dumb things in a wrong place.

Goal: As a teacher, I want to write a (Python) script which retrieves (clones) student repositories (weekly, on due dates). Said repositories would/should be private (to avoid borrowing solutions from other students).

Features:

  • Clone (fetch) private repository (preferably, specific folder therein, but full clone is just fine as well). [must-have]
  • Verify that the repository is private. [nice-to-have, purely optional]
  • Create issues. [nice-to-have… next year]

I don’t think personal authentication tokens are what I should be looking at - “personal” being the operative work, I think.

Does GitHub API have mechanisms/features that would serve my needs? If so, could someone direct me to the relevant documentation, please? (My Google-fu was too weak to find materials that seemed relevant to my case).

Please excuse my question if its “obvious” or “dumb” - this is a completely new area for me and I am having difficulties getting up to speed.