File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -14,3 +14,6 @@ indent_style = tab
1414
1515[* .md ]
1616trim_trailing_whitespace = false
17+
18+ [* .py ]
19+ indent_size = 4
Original file line number Diff line number Diff line change 77
88dotenv .load_dotenv ()
99sesame_api_baseurl = os .getenv ('SESAME_API_BASEURL' )
10+ sesame_api_token = os .getenv ('SESAME_API_TOKEN' )
1011
1112configs = {
1213 "taiga_etd.json" : {
@@ -109,14 +110,12 @@ async def sem_task(task):
109110 return await asyncio .gather (* [sem_task (task ) for task in tasks ])
110111
111112async def send_request (session , url , json ):
112- token = os .getenv ('SESAME_API_TOKEN' )
113113 headers = {
114- "Authorization" : f"Bearer { token } " ,
114+ "Authorization" : f"Bearer { sesame_api_token } " ,
115115 "Content-Type" : "application/json; charset=utf-8" ,
116116 }
117117
118118 try :
119- print (f"json: { json } " )
120119 async with session .post (url , json = json , headers = headers ) as response :
121120 response .raise_for_status () # Raises error for 4xx/5xx responses
122121 print (f"Request to { url } successful: { response .status } " )
You can’t perform that action at this time.
0 commit comments