5.Delete Files and Buckets

5.1 Delete a file

Removes a file from a bucket

from swan_mcs import APIClient, BucketAPI
mcs_api = APIClient("<API_KEY>")
bucket_client = BucketAPI(mcs_api)

bucket_client.delete_file("<BUCKET_NAME>", "<OBJECT_NAME>")

5.2 Delete a bucket

Removes a bucket from your account.

Once you delete your bucket, all your file and folder under the bucket will be deteled

from swan_mcs import APIClient, BucketAPI
mcs_api = APIClient("<API_KEY>")
bucket_client = BucketAPI(mcs_api)

bucket_client.delete_bucket("<BUCKET_NAME>")

Last updated