Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def table_delete(self, table_name):
"""Issues a request to delete a table.
Args:
table_name: the name of the table as a tuple of components.
Returns:
A parsed result object.
Raises:
Exception if there is an error performing the operation.
"""
url = Api._ENDPOINT + (Api._TABLES_PATH % table_name)
return datalab.utils.Http.request(url, method='DELETE', credentials=self._credentials,
raw_response=True)
def buckets_get(self, bucket, projection='noAcl'):
"""Issues a request to retrieve information about a bucket.
Args:
bucket: the name of the bucket.
projection: the projection of the bucket information to retrieve.
Returns:
A parsed bucket information dictionary.
Raises:
Exception if there is an error performing the operation.
"""
args = {'projection': projection}
url = Api._ENDPOINT + (Api._BUCKET_PATH % bucket)
return datalab.utils.Http.request(url, credentials=self._credentials, args=args)