google-cloud-bigtable 2.26.0__tar.gz → 2.28.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (212) hide show
  1. {google_cloud_bigtable-2.26.0/google_cloud_bigtable.egg-info → google_cloud_bigtable-2.28.0}/PKG-INFO +1 -1
  2. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable/data/__init__.py +30 -2
  3. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable/data/_async/_mutate_rows.py +23 -24
  4. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable/data/_async/_read_rows.py +25 -29
  5. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable/data/_async/client.py +292 -197
  6. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable/data/_async/mutations_batcher.py +108 -86
  7. google_cloud_bigtable-2.28.0/google/cloud/bigtable/data/_cross_sync/__init__.py +20 -0
  8. google_cloud_bigtable-2.28.0/google/cloud/bigtable/data/_cross_sync/_decorators.py +441 -0
  9. google_cloud_bigtable-2.28.0/google/cloud/bigtable/data/_cross_sync/_mapping_meta.py +64 -0
  10. google_cloud_bigtable-2.28.0/google/cloud/bigtable/data/_cross_sync/cross_sync.py +334 -0
  11. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable/data/_helpers.py +3 -27
  12. google_cloud_bigtable-2.28.0/google/cloud/bigtable/data/_sync_autogen/_mutate_rows.py +182 -0
  13. google_cloud_bigtable-2.28.0/google/cloud/bigtable/data/_sync_autogen/_read_rows.py +304 -0
  14. google_cloud_bigtable-2.28.0/google/cloud/bigtable/data/_sync_autogen/client.py +1234 -0
  15. google_cloud_bigtable-2.28.0/google/cloud/bigtable/data/_sync_autogen/mutations_batcher.py +449 -0
  16. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable/data/exceptions.py +15 -0
  17. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable/data/execute_query/__init__.py +7 -0
  18. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable/data/execute_query/_async/execute_query_iterator.py +64 -45
  19. google_cloud_bigtable-2.28.0/google/cloud/bigtable/data/execute_query/_sync_autogen/execute_query_iterator.py +186 -0
  20. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable/data/mutations.py +12 -0
  21. {google_cloud_bigtable-2.26.0/google/cloud/bigtable_admin_v2 → google_cloud_bigtable-2.28.0/google/cloud/bigtable}/gapic_version.py +1 -1
  22. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable/table.py +12 -2
  23. {google_cloud_bigtable-2.26.0/google/cloud/bigtable → google_cloud_bigtable-2.28.0/google/cloud/bigtable_admin}/gapic_version.py +1 -1
  24. {google_cloud_bigtable-2.26.0/google/cloud/bigtable_admin → google_cloud_bigtable-2.28.0/google/cloud/bigtable_admin_v2}/gapic_version.py +1 -1
  25. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/client.py +3 -37
  26. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/grpc_asyncio.py +34 -21
  27. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/rest.py +952 -882
  28. google_cloud_bigtable-2.28.0/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/rest_base.py +1194 -0
  29. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/client.py +3 -37
  30. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/grpc_asyncio.py +43 -30
  31. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/rest.py +1356 -1281
  32. google_cloud_bigtable-2.28.0/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/rest_base.py +1714 -0
  33. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_admin_v2/types/instance.py +59 -0
  34. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_v2/gapic_version.py +1 -1
  35. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_v2/services/bigtable/async_client.py +180 -76
  36. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_v2/services/bigtable/client.py +3 -39
  37. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_v2/services/bigtable/transports/__init__.py +0 -3
  38. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_v2/services/bigtable/transports/grpc_asyncio.py +23 -10
  39. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_v2/services/bigtable/transports/rest.py +471 -449
  40. google_cloud_bigtable-2.28.0/google/cloud/bigtable_v2/services/bigtable/transports/rest_base.py +654 -0
  41. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_v2/types/feature_flags.py +14 -0
  42. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0/google_cloud_bigtable.egg-info}/PKG-INFO +1 -1
  43. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google_cloud_bigtable.egg-info/SOURCES.txt +32 -6
  44. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/scripts/fixup_bigtable_admin_v2_keywords.py +1 -1
  45. google_cloud_bigtable-2.28.0/tests/system/cross_sync/test_cases/async_to_sync.yaml +76 -0
  46. google_cloud_bigtable-2.28.0/tests/system/cross_sync/test_cases/cross_sync_files.yaml +469 -0
  47. google_cloud_bigtable-2.28.0/tests/system/cross_sync/test_cases/rm_aio.yaml +109 -0
  48. google_cloud_bigtable-2.28.0/tests/system/cross_sync/test_cases/strip_async_conditional_branches.yaml +74 -0
  49. google_cloud_bigtable-2.28.0/tests/system/cross_sync/test_cases/symbol_replacer.yaml +82 -0
  50. google_cloud_bigtable-2.28.0/tests/system/cross_sync/test_cross_sync_e2e.py +65 -0
  51. {google_cloud_bigtable-2.26.0/tests/unit → google_cloud_bigtable-2.28.0/tests/system}/data/__init__.py +3 -0
  52. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/system/data/setup_fixtures.py +0 -25
  53. google_cloud_bigtable-2.28.0/tests/system/data/test_system_async.py +1016 -0
  54. google_cloud_bigtable-2.28.0/tests/system/data/test_system_autogen.py +828 -0
  55. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/data/_async/test__mutate_rows.py +52 -67
  56. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/data/_async/test__read_rows.py +27 -56
  57. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/data/_async/test_client.py +951 -605
  58. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/data/_async/test_mutations_batcher.py +429 -379
  59. google_cloud_bigtable-2.28.0/tests/unit/data/_async/test_read_rows_acceptance.py +355 -0
  60. google_cloud_bigtable-2.28.0/tests/unit/data/_cross_sync/test_cross_sync.py +579 -0
  61. google_cloud_bigtable-2.28.0/tests/unit/data/_cross_sync/test_cross_sync_decorators.py +542 -0
  62. google_cloud_bigtable-2.28.0/tests/unit/data/_sync_autogen/__init__.py +0 -0
  63. google_cloud_bigtable-2.28.0/tests/unit/data/_sync_autogen/test__mutate_rows.py +307 -0
  64. google_cloud_bigtable-2.28.0/tests/unit/data/_sync_autogen/test__read_rows.py +354 -0
  65. google_cloud_bigtable-2.28.0/tests/unit/data/_sync_autogen/test_client.py +2889 -0
  66. google_cloud_bigtable-2.28.0/tests/unit/data/_sync_autogen/test_mutations_batcher.py +1078 -0
  67. google_cloud_bigtable-2.28.0/tests/unit/data/_sync_autogen/test_read_rows_acceptance.py +328 -0
  68. google_cloud_bigtable-2.28.0/tests/unit/data/execute_query/_async/test_query_iterator.py +182 -0
  69. google_cloud_bigtable-2.28.0/tests/unit/data/execute_query/_sync_autogen/__init__.py +0 -0
  70. google_cloud_bigtable-2.28.0/tests/unit/data/execute_query/_sync_autogen/test_query_iterator.py +163 -0
  71. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/data/execute_query/test_execute_query_parameters_parsing.py +1 -1
  72. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/data/test__helpers.py +1 -29
  73. google_cloud_bigtable-2.28.0/tests/unit/data/test_sync_up_to_date.py +99 -0
  74. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/gapic/bigtable_admin_v2/test_bigtable_instance_admin.py +4920 -4532
  75. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/gapic/bigtable_admin_v2/test_bigtable_table_admin.py +7725 -7162
  76. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/gapic/bigtable_v2/test_bigtable.py +4152 -2476
  77. google_cloud_bigtable-2.26.0/google/cloud/bigtable_v2/services/bigtable/transports/pooled_grpc_asyncio.py +0 -426
  78. google_cloud_bigtable-2.26.0/tests/system/data/test_execute_query_async.py +0 -288
  79. google_cloud_bigtable-2.26.0/tests/system/data/test_execute_query_utils.py +0 -272
  80. google_cloud_bigtable-2.26.0/tests/system/data/test_system.py +0 -942
  81. google_cloud_bigtable-2.26.0/tests/unit/data/execute_query/_async/_testing.py +0 -36
  82. google_cloud_bigtable-2.26.0/tests/unit/data/execute_query/_async/test_query_iterator.py +0 -156
  83. google_cloud_bigtable-2.26.0/tests/unit/data/test_read_rows_acceptance.py +0 -331
  84. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/LICENSE +0 -0
  85. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/MANIFEST.in +0 -0
  86. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/README.rst +0 -0
  87. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable/__init__.py +0 -0
  88. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable/app_profile.py +0 -0
  89. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable/backup.py +0 -0
  90. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable/batcher.py +0 -0
  91. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable/client.py +0 -0
  92. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable/cluster.py +0 -0
  93. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable/column_family.py +0 -0
  94. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable/data/_async/__init__.py +0 -0
  95. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable/data/execute_query/_async/__init__.py +0 -0
  96. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable/data/execute_query/_byte_cursor.py +0 -0
  97. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable/data/execute_query/_parameters_formatting.py +0 -0
  98. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable/data/execute_query/_query_result_parsing_utils.py +0 -0
  99. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable/data/execute_query/_reader.py +0 -0
  100. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable/data/execute_query/metadata.py +0 -0
  101. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable/data/execute_query/values.py +0 -0
  102. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable/data/read_modify_write_rules.py +0 -0
  103. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable/data/read_rows_query.py +0 -0
  104. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable/data/row.py +0 -0
  105. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable/data/row_filters.py +0 -0
  106. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable/encryption_info.py +0 -0
  107. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable/enums.py +0 -0
  108. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable/error.py +0 -0
  109. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable/helpers.py +0 -0
  110. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable/instance.py +0 -0
  111. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable/policy.py +0 -0
  112. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable/row.py +0 -0
  113. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable/row_data.py +0 -0
  114. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable/row_filters.py +0 -0
  115. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable/row_merger.py +0 -0
  116. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable/row_set.py +0 -0
  117. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_admin/__init__.py +0 -0
  118. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_admin/py.typed +0 -0
  119. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_admin_v2/__init__.py +0 -0
  120. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_admin_v2/gapic_metadata.json +0 -0
  121. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_admin_v2/py.typed +0 -0
  122. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_admin_v2/services/__init__.py +0 -0
  123. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/__init__.py +0 -0
  124. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/async_client.py +0 -0
  125. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/pagers.py +0 -0
  126. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/__init__.py +0 -0
  127. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/base.py +0 -0
  128. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/grpc.py +0 -0
  129. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/__init__.py +0 -0
  130. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/async_client.py +0 -0
  131. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/pagers.py +0 -0
  132. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/__init__.py +0 -0
  133. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/base.py +0 -0
  134. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/grpc.py +0 -0
  135. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_admin_v2/types/__init__.py +0 -0
  136. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_admin_v2/types/bigtable_instance_admin.py +0 -0
  137. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_admin_v2/types/bigtable_table_admin.py +0 -0
  138. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_admin_v2/types/common.py +0 -0
  139. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_admin_v2/types/table.py +0 -0
  140. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_admin_v2/types/types.py +0 -0
  141. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_v2/__init__.py +0 -0
  142. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_v2/gapic_metadata.json +0 -0
  143. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_v2/py.typed +0 -0
  144. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_v2/services/__init__.py +0 -0
  145. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_v2/services/bigtable/__init__.py +0 -0
  146. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_v2/services/bigtable/transports/base.py +0 -0
  147. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_v2/services/bigtable/transports/grpc.py +0 -0
  148. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_v2/types/__init__.py +0 -0
  149. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_v2/types/bigtable.py +0 -0
  150. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_v2/types/data.py +0 -0
  151. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_v2/types/request_stats.py +0 -0
  152. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_v2/types/response_params.py +0 -0
  153. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google/cloud/bigtable_v2/types/types.py +0 -0
  154. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google_cloud_bigtable.egg-info/dependency_links.txt +0 -0
  155. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google_cloud_bigtable.egg-info/not-zip-safe +0 -0
  156. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google_cloud_bigtable.egg-info/requires.txt +0 -0
  157. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/google_cloud_bigtable.egg-info/top_level.txt +0 -0
  158. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/scripts/fixup_bigtable_v2_keywords.py +0 -0
  159. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/setup.cfg +0 -0
  160. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/setup.py +0 -0
  161. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/__init__.py +0 -0
  162. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/_testing.py +0 -0
  163. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/system/__init__.py +0 -0
  164. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/system/conftest.py +0 -0
  165. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/system/v2_client/__init__.py +0 -0
  166. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/system/v2_client/_helpers.py +0 -0
  167. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/system/v2_client/conftest.py +0 -0
  168. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/system/v2_client/test_data_api.py +0 -0
  169. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/system/v2_client/test_instance_admin.py +0 -0
  170. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/system/v2_client/test_table_admin.py +0 -0
  171. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/__init__.py +0 -0
  172. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/_testing.py +0 -0
  173. {google_cloud_bigtable-2.26.0/tests/system → google_cloud_bigtable-2.28.0/tests/unit}/data/__init__.py +0 -0
  174. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/data/_async/__init__.py +0 -0
  175. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/data/_testing.py +0 -0
  176. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/data/execute_query/__init__.py +0 -0
  177. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/data/execute_query/_async/__init__.py +0 -0
  178. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/data/execute_query/_testing.py +0 -0
  179. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/data/execute_query/test_byte_cursor.py +0 -0
  180. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/data/execute_query/test_query_result_parsing_utils.py +0 -0
  181. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/data/execute_query/test_query_result_row_reader.py +0 -0
  182. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/data/read-rows-acceptance-test.json +0 -0
  183. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/data/test_exceptions.py +0 -0
  184. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/data/test_helpers.py +0 -0
  185. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/data/test_mutations.py +0 -0
  186. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/data/test_read_modify_write_rules.py +0 -0
  187. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/data/test_read_rows_query.py +0 -0
  188. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/data/test_row.py +0 -0
  189. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/data/test_row_filters.py +0 -0
  190. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/gapic/__init__.py +0 -0
  191. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/gapic/bigtable_admin_v2/__init__.py +0 -0
  192. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/gapic/bigtable_v2/__init__.py +0 -0
  193. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/test_packaging.py +0 -0
  194. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/v2_client/__init__.py +0 -0
  195. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/v2_client/_testing.py +0 -0
  196. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/v2_client/read-rows-acceptance-test.json +0 -0
  197. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/v2_client/test_app_profile.py +0 -0
  198. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/v2_client/test_backup.py +0 -0
  199. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/v2_client/test_batcher.py +0 -0
  200. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/v2_client/test_client.py +0 -0
  201. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/v2_client/test_cluster.py +0 -0
  202. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/v2_client/test_column_family.py +0 -0
  203. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/v2_client/test_encryption_info.py +0 -0
  204. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/v2_client/test_error.py +0 -0
  205. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/v2_client/test_instance.py +0 -0
  206. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/v2_client/test_policy.py +0 -0
  207. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/v2_client/test_row.py +0 -0
  208. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/v2_client/test_row_data.py +0 -0
  209. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/v2_client/test_row_filters.py +0 -0
  210. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/v2_client/test_row_merger.py +0 -0
  211. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/v2_client/test_row_set.py +0 -0
  212. {google_cloud_bigtable-2.26.0 → google_cloud_bigtable-2.28.0}/tests/unit/v2_client/test_table.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: google-cloud-bigtable
