55
66fake = Faker ()
77
8- path_to_env = os .path .join (os .getcwd (), ' scripts' , ' migration' , ' .env' )
8+ path_to_env = os .path .join (os .getcwd (), " scripts" , " migration" , " .env" )
99print (os .path .isfile (path_to_env ))
1010config = dotenv_values (dotenv_path = path_to_env )
1111
1515CLOWDER_V2 = config ["CLOWDER_V2" ]
1616ADMIN_KEY_V2 = config ["ADMIN_KEY_V2" ]
1717
18- base_headers_v1 = {'X-API-key' : ADMIN_KEY_V1 }
19- clowder_headers_v1 = {** base_headers_v1 , 'Content-type' : 'application/json' ,
20- 'accept' : 'application/json' }
18+ base_headers_v1 = {"X-API-key" : ADMIN_KEY_V1 }
19+ clowder_headers_v1 = {
20+ ** base_headers_v1 ,
21+ "Content-type" : "application/json" ,
22+ "accept" : "application/json" ,
23+ }
2124
22- base_headers_v2 = {'X-API-key' : ADMIN_KEY_V2 }
23- clowder_headers_v2 = {** base_headers_v2 , 'Content-type' : 'application/json' ,
24- 'accept' : 'application/json' }
25+ base_headers_v2 = {"X-API-key" : ADMIN_KEY_V2 }
26+ clowder_headers_v2 = {
27+ ** base_headers_v2 ,
28+ "Content-type" : "application/json" ,
29+ "accept" : "application/json" ,
30+ }
2531
2632
2733def get_clowder_v1_metadata_definitions ():
28- endpoint = CLOWDER_V1 + ' api/metadata/definitions'
34+ endpoint = CLOWDER_V1 + " api/metadata/definitions"
2935 r = requests .get (endpoint , headers = base_headers_v1 , verify = False )
3036 return r .json ()
3137
3238
3339md_definitions = get_clowder_v1_metadata_definitions ()
34- print (' got them' )
40+ print (" got them" )
0 commit comments