Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Handling deferred attributes automatically

オープン
#118 コメント 1 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python
領域
api

調査の方向性

まず service.orders.get_entities()、Customers のようなナビゲーションプロパティ、および既存の expand("Customers") の動作を追跡します。エンティティ API を維持しながら、OData の __deferred 属性によってオンデマンド読み込みをトリガーする方法を確認します。o.Customers にアクセスすると、expand を明示的に呼び出さなくても遅延データが透過的に提供されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

enhancement

Right now if an entity has a navigation property, the object must be completely reloaded (as below) to load in deferred data in navigation properties. For example:

orders = service.orders.get_entities()

for o in orders:
    do_some_stuff_with(o.Customers)  # This is an empty list right now so nothing will get done.

# The data must be reloaded as per the below for anything to happen.
orders = service.orders.get_entities().expand("Customers")

I propose that we use the OData __deferred attribute to fire a request on demand to load these attributes in. This would allow the API to look like this:

orders = service.orders.get_entities()

for o in orders:
   do_some_stuff_with(o.Customers)  # Request is automatically made using the `__deferred` attribute which transparently offers the missing data back to the class.

WDYT: @filak-sap

主要言語
Python
スター
269
フォーク
100
平均マージ
3日 3時間
マージ済み PR(30日)
4

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

SAP/python-pyodata のほかの issue

SAP/python-pyodata の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。