3
- Version: 2.26.0
3
+ Version: 2.28.0
4
4
  Summary: Google Cloud Bigtable API client library
5
5
  Home-page: https://github.com/googleapis/python-bigtable
6
6
  Author: Google LLC
@@ -17,8 +17,10 @@ from google.cloud.bigtable import gapic_version as package_version
17
17
 
18
18
  from google.cloud.bigtable.data._async.client import BigtableDataClientAsync
19
19
  from google.cloud.bigtable.data._async.client import TableAsync
20
-
21
20
  from google.cloud.bigtable.data._async.mutations_batcher import MutationsBatcherAsync
21
+ from google.cloud.bigtable.data._sync_autogen.client import BigtableDataClient
22
+ from google.cloud.bigtable.data._sync_autogen.client import Table
23
+ from google.cloud.bigtable.data._sync_autogen.mutations_batcher import MutationsBatcher
22
24
 
23
25
  from google.cloud.bigtable.data.read_rows_query import ReadRowsQuery
24
26
  from google.cloud.bigtable.data.read_rows_query import RowRange
@@ -45,16 +47,42 @@ from google.cloud.bigtable.data._helpers import TABLE_DEFAULT
45
47
  from google.cloud.bigtable.data._helpers import RowKeySamples
46
48
  from google.cloud.bigtable.data._helpers import ShardedQuery
