msl.package_manager.authorise module

Create an authorisation file for the GitHub API.

msl.package_manager.authorise.authorise(username=None, token=None)[source]

Create an authorisation file for the GitHub API.

When requesting information about the MSL repositories that are available on GitHub there is a limit to how often you can send requests to the GitHub API. If you have a GitHub account and include your username and a personal access token with each request then this limit is increased.

Important

Calling this function will create a file that contains your GitHub username and a personal access token so that GitHub requests are authorised. Your username and personal access token are saved in plain text in the file that is created. You should set the file permissions provided by your operating system to ensure that your GitHub credentials are safe.

New in version 2.3.0.

Changed in version 2.4.0: Renamed the password keyword argument to token.

Changed in version 2.5.0: Renamed function to authorise.

Parameters:
  • username (str, optional) – The GitHub username. If None then you will be asked for the username.

  • token (str, optional) – A GitHub personal access token for username. If None then you will be asked for the token.