I'm using GSpread to write values from a (polars) dataframe into Google Sheet via worksheet.batch_update and would like to be able to specify the JSON serialiser when doing that. This would help when dealing with dates serialisation issues for instance.
In the context of batch_update, the trail is:
- here the query is made via
self.client.values_batch_update(...)
- here is what it correspond to in the
http_client code
The data=data here in the request method gives me hope that this
|
r = self.request("post", SPREADSHEET_BATCH_UPDATE_URL % id, json=body) |
could maybe be replaced by something like
if json_serialiser is not None:
r = self.request("post", SPREADSHEET_BATCH_UPDATE_URL % id, data=json_serialiser(body))
else:
r = self.request("post", SPREADSHEET_BATCH_UPDATE_URL % id, json=body)
PS: I'm aware of https://github.com/robin900/gspread-dataframe but I thought ☝ seemed sufficiently generic to be opened here
I'm using GSpread to write values from a (polars) dataframe into Google Sheet via
worksheet.batch_updateand would like to be able to specify the JSON serialiser when doing that. This would help when dealing with dates serialisation issues for instance.In the context of
batch_update, the trail is:self.client.values_batch_update(...)http_clientcodeThe
data=datahere in therequestmethod gives me hope that thisgspread/gspread/http_client.py
Line 139 in 6074285
could maybe be replaced by something like
PS: I'm aware of https://github.com/robin900/gspread-dataframe but I thought ☝ seemed sufficiently generic to be opened here