Added set_records and set_record to update sheet via records.[Issue #677]#1494
Open
muddi900 wants to merge 26 commits into
Open
Added set_records and set_record to update sheet via records.[Issue #677]#1494muddi900 wants to merge 26 commits into
set_records and set_record to update sheet via records.[Issue #677]#1494muddi900 wants to merge 26 commits into
Conversation
Collaborator
|
thanks for the implementation! I find the test hard to parse, would it be possible to write it with very explicit objects? e.g., table_before = [
["header 1", "header 2"]
["value 1", "value 2"]
]
table_after = [
["header 1", "header 2"]
["value 1", "value 2"]
["new value 1", "new value 2"]
] |
8f177a8 to
a7b04cf
Compare
lavigne958
reviewed
Oct 20, 2024
fe732b4 to
48679a3
Compare
darkfiberiru
pushed a commit
to darkfiberiru/gspread
that referenced
this pull request
Nov 25, 2025
… sheet via records This PR adds methods to update spreadsheet data using dictionary-based records with column headers, addressing feature request burnash#677. New methods added: - set_records() - Sets multiple rows of data using records - set_record() - Sets a single row of data using a record - append_records() / append_record() - Appends records to the sheet - insert_records() / insert_record() - Inserts records at specific positions - get_column_headers() - Retrieves column headers from the first row Key features: - Enables intuitive, record-based data format (dict mapping headers to values) - Leverages existing functionality like append_rows() and insert_rows() - Includes comprehensive tests with explicit test values - Supports parameter handling for missing/extra headers Status: Safe to merge - adds new functionality without modifying existing APIs
darkfiberiru
pushed a commit
to darkfiberiru/gspread
that referenced
this pull request
Nov 25, 2025
- Remove @pytest.mark.vcr() decorator from reset_sheet fixture (fixes pytest deprecation warning about marks on fixtures) - Include cassettes for PR burnash#1494 tests (append_records, insert_records) The cassettes were already included in the merged PRs and are required for offline testing of the new record-based methods.
darkfiberiru
pushed a commit
to darkfiberiru/gspread
that referenced
this pull request
Nov 25, 2025
- Remove @pytest.mark.vcr() decorator from reset_sheet fixture Pytest 9.0 warns that marks applied to fixtures have no effect. Marks only work on test functions, not fixtures. The reset_sheet fixture just clears the sheet between tests and doesn't need VCR recording. Individual test methods already have their own VCR marks. - Include cassettes for PR burnash#1494 tests (append_records, insert_records) The cassettes were already included in the merged PRs and are required for offline testing of the new record-based methods.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #677