Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Microsoft Graph Api中的后期操作耗时太长_Python_Flask_Sharepoint_Python Requests_Microsoft Graph Api - Fatal编程技术网

Python Microsoft Graph Api中的后期操作耗时太长

Python Microsoft Graph Api中的后期操作耗时太长,python,flask,sharepoint,python-requests,microsoft-graph-api,Python,Flask,Sharepoint,Python Requests,Microsoft Graph Api,我正在使用Microsoft Graph Api将JSON文件上载到现有Sharepoint列表中。JSON文件大约有两千行,发布大约需要30分钟。我已经对代码进行了基准测试,似乎POST操作占用了大约80%的总性能时间。我想知道这是正常行为还是存在更有效的实现 这是我当前的简化代码。提前谢谢 URL = 'https://graph.microsoft.com/vx.x/sites/site/sites/group/lists/listid/items'` for i in range(

我正在使用Microsoft Graph Api将JSON文件上载到现有Sharepoint列表中。JSON文件大约有两千行,发布大约需要30分钟。我已经对代码进行了基准测试,似乎POST操作占用了大约80%的总性能时间。我想知道这是正常行为还是存在更有效的实现

这是我当前的简化代码。提前谢谢

 URL = 'https://graph.microsoft.com/vx.x/sites/site/sites/group/lists/listid/items'`

 for i in range(amount of lines): 

     data = getjsonline(i)
     
     requests.post(  
     URL,
     headers={'Authorization': 'Bearer ' + token['access_token'] , 'content-type': 'application/json'},
     json=data,)

首先,为了解决这个问题,我将在POSTMAN中测试上面相同的Graph API调用的JSON负载,看看是否需要相同的时间。