47
49
 
50
+ # setup custom CrossSync mappings for library
51
+ from google.cloud.bigtable_v2.services.bigtable.async_client import (
52
+ BigtableAsyncClient,
53
+ )
54
+ from google.cloud.bigtable.data._async._read_rows import _ReadRowsOperationAsync
55
+ from google.cloud.bigtable.data._async._mutate_rows import _MutateRowsOperationAsync
56
+
57
+ from google.cloud.bigtable_v2.services.bigtable.client import (
58
+ BigtableClient,
59
+ )
60
+ from google.cloud.bigtable.data._sync_autogen._read_rows import _ReadRowsOperation
61
+ from google.cloud.bigtable.data._sync_autogen._mutate_rows import _MutateRowsOperation
62
+
63
+ from google.cloud.bigtable.data._cross_sync import CrossSync
64
+
65
+ CrossSync.add_mapping("GapicClient", BigtableAsyncClient)
66
+ CrossSync._Sync_Impl.add_mapping("GapicClient", BigtableClient)
67
+ CrossSync.add_mapping("_ReadRowsOperation", _ReadRowsOperationAsync)
68
+ CrossSync._Sync_Impl.add_mapping("_ReadRowsOperation", _ReadRowsOperation)
69
+ CrossSync.add_mapping("_MutateRowsOperation", _MutateRowsOperationAsync)
70
+ CrossSync._Sync_Impl.add_mapping("_MutateRowsOperation", _MutateRowsOperation)
71
+ CrossSync.add_mapping("MutationsBatcher", MutationsBatcherAsync)
72
+ CrossSync._Sync_Impl.add_mapping("MutationsBatcher", MutationsBatcher)
48
73
 
