MCPcopy
hub / github.com/burnash/gspread / values_update

Method values_update

gspread/http_client.py:143–174  ·  view source on GitHub ↗

Lower-level method that directly calls `PUT spreadsheets/ /values/ `_. :param str range: The `A1 notation `_ of the values t

(
        self,
        id: str,
        range: str,
        params: Optional[ParamsType] = None,
        body: Optional[Mapping[str, Any]] = None,
    )

Source from the content-addressed store, hash-verified

141 return r.json()
142
143 def values_update(
144 self,
145 id: str,
146 range: str,
147 params: Optional[ParamsType] = None,
148 body: Optional[Mapping[str, Any]] = None,
149 ) -> Any:
150 """Lower-level method that directly calls `PUT spreadsheets/<ID>/values/<range> <https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/update>`_.
151
152 :param str range: The `A1 notation <https://developers.google.com/sheets/api/guides/concepts#a1_notation>`_ of the values to update.
153 :param dict params: (optional) `Values Update Query parameters <https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/update#query-parameters>`_.
154 :param dict body: (optional) `Values Update Request body <https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/update#request-body>`_.
155 :returns: `Values Update Response body <https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/update#response-body>`_.
156 :rtype: dict
157
158 Example::
159
160 sh.values_update(
161 'Sheet1!A2',
162 params={
163 'valueInputOption': 'USER_ENTERED'
164 },
165 body={
166 'values': [[1, 2, 3]]
167 }
168 )
169
170 .. versionadded:: 3.0
171 """
172 url = SPREADSHEET_VALUES_URL % (id, quote(range))
173 r = self.request("put", url, params=params, json=body)
174 return r.json()
175
176 def values_append(
177 self, id: str, range: str, params: ParamsType, body: Optional[Mapping[str, Any]]

Callers 5

update_cellMethod · 0.45
update_cellsMethod · 0.45
updateMethod · 0.45
test_values_getMethod · 0.45
test_values_batch_getMethod · 0.45

Calls 2

requestMethod · 0.95
quoteFunction · 0.85

Tested by 2

test_values_getMethod · 0.36
test_values_batch_getMethod · 0.36