Disable prettyPrint by default for Google Sheets API responses
まだ誰も着手していません。
評価
調査の方向性
リポジトリ内で Sheets API の discovery ドキュメントを見つけ、prettyPrint パラメータとそのデフォルト値を検索します。明示的に指定された呼び出し元の値を保持したまま、ドキュメントに記載されたデフォルト値を false に変更し、その後、関連するテストスイートまたは discovery ドキュメントのテストを実行して、リクエストがデフォルトで prettyPrint=false を使用することを確認します。
索引モデルが issue の本文から書いたものです。
説明
Large Google Sheets API responses are currently pretty-printed by default. For machine-to-machine use, the additional whitespace and line breaks provide no benefit while increasing response size and I/O. When processing large responses, this can also contribute to unnecessary memory usage.
Describe the solution you'd like
Change the default value of prettyPrint from true to false for the Sheets API discovery document
and send prettyPrint=false unless the caller says otherwise.
Describe alternatives you've considered
The current workaround is to explicitly pass prettyPrint=False to every request. This works, but requires application code to opt out of an unnecessary default and is easy to miss, especially in codebases making many Sheets API requests.
Another option would be to modify the client code to inject prettyPrint=False, but changing the API discovery document's default seems simpler and more consistent with the intended API behavior.
Additional context
This is particularly relevant for applications processing large Sheets responses programmatically. Avoiding pretty printing would reduce the amount of data transferred and processed, as well as the memory required to hold the response in memory. For large responses, this can also help reduce peak process RSS.
As a bonus, this would make the default more appropriate for API clients, where responses are consumed programmatically rather than displayed directly to users.
- 主要言語
- Python
- スター
- 8.9k
- フォーク
- 2.6k
- 平均マージ
- 2日 2時間
- マージ済み PR(30日)
- 15
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
googleapis/google-api-python-client のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 1/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
-
samples type: docs
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
googleapis/google-api-python-client の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100