49
74
  __version__: str = package_version.__version__
50
75
 
51
76
  __all__ = (
52
77
  "BigtableDataClientAsync",
53
78
  "TableAsync",
79
+ "MutationsBatcherAsync",
80
+ "BigtableDataClient",
81
+ "Table",
82
+ "MutationsBatcher",
54
83
  "RowKeySamples",
55
84
  "ReadRowsQuery",
56
85
  "RowRange",
57
- "MutationsBatcherAsync",
58
86
  "Mutation",
59
87
  "RowMutationEntry",
60
88
  "SetCell",
@@ -1,4 +1,4 @@
1
- # Copyright 2023 Google LLC
1
+ # Copyright 2024 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -15,38 +15,38 @@
15
15
  from __future__ import annotations
16
16
 
17
17
  from typing import Sequence, TYPE_CHECKING
18
- from dataclasses import dataclass
19
18
  import functools
20
19
 
21
20
  from google.api_core import exceptions as core_exceptions
22
21
  from google.api_core import retry as retries
23
- import google.cloud.bigtable_v2.types.bigtable as types_pb
24
22
  import google.cloud.bigtable.data.exceptions as bt_exceptions
25
- from google.cloud.bigtable.data._helpers import _make_metadata
26
23
  from google.cloud.bigtable.data._helpers import _attempt_timeout_generator
27
24
  from google.cloud.bigtable.data._helpers import _retry_exception_factory
28
25
 
29
26
  # mutate_rows requests are limited to this number of mutations
30
27
  from google.cloud.bigtable.data.mutations import _MUTATE_ROWS_REQUEST_MUTATION_LIMIT
28
+ from google.cloud.bigtable.data.mutations import _EntryWithProto
29
+
30
+ from google.cloud.bigtable.data._cross_sync import CrossSync
31
31
 
32
32
  if TYPE_CHECKING:
33
- from google.cloud.bigtable_v2.services.bigtable.async_client import (
34
- BigtableAsyncClient,
35
- )
36
33
  from google.cloud.bigtable.data.mutations import RowMutationEntry
37
- from google.cloud.bigtable.data._async.client import TableAsync
38
-
39
34
 
40
- @dataclass
41
- class _EntryWithProto:
42
- """
43
- A dataclass to hold a RowMutationEntry and its corresponding proto representation.
44
- """
35
+ if CrossSync.is_async:
36
+ from google.cloud.bigtable_v2.services.bigtable.async_client import (
37
+ BigtableAsyncClient as GapicClientType,
38
+ )
39
+ from google.cloud.bigtable.data._async.client import TableAsync as TableType
40
+ else:
41
+ from google.cloud.bigtable_v2.services.bigtable.client import ( # type: ignore
42
+ BigtableClient as GapicClientType,
43
+ )
44
+ from google.cloud.bigtable.data._sync_autogen.client import Table as TableType # type: ignore
45
45
 
46
- entry: RowMutationEntry
47
- proto: types_pb.MutateRowsRequest.Entry
46
+ __CROSS_SYNC_OUTPUT__ = "google.cloud.bigtable.data._sync_autogen._mutate_rows"
48
47
 
49
48
 
49
+ @CrossSync.convert_class("_MutateRowsOperation")
50
50
  class _MutateRowsOperationAsync:
51
51
  """
52
52
  MutateRowsOperation manages the logic of sending a set of row mutations,
@@ -66,10 +66,11 @@ class _MutateRowsOperationAsync:
66
66
  If not specified, the request will run until operation_timeout is reached.
67
67
  """
68
68
 
69
+ @CrossSync.convert
69
70
  def __init__(
70
71
  self,
71
- gapic_client: "BigtableAsyncClient",
72
- table: "TableAsync",
72
+ gapic_client: GapicClientType,
73
+ table: TableType,
73
74
  mutation_entries: list["RowMutationEntry"],
74
75
  operation_timeout: float,
75
76
  attempt_timeout: float | None,
@@ -84,14 +85,10 @@ class _MutateRowsOperationAsync:
84
85
  f"all entries. Found {total_mutations}."
85
86
  )
86
87
  # create partial function to pass to trigger rpc call
87
- metadata = _make_metadata(
88
- table.table_name, table.app_profile_id, instance_name=None
89
- )
90
88
  self._gapic_fn = functools.partial(
91
89
  gapic_client.mutate_rows,
92
90
  table_name=table.table_name,
93
91
  app_profile_id=table.app_profile_id,
94
- metadata=metadata,
95
92
  retry=None,
96
93
  )
97
94
  # create predicate for determining which errors are retryable
@@ -102,7 +99,7 @@ class _MutateRowsOperationAsync:
102
99
  bt_exceptions._MutateRowsIncomplete,
103
100
  )
