'Create a new user in InfluxDB.
:param username: the new username to create
:type username: str
:param password: the password for the new user
:type password: str
:param admin: whether the user should have cluster administration
privileges or not
:type admin: boolean'

def create_user(self, username, password, admin=False):

    text = u'CREATE    USER    {0}    WITH    PASSWORD    {1}'.format(quote_ident(username), quote_literal(password))
    if admin:
        text += u'    WITH    ALL    PRIVILEGES'
    self.query(text)
