authentication package

Submodules

authentication.config module

authentication.config.config(section)

authentication.getaccesstoken module

class authentication.getaccesstoken.GetAccessToken

Bases: object

Get an header authentication item for access token for using the internal API’s by logging in as with email and password credentials and authenticated scopes or as type ‘employee’ To see the available scopes and types, see this file:

Usage:

from authentication.getaccesstoken import GetAccessToken

accessToken = GetAccessToken().getAccessToken(usertype=’employee_plus’, scopes=BRK/RS,BRK/RSN,BRK/RO) requests.get(url, headers=accessToken)

Args:
  • scopes: Add scopes as a comma separated list.
  • usertype: Add the usertype
  • email: Set and get environment variable: export DATAPUNT_EMAIL=*****
  • password: Set and get environment variable: export DATAPUNT_PASSWORD=*****
Returns:
accesstoken
getAccessToken(usertype='employee', scopes='TLLS/R', acc=False)
authentication.getaccesstoken.parser()

Parser function to run arguments from commandline and to add description to sphinx docs. To see possible styling options: https://pythonhosted.org/an_example_pypi_project/sphinx.html

Module contents