104
101
  sleep_generator = retries.exponential_sleep_generator(0.01, 2, 60)
105
- self._operation = retries.retry_target_async(
102
+ self._operation = lambda: CrossSync.retry_target(
106
103
  self._run_attempt,
107
104
  self.is_retryable,
108
105
  sleep_generator,
@@ -117,6 +114,7 @@ class _MutateRowsOperationAsync:
117
114
  self.remaining_indices = list(range(len(self.mutations)))
118
115
  self.errors: dict[int, list[Exception]] = {}
119
116
 
117
+ @CrossSync.convert
120
118
  async def start(self):
121
119
  """
122
120
  Start the operation, and run until completion
@@ -126,7 +124,7 @@ class _MutateRowsOperationAsync:
126
124
  """
127
125
  try:
128
126
  # trigger mutate_rows
129
- await self._operation
127
+ await self._operation()
130
128
  except Exception as exc:
131
129
  # exceptions raised by retryable are added to the list of exceptions for all unfinalized mutations
132
130
  incomplete_indices = self.remaining_indices.copy()
@@ -153,6 +151,7 @@ class _MutateRowsOperationAsync:
153
151
  all_errors, len(self.mutations)
154
152
  )
155
153
 
154
+ @CrossSync.convert
156
155
  async def _run_attempt(self):
157
156
  """
158
157
  Run a single attempt of the mutate_rows rpc.
@@ -1,4 +1,4 @@
1
- # Copyright 2023 Google LLC
1
+ # Copyright 2024 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -15,13 +15,7 @@
15
15
 
16
16
  from __future__ import annotations
17
17
 
18
- from typing import (
19
- TYPE_CHECKING,
20
- AsyncGenerator,
21
- AsyncIterable,
22
- Awaitable,
23
- Sequence,
24
- )
18
+ from typing import Sequence, TYPE_CHECKING
25
19
 
26
20
  from google.cloud.bigtable_v2.types import ReadRowsRequest as ReadRowsRequestPB
27
21
  from google.cloud.bigtable_v2.types import ReadRowsResponse as ReadRowsResponsePB
@@ -32,22 +26,25 @@ from google.cloud.bigtable.data.row import Row, Cell
32
26
  from google.cloud.bigtable.data.read_rows_query import ReadRowsQuery
33
27
  from google.cloud.bigtable.data.exceptions import InvalidChunk
34
28
  from google.cloud.bigtable.data.exceptions import _RowSetComplete
29
+ from google.cloud.bigtable.data.exceptions import _ResetRow
35
30
  from google.cloud.bigtable.data._helpers import _attempt_timeout_generator
36
- from google.cloud.bigtable.data._helpers import _make_metadata
37
31
  from google.cloud.bigtable.data._helpers import _retry_exception_factory
38
32
 
39
33
  from google.api_core import retry as retries
40
34
  from google.api_core.retry import exponential_sleep_generator
41
35
 
42
- if TYPE_CHECKING:
43
- from google.cloud.bigtable.data._async.client import TableAsync
36
+ from google.cloud.bigtable.data._cross_sync import CrossSync
44
37
 
38
+ if TYPE_CHECKING:
39
+ if CrossSync.is_async:
40
+ from google.cloud.bigtable.data._async.client import TableAsync as TableType
41
+ else:
42
+ from google.cloud.bigtable.data._sync_autogen.client import Table as TableType # type: ignore
45
43
 
46
- class _ResetRow(Exception):
47
- def __init__(self, chunk):
48
- self.chunk = chunk
44
+ __CROSS_SYNC_OUTPUT__ = "google.cloud.bigtable.data._sync_autogen._read_rows"
49
45
 
50
46
 
47
+ @CrossSync.convert_class("_ReadRowsOperation")
51
48
  class _ReadRowsOperationAsync:
52
49
  """
53
50
  ReadRowsOperation handles the logic of merging chunks from a ReadRowsResponse stream
@@ -74,7 +71,6 @@ class _ReadRowsOperationAsync:
74
71
  "request",
75
72
  "table",
76
73
  "_predicate",
77
- "_metadata",
78
74
  "_last_yielded_row_key",
79
75
  "_remaining_count",
80
76
  )
