batch Modül

Toplu işlemler için genel sonuç türleri.

Sınıflar

BatchItemResponse

Toplu istek içindeki tek bir işlemden gelen yanıt.

Yanıtlar gönderme sırasına göre döndürülür. Değişiklik kümesine eklenen işlemler için yanıtlar değişiklik kümesinin konumunda bu sırada görünür.

Example:


   for item in result.responses:
       if item.is_success:
           print(f"[OK] {item.status_code} entity_id={item.entity_id}")
       else:
           print(f"[ERR] {item.status_code}: {item.error_message}")
BatchResult

Toplu iş isteğini yürütmenin sonucu.

Gönderilen HTTP işlemi başına bir tane BatchItemResponse içerir. Birden çok HTTP isteğine (örneğin add_columns üç sütunlu) genişleyen işlemler üç girişe katkıda bulunur.

Example:


   result = client.batch.new().execute()
   print(f"Succeeded: {len(result.succeeded)}, Failed: {len(result.failed)}")
   for guid in result.entity_ids:
       print(f"[OK] entity_id: {guid}")