How to use the keen.exceptions.InvalidProjectIdError function in keen

To help you get started, we’ve selected a few keen 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 keenlabs / KeenClient-Python / keen / client.py View on Github external
def check_project_id(project_id):

            ''' Python 2.x-compatible string typecheck. '''

            if not project_id or not isinstance(project_id, basestring):
                raise exceptions.InvalidProjectIdError(project_id)
    else:
github keenlabs / KeenClient-Python / keen / client.py View on Github external
def check_project_id(project_id):

            ''' Python 3.x-compatible string typecheck. '''

            if not project_id or not isinstance(project_id, str):
                raise exceptions.InvalidProjectIdError(project_id)
github keenlabs / KeenClient-Python / keen / exceptions.py View on Github external
def __init__(self, project_id):
        super(InvalidProjectIdError, self).__init__(project_id)
        self.project_id = project_id
        self._message = "Invalid project id: {0}".format(project_id)