0

I am using pygsheets to update and delete data in a Google Sheet. The data is refreshed by using the append_table function to delete the old data and insert the new data.

Is it possible that two user make the same request at the same time, resulting in a combination of both requests? Or will the API first protect the work sheet and then perform CURD operations on the last request.

Below is my command:

worksheet.append_table(values=sheet_rows, overwrite=True)
Arvind Kumar
  • 259
  • 4
  • 15

1 Answers1

0

By looking at the append_table source code for pygsheets and the underlying API method (spreadsheets.values.append) being used in the Google Sheets API call, it looks like the last request made would overwrite the first request made.

This is because pygsheets is passing the spreadsheets.values.append command to the Google API, which will process it as a single request with the InsertDataOption to overwrite the old data in one step (not two steps of deleting then inserting).

I hope that helps.