How to use the easypost.errors.NoApiKeyError function in easypost

To help you get started, we’ve selected a few easypost examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github EasyPost / easypost-python / easypost / api.py View on Github external
def build_headers(self, headers):
        headers = headers or {}
        if not self.api_key:  # FIXME: we currently allow Users to be created without an api_key. do we want to continue allowing that?
            raise NoApiKeyError()
        return {**self.default_headers, **headers}
github EasyPost / easypost-python / easypost / errors.py View on Github external
def __init__(self, message=''):
        super(NoApiKeyError, self).__init__(message or self.message)