class autohandshake.HandshakeSession(login_url: str, email: str, password: str = None, max_wait_time: int = 300)

A Handshake browsing session.

Should be used as a context manager. Example:

with HandshakeSession(school_url, email) as browser:
    # do something
  • login_url (str) – a valid Handshake homepage url of the form “https://[school].joinhandshake.com
  • email (str) – a valid handshake admin email
  • password (str) – the password associated with the given email. If password is not specified, HandshakeSession will instead look for a password associated with the given login_url and email within the machine’s default password manager (e.g. Windows Credential Manager, macOS Keychain, etc.). This is the preferred usage, since it is more secure.
  • max_wait_time (int) – the maximum time to wait for something to load before throwing a timeout error
__enter__() → autohandshake.src.HandshakeBrowser.HandshakeBrowser

Open a web browser and log into Handshake, beginning the session

Returns:a logged-in HandshakeBrowser
Return type:HandshakeBrowser
__exit__(exc_type, exc_val, exc_tb)

Close the web browser


Close the Handshake Session.

To be called if HandshakeSession is not used as a context manager.