1
- from typing import Dict , Any
1
+ from typing import Any , Dict
2
2
3
3
import requests
4
4
from requests import HTTPError
@@ -50,7 +50,9 @@ def create_bucket(self, id: str) -> Dict[str, Any]:
50
50
A unique identifier for the bucket you are creating.
51
51
"""
52
52
try :
53
- response = requests .post (f"{ self .url } /bucket" , data = {"id" : id }, headers = self .headers )
53
+ response = requests .post (
54
+ f"{ self .url } /bucket" , data = {"id" : id }, headers = self .headers
55
+ )
54
56
response .raise_for_status ()
55
57
except HTTPError as http_err :
56
58
print (f"HTTP error occurred: { http_err } " ) # Python 3.6
@@ -68,7 +70,9 @@ def empty_bucket(self, id: str) -> Dict[str, Any]:
68
70
The unique identifier of the bucket you would like to empty.
69
71
"""
70
72
try :
71
- response = requests .post (f"{ self .url } /bucket/{ id } /empty" , data = {}, headers = self .headers )
73
+ response = requests .post (
74
+ f"{ self .url } /bucket/{ id } /empty" , data = {}, headers = self .headers
75
+ )
72
76
response .raise_for_status ()
73
77
except HTTPError as http_err :
74
78
print (f"HTTP error occurred: { http_err } " ) # Python 3.6
@@ -87,7 +91,9 @@ def delete_bucket(self, id: str) -> Dict[str, Any]:
87
91
The unique identifier of the bucket you would like to delete.
88
92
"""
89
93
try :
90
- response = requests .delete (f"{ self .url } /bucket/{ id } " , data = {}, headers = self .headers )
94
+ response = requests .delete (
95
+ f"{ self .url } /bucket/{ id } " , data = {}, headers = self .headers
96
+ )
91
97
92
98
response .raise_for_status ()
93
99
except HTTPError as http_err :
0 commit comments