Shopify / Shopify/shopify_python_api
Save many metafields with a single request
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 1.4k
- フォーク
- 388
- 平均マージ
- 5時間 39分
- マージ済み PR(30日)
- 1
説明
There does not seem to be a way to attach metafields locally, and then simply save the product with the metafields along with it. I'm forced to use add_metafields() or Metafield().save(), both of which adds a single metafield per API call. This is very slow.
If I take a product with 50 metafields, and save it as a new product, it saves almost instantly, like so:
p = shopify.Product.find()[0]
print len(p.metafields())
> 50
p.id = None
p.images = None
p.save()
How can I attach metafields to a product in the same way they are attached when they are fetched?
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず Product.save()、add_metafields()、Metafield().save() を追跡し、取得した metafields がどのように表現され、永続化されるかを理解します。ローカルにアタッチされた metafields を新しい product とともに1回の API リクエストで保存でき、報告された複数の metafields のケースをカバーできれば、作業は完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- api
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 32/100