@@ -82,7 +78,7 @@ class _ReadRowsOperationAsync:
82
78
  def __init__(
83
79
  self,
84
80
  query: ReadRowsQuery,
85
- table: "TableAsync",
81
+ table: TableType,
86
82
  operation_timeout: float,
87
83
  attempt_timeout: float,
88
84
  retryable_exceptions: Sequence[type[Exception]] = (),
@@ -101,20 +97,17 @@ class _ReadRowsOperationAsync:
101
97
  self.request = query._to_pb(table)
102
98
  self.table = table
103
99
  self._predicate = retries.if_exception_type(*retryable_exceptions)
104
- self._metadata = _make_metadata(
105
- table.table_name, table.app_profile_id, instance_name=None
106
- )
107
100
  self._last_yielded_row_key: bytes | None = None
108
101
  self._remaining_count: int | None = self.request.rows_limit or None
109
102
 
110
- def start_operation(self) -> AsyncGenerator[Row, None]:
103
+ def start_operation(self) -> CrossSync.Iterable[Row]:
111
104
  """
112
105
  Start the read_rows operation, retrying on retryable errors.
113
106
 
114
107
  Yields:
115
108
  Row: The next row in the stream
116
109
  """
117
- return retries.retry_target_stream_async(
110
+ return CrossSync.retry_target_stream(
118
111
  self._read_rows_attempt,
119
112
  self._predicate,
120
113
  exponential_sleep_generator(0.01, 60, multiplier=2),
@@ -122,7 +115,7 @@ class _ReadRowsOperationAsync:
122
115
  exception_factory=_retry_exception_factory,
123
116
  )
124
117
 
125
- def _read_rows_attempt(self) -> AsyncGenerator[Row, None]:
118
+ def _read_rows_attempt(self) -> CrossSync.Iterable[Row]:
126
119
  """
127
120
  Attempt a single read_rows rpc call.
128
121
  This function is intended to be wrapped by retry logic,
@@ -152,15 +145,15 @@ class _ReadRowsOperationAsync:
152
145
  gapic_stream = self.table.client._gapic_client.read_rows(
153
146
  self.request,
154
147
  timeout=next(self.attempt_timeout_gen),
155
- metadata=self._metadata,
156
148
  retry=None,
157
149
  )
158
150
  chunked_stream = self.chunk_stream(gapic_stream)
159
151
  return self.merge_rows(chunked_stream)
160
152
 
153
+ @CrossSync.convert()
161
154
  async def chunk_stream(
162
- self, stream: Awaitable[AsyncIterable[ReadRowsResponsePB]]
163
- ) -> AsyncGenerator[ReadRowsResponsePB.CellChunk, None]:
155
+ self, stream: CrossSync.Awaitable[CrossSync.Iterable[ReadRowsResponsePB]]
156
+ ) -> CrossSync.Iterable[ReadRowsResponsePB.CellChunk]:
164
157
  """
165
158
  process chunks out of raw read_rows stream
166
159
 
@@ -210,9 +203,12 @@ class _ReadRowsOperationAsync:
210
203
  current_key = None
211
204
 
212
205
  @staticmethod
206
+ @CrossSync.convert(
207
+ replace_symbols={"__aiter__": "__iter__", "__anext__": "__next__"},
208
+ )
213
209
  async def merge_rows(
214
- chunks: AsyncGenerator[ReadRowsResponsePB.CellChunk, None] | None
215
- ) -> AsyncGenerator[Row, None]:
210
+ chunks: CrossSync.Iterable[ReadRowsResponsePB.CellChunk] | None,
211
+ ) -> CrossSync.Iterable[Row]:
216
212
  """
217
213
  Merge chunks into rows
218
214
 
@@ -228,7 +224,7 @@ class _ReadRowsOperationAsync:
228
224
  while True:
229
225
  try:
230
226
  c = await it.__anext__()
231
- except StopAsyncIteration:
227
+ except CrossSync.StopIteration:
232
228
  # stream complete
233
229
  return
234
230
  row_key = c.row_key
@@ -321,7 +317,7 @@ class _ReadRowsOperationAsync:
321
317
  ):
322
318
  raise InvalidChunk("reset row with data")
323
319
  continue
324
- except StopAsyncIteration:
320
+ except CrossSync.StopIteration:
325
321
  raise InvalidChunk("premature end of stream")
326
322
 
327
323
  @staticmethod