Top Level
The codepost_powertools package.
- codepost_powertools.log_in_codepost(config_file='config.yaml', *, log=False)
Logs in to codePost using the api key in the YAML config file.
The api key will be searched for in a field called
"api_key"in the config file.Note that all the functions in this package will not call this method for you, so you should be calling it yourself at the start of your script. If you are using the command line, this method is called before each command.
- Parameters:
- Returns:
Whether successfully logged in.
- Return type:
- Raises:
FileNotFoundError – If the config file is not found.
RuntimeError – If the config file cannot be read (likely due to an invalid format).
KeyError – If the YAML config file does not contain the
"api_key"key.ValueError – If the given api key is invalid.
New in version 0.1.0.
Info
Info about the codepost-powertools package.