def create_key_pair(self, name, public_key=''):
        attr = {'name': name, 'public_key': public_key}
        res = self.connection.request('/v2/account/keys', method='POST',
                                      data=json.dumps(attr))

        data = res.object['ssh_key']

        return self._to_key_pair(data=data)
Open database connection
dataset/ETHPy150Open apache/libcloud/libcloud/compute/drivers/digitalocean.py/DigitalOcean_v2_NodeDriver.create_key_pair--crossover with--dataset/ETHPy150Open SpriteLink/NIPAP/nipap/nipap/backend.py/Nipap._connect_db