pyaoscx.session module

pyaoscx.session.login(base_url, username=None, password=None)

Perform a POST call to login and gain access to other API calls. If either username or password is not specified, user will be prompted to enter the missing credential(s).

Parameters:
  • base_url – URL in main() function
  • username – username
  • password – password
Returns:

requests.session object with loaded cookie jar

pyaoscx.session.logout(**kwargs)

Perform a POST call to logout and end session.

Parameters:kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns:True if successful, False otherwise