bytekit-sdk 0.3.4__tar.gz → 0.3.5__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 (236) hide show
  1. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/CHANGELOG.md +131 -2
  2. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/PKG-INFO +43 -9
  3. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/README.md +42 -8
  4. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/pyproject.toml +1 -1
  5. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/api/account/get_account.py +1 -2
  6. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/api/bulk/create_bulk.py +1 -2
  7. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/api/bulk/delete_bulk.py +1 -2
  8. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/api/bulk/get_bulk.py +1 -2
  9. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/api/bulk/list_bulk_screenshots.py +49 -2
  10. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/api/fetch/get_fetch.py +1 -2
  11. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/api/fetch/post_fetch.py +1 -2
  12. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/api/fetch_bulk/create_fetch_bulk.py +1 -2
  13. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/api/fetch_bulk/get_fetch_bulk.py +45 -2
  14. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/api/monitors/create_monitor.py +1 -2
  15. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/api/monitors/delete_monitor.py +1 -2
  16. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/api/monitors/get_monitor.py +1 -2
  17. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/api/monitors/list_monitor_captures.py +1 -2
  18. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/api/monitors/list_monitors.py +1 -2
  19. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/api/monitors/update_monitor.py +1 -2
  20. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/api/scrape/create_scrape.py +1 -2
  21. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/api/scrape/get_scrape.py +1 -2
  22. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/api/scrape_bulk/create_scrape_bulk.py +1 -2
  23. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/api/scrape_bulk/get_scrape_bulk.py +1 -2
  24. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/api/screenshots/create_screenshot.py +28 -13
  25. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/api/screenshots/get_screenshot.py +1 -2
  26. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/api/search/create_search.py +1 -2
  27. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/api/sitemap/create_sitemap.py +1 -2
  28. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/api/sitemap/get_sitemap.py +1 -2
  29. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/api/usage/get_usage.py +1 -2
  30. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/api/usage/get_usage_by_endpoint.py +1 -2
  31. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/api/usage/get_usage_daily.py +1 -2
  32. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/api/webhooks/list_webhook_deliveries.py +1 -2
  33. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/api/webhooks/retry_webhook_delivery.py +1 -2
  34. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/client.py +47 -18
  35. bytekit_sdk-0.3.5/src/bytekit/errors.py +216 -0
  36. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/get_fetch_bulk_response_200_items_item.py +8 -2
  37. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/get_usage_response_200.py +2 -2
  38. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/get_usage_response_200_plan_type.py +0 -1
  39. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/list_bulk_screenshots_response_200_items_item.py +10 -2
  40. bytekit_sdk-0.3.4/src/bytekit/errors.py +0 -106
  41. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/.gitignore +0 -0
  42. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/LICENSE +0 -0
  43. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/__init__.py +0 -0
  44. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/api/__init__.py +0 -0
  45. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/api/account/__init__.py +0 -0
  46. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/api/bulk/__init__.py +0 -0
  47. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/api/fetch/__init__.py +0 -0
  48. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/api/fetch_bulk/__init__.py +0 -0
  49. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/api/monitors/__init__.py +0 -0
  50. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/api/scrape/__init__.py +0 -0
  51. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/api/scrape_bulk/__init__.py +0 -0
  52. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/api/screenshots/__init__.py +0 -0
  53. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/api/search/__init__.py +0 -0
  54. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/api/sitemap/__init__.py +0 -0
  55. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/api/usage/__init__.py +0 -0
  56. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/api/webhooks/__init__.py +0 -0
  57. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/__init__.py +0 -0
  58. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/account_bearer_response.py +0 -0
  59. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/account_bearer_response_api_key.py +0 -0
  60. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/account_bearer_response_api_key_environment.py +0 -0
  61. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/account_bearer_response_auto_topup.py +0 -0
  62. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/account_bearer_response_plan.py +0 -0
  63. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/account_bearer_response_subscription.py +0 -0
  64. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/account_bearer_response_subscription_plan.py +0 -0
  65. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/account_bearer_response_subscription_status.py +0 -0
  66. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/account_session_response.py +0 -0
  67. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/account_session_response_notifications.py +0 -0
  68. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/account_session_response_plan.py +0 -0
  69. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/bandwidth_balance.py +0 -0
  70. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/capture_response.py +0 -0
  71. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/capture_response_outcome.py +0 -0
  72. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/clip.py +0 -0
  73. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/cookie.py +0 -0
  74. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_bulk_body.py +0 -0
  75. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_bulk_body_defaults.py +0 -0
  76. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_bulk_body_defaults_device.py +0 -0
  77. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_bulk_body_defaults_device_scale_factor_type_1.py +0 -0
  78. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_bulk_body_defaults_device_scale_factor_type_2_type_1.py +0 -0
  79. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_bulk_body_defaults_device_scale_factor_type_3_type_1.py +0 -0
  80. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_bulk_body_defaults_formats_item.py +0 -0
  81. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_bulk_body_defaults_type.py +0 -0
  82. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_bulk_body_defaults_viewport_type_0.py +0 -0
  83. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_bulk_body_defaults_wait_until.py +0 -0
  84. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_bulk_body_items_item.py +0 -0
  85. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_bulk_body_items_item_device.py +0 -0
  86. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_bulk_body_items_item_formats_item.py +0 -0
  87. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_bulk_body_items_item_scenario.py +0 -0
  88. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_bulk_body_items_item_type.py +0 -0
  89. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_bulk_body_items_item_viewport_type_0.py +0 -0
  90. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_bulk_body_items_item_wait_until.py +0 -0
  91. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_bulk_response_202.py +0 -0
  92. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_bulk_response_202_status.py +0 -0
  93. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_fetch_bulk_body.py +0 -0
  94. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_fetch_bulk_body_defaults.py +0 -0
  95. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_fetch_bulk_body_defaults_format.py +0 -0
  96. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_fetch_bulk_body_urls_item_type_1.py +0 -0
  97. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_fetch_bulk_body_urls_item_type_1_format.py +0 -0
  98. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_fetch_bulk_response_202.py +0 -0
  99. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_fetch_bulk_response_202_status.py +0 -0
  100. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_scrape_bulk_body.py +0 -0
  101. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_scrape_bulk_body_custom.py +0 -0
  102. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_scrape_bulk_body_defaults.py +0 -0
  103. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_scrape_bulk_body_defaults_formats_item.py +0 -0
  104. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_scrape_bulk_body_defaults_headers.py +0 -0
  105. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_scrape_bulk_body_items_item.py +0 -0
  106. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_scrape_bulk_body_items_item_custom.py +0 -0
  107. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_scrape_bulk_body_items_item_formats_item.py +0 -0
  108. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_scrape_bulk_body_items_item_headers.py +0 -0
  109. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_scrape_bulk_response_202.py +0 -0
  110. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_scrape_bulk_response_202_status.py +0 -0
  111. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_search_body.py +0 -0
  112. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_search_body_date_range.py +0 -0
  113. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_search_body_type.py +0 -0
  114. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_search_response_200.py +0 -0
  115. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_search_response_200_results_item.py +0 -0
  116. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_search_response_200_results_item_image.py +0 -0
  117. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_search_response_502.py +0 -0
  118. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/create_search_response_502_error.py +0 -0
  119. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/credit_balance.py +0 -0
  120. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/delete_bulk_response_200.py +0 -0
  121. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/delete_bulk_response_200_status.py +0 -0
  122. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/error.py +0 -0
  123. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/error_error.py +0 -0
  124. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/error_status.py +0 -0
  125. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/fetch_request.py +0 -0
  126. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/fetch_request_cache_ttl_type_1.py +0 -0
  127. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/fetch_request_custom.py +0 -0
  128. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/fetch_request_format.py +0 -0
  129. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/fetch_request_markdown_images.py +0 -0
  130. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/fetch_request_markdown_links.py +0 -0
  131. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/fetch_request_markdown_mode.py +0 -0
  132. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/get_bulk_response_200.py +0 -0
  133. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/get_bulk_response_200_status.py +0 -0
  134. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/get_fetch_bulk_response_200.py +0 -0
  135. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/get_fetch_bulk_response_200_items_item_status.py +0 -0
  136. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/get_fetch_bulk_response_200_status.py +0 -0
  137. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/get_fetch_cache_ttl_type_1.py +0 -0
  138. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/get_fetch_format.py +0 -0
  139. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/get_scrape_bulk_response_200.py +0 -0
  140. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/get_scrape_bulk_response_200_status.py +0 -0
  141. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/get_usage_by_endpoint_response_200.py +0 -0
  142. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/get_usage_by_endpoint_response_200_rows_item.py +0 -0
  143. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/get_usage_by_endpoint_response_200_rows_item_endpoint.py +0 -0
  144. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/get_usage_by_endpoint_response_200_totals.py +0 -0
  145. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/get_usage_daily_response_200.py +0 -0
  146. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/get_usage_daily_response_200_data_item.py +0 -0
  147. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/list_bulk_screenshots_response_200.py +0 -0
  148. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/list_bulk_screenshots_response_200_items_item_status.py +0 -0
  149. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/list_bulk_screenshots_response_200_items_item_type.py +0 -0
  150. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/list_monitor_captures_response_200.py +0 -0
  151. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/list_monitors_response_200.py +0 -0
  152. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/list_monitors_status.py +0 -0
  153. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/list_webhook_deliveries_response_200.py +0 -0
  154. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/list_webhook_deliveries_status.py +0 -0
  155. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/metadata.py +0 -0
  156. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/monitor_create_request.py +0 -0
  157. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/monitor_create_request_interval_type.py +0 -0
  158. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/monitor_create_request_notify_on.py +0 -0
  159. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/monitor_create_request_options.py +0 -0
  160. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/monitor_create_request_scrape_options.py +0 -0
  161. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/monitor_create_request_type.py +0 -0
  162. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/monitor_create_request_webhook_headers.py +0 -0
  163. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/monitor_create_response.py +0 -0
  164. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/monitor_response.py +0 -0
  165. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/monitor_response_interval_type.py +0 -0
  166. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/monitor_response_metadata_type_0.py +0 -0
  167. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/monitor_response_status.py +0 -0
  168. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/monitor_response_type.py +0 -0
  169. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/monitor_response_webhook_headers_type_0.py +0 -0
  170. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/monitor_update_request.py +0 -0
  171. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/monitor_update_request_interval_type.py +0 -0
  172. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/monitor_update_request_notify_on.py +0 -0
  173. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/monitor_update_request_options.py +0 -0
  174. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/monitor_update_request_scrape_options.py +0 -0
  175. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/monitor_update_request_status.py +0 -0
  176. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/monitor_update_request_webhook_headers.py +0 -0
  177. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/scrape_error_envelope.py +0 -0
  178. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/scrape_error_envelope_error.py +0 -0
  179. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/scrape_error_envelope_error_code.py +0 -0
  180. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/scrape_error_envelope_schema_version.py +0 -0
  181. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/scrape_error_envelope_status.py +0 -0
  182. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/scrape_formats.py +0 -0
  183. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/scrape_markdown_tokens.py +0 -0
  184. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/scrape_metadata.py +0 -0
  185. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/scrape_queued_envelope.py +0 -0
  186. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/scrape_queued_envelope_schema_version.py +0 -0
  187. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/scrape_queued_envelope_status.py +0 -0
  188. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/scrape_request.py +0 -0
  189. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/scrape_request_cache_ttl_type_1.py +0 -0
  190. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/scrape_request_custom.py +0 -0
  191. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/scrape_request_events_item.py +0 -0
  192. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/scrape_request_formats_item.py +0 -0
  193. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/scrape_request_headers.py +0 -0
  194. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/scrape_request_markdown_images.py +0 -0
  195. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/scrape_request_markdown_links.py +0 -0
  196. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/scrape_request_markdown_mode.py +0 -0
  197. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/scrape_request_token_encoding.py +0 -0
  198. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/scrape_request_x_internal_scrape_path.py +0 -0
  199. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/scrape_scored_image.py +0 -0
  200. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/scrape_scored_link.py +0 -0
  201. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/scrape_stats.py +0 -0
  202. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/scrape_success_envelope.py +0 -0
  203. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/scrape_success_envelope_cache.py +0 -0
  204. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/scrape_success_envelope_custom.py +0 -0
  205. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/scrape_success_envelope_schema_version.py +0 -0
  206. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/scrape_success_envelope_status.py +0 -0
  207. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/scrape_table.py +0 -0
  208. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/scrape_table_kind.py +0 -0
  209. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/scrape_warning.py +0 -0
  210. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/scrape_warning_code.py +0 -0
  211. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/screenshot_request.py +0 -0
  212. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/screenshot_request_device.py +0 -0
  213. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/screenshot_request_device_scale_factor_type_1.py +0 -0
  214. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/screenshot_request_device_scale_factor_type_2_type_1.py +0 -0
  215. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/screenshot_request_device_scale_factor_type_3_type_1.py +0 -0
  216. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/screenshot_request_format.py +0 -0
  217. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/screenshot_request_headers.py +0 -0
  218. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/screenshot_request_wait_until.py +0 -0
  219. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/screenshot_response.py +0 -0
  220. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/screenshot_response_status.py +0 -0
  221. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/sitemap_request.py +0 -0
  222. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/sitemap_request_process_type_0.py +0 -0
  223. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/sitemap_request_process_type_0_options.py +0 -0
  224. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/sitemap_request_strategy.py +0 -0
  225. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/sitemap_response.py +0 -0
  226. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/sitemap_response_cache.py +0 -0
  227. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/sitemap_response_metadata_type_0.py +0 -0
  228. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/sitemap_response_process_type_0.py +0 -0
  229. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/sitemap_response_sources_type_0.py +0 -0
  230. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/sitemap_response_status.py +0 -0
  231. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/viewport.py +0 -0
  232. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/webhook_delivery_response.py +0 -0
  233. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/webhook_delivery_response_event_type.py +0 -0
  234. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/models/webhook_delivery_response_status.py +0 -0
  235. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/py.typed +0 -0
  236. {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.5}/src/bytekit/types.py +0 -0
@@ -3,6 +3,104 @@
3
3
  All notable changes to the ByteKit Python SDK are documented here.
4
4
  PyPI distribution: `bytekit-sdk`. Import name: `bytekit`.
5
5
 
6
+ ## 0.3.5
7
+
8
+ ### Breaking
9
+
10
+ - **`AuthenticatedClient` takes no positional arguments.** `token`, `prefix` and
11
+ `auth_header_name` are now keyword-only, joining `base_url`, `timeout`,
12
+ `raise_on_unexpected_status` and the rest — so `AuthenticatedClient(...)` accepts keywords
13
+ only. Before 0.3.0 the first positional argument was `base_url`, which made
14
+ `AuthenticatedClient("https://api-stg.bytekit.com", "sk_live_…")` a documented call. When
15
+ 0.3.0 made `base_url` a defaulted keyword argument, that call stopped meaning what it said
16
+ and started **binding the URL to `token` and the API key to `prefix`** — sending
17
+ `Authorization: sk_live_… https://api-stg.bytekit.com` to the _default_ host,
18
+ `https://api.bytekit.com`, with nothing raised and nothing warned. It now raises
19
+ `TypeError`. Migration is mechanical:
20
+ `AuthenticatedClient(base_url="https://api-stg.bytekit.com", token="sk_live_…")`. Keyword
21
+ construction — the form the README, the docs site and every example already use — is
22
+ entirely unchanged, including `prefix=`/`auth_header_name=` overrides and the
23
+ `with_headers`/`with_cookies`/`with_timeout` helpers. The unauthenticated `Client` was
24
+ already keyword-only and is unaffected.
25
+
26
+ ### Fixed
27
+
28
+ - **A schema-drifted response body no longer crashes with a bare `KeyError`.** A generated
29
+ model's `from_dict` trusts the `required` keys the OpenAPI spec declared when the client
30
+ was generated, so a server that renamed, dropped or retyped a field leaked the generator's
31
+ own internal exception straight to the caller — `KeyError: 'schema_version'` from
32
+ `create_scrape`, `KeyError: 'period_start'` from `get_usage`, `KeyError: 'data'` from
33
+ `list_monitors`, plus `TypeError`/`ValueError` for non-object and nested-drift bodies. It
34
+ happened on a **documented** status (a `200`/`202`), in **both** raise modes, and no row of
35
+ the documented error table covered it, so a caller who handled that table faithfully still
36
+ had no branch for it. Schema drift now takes exactly the same two arms as a non-JSON body:
37
+ `errors.UnexpectedStatus` (carrying `.status_code` and the raw `.content`, with the
38
+ original parse failure attached as `__cause__`) in the default mode, and `None` under
39
+ `raise_on_unexpected_status=False`. Deliberately **no new exception type** — a new class
40
+ would be one every existing `except errors.UnexpectedStatus` silently fails to catch, i.e.
41
+ the same untyped crash in a different costume. Bodies that match the documented schema
42
+ parse exactly as before, and a genuinely optional key that is absent still yields `UNSET`.
43
+ - **`client.search()` never returns a silent `None`.** Its 200 body is parsed through the
44
+ same shared guard the generated operations use, which honors
45
+ `raise_on_unexpected_status` — so an opt-out client got `None` handed back from a non-JSON
46
+ 200 or a schema-drifted one, contradicting both the method's non-`Optional` return
47
+ annotation and its own docstring. `search()` now raises `errors.UnexpectedStatus` in
48
+ **both** raise modes. `raise_on_unexpected_status` configures the generated two-tier
49
+ contract, whose signatures are `Optional[...]`; `search()` was never part of it — it
50
+ already raises on documented error statuses that the generated `create_search` returns as
51
+ a typed `Error` model. A well-formed 200 still returns the parsed
52
+ `CreateSearchResponse200` in either mode.
53
+ - **A non-IANA HTTP status no longer crashes every operation with a bare `ValueError`.**
54
+ Each generated operation built its `Response` with
55
+ `status_code=HTTPStatus(response.status_code)` evaluated _before_ the response was
56
+ parsed, so any status outside Python's `http.HTTPStatus` — Cloudflare's `520`–`530`
57
+ family, nginx's `499` — raised `ValueError: 520 is not a valid HTTPStatus` from inside
58
+ the SDK. This happened in **both** raise modes: the default
59
+ `raise_on_unexpected_status=True` never got to raise its `errors.UnexpectedStatus`, and
60
+ `raise_on_unexpected_status=False`, which promises `None`, raised the `ValueError` too.
61
+ `api.bytekit.com` is served through Cloudflare, so this was exactly the edge/CDN failure
62
+ class the typed-error contract exists for. All 29 operations now behave as documented:
63
+ `errors.UnexpectedStatus` (carrying `.status_code` and the raw `.content`) in the default
64
+ mode, a `Response` with `.parsed is None` in the opt-out mode. The hand-written
65
+ `client.search()` wrapper was never affected and is unchanged.
66
+
67
+ ### Changed
68
+
69
+ - **`Response.status_code` is a plain `int` for a status `http.HTTPStatus` does not know.**
70
+ This is the contract decision behind the fix above, recorded here because it is the one
71
+ observable difference in the typed surface. Concretely:
72
+ - Every status the stdlib enum **does** know — documented by the API or not, `200` as
73
+ much as `503` — still comes back as a real `http.HTTPStatus` member, so
74
+ `response.status_code.phrase`, `.name`, and identity comparisons such as
75
+ `response.status_code is HTTPStatus.OK` keep working exactly as before.
76
+ - A status the enum does **not** know (`499`, `520`, `521`, `522`, `530`, …) comes back
77
+ as the plain `int` the wire carried. `int` comparisons (`response.status_code == 520`,
78
+ `>= 500`) work; enum-only attributes (`.phrase`, `.name`) do not exist on it. The
79
+ alternatives were rejected deliberately: a synthetic `IntEnum` member would invent a
80
+ `.phrase`/`.name` no registry backs, and raising before the `Response` is constructed
81
+ is the bug itself — it is precisely what `raise_on_unexpected_status=False` promises
82
+ not to do.
83
+ - The **declared** annotation on `Response.status_code` is unchanged (`HTTPStatus`), so
84
+ this release adds no type errors to existing consumer code; widening it to
85
+ `Union[HTTPStatus, int]` would make `.phrase`/`.name` a type error on _every_ response,
86
+ including the IANA ones, which is a far larger break than the residual it would close.
87
+ Reach for `.phrase`/`.name` only after an `isinstance(..., HTTPStatus)` check if you
88
+ handle edge statuses off a non-raising client.
89
+
90
+ In the default (raising) mode this is largely invisible: a non-IANA status raises
91
+ `errors.UnexpectedStatus` before any `Response` is returned, and
92
+ `UnexpectedStatus.status_code` has always been a plain `int`.
93
+
94
+ ### Documentation
95
+
96
+ - The "Error handling" example in the README now requests `formats=[…MARKDOWN]` explicitly.
97
+ Run literally, its success arm printed `<bytekit.types.Unset object at 0x…>`: the snippet
98
+ built `ScrapeRequest(url=...)` with no `formats`, so the server applied its `raw_html`
99
+ default and `result.formats.markdown` was legitimately unset. The same class of defect
100
+ 0.3.3 fixed in the quick start, in the block directly beneath it. The README's error table
101
+ gains the schema-drift row, a note that `search()` is outside the two-tier contract, and a
102
+ migration note for the keyword-only constructor.
103
+
6
104
  ## 0.3.4
7
105
 
8
106
  ### Breaking
@@ -26,7 +124,33 @@ PyPI distribution: `bytekit-sdk`. Import name: `bytekit`.
26
124
  `create_bulk_body*` / `create_fetch_bulk_body_urls_item_type_1` models — no other generated
27
125
  model is affected.
28
126
 
29
- ## 0.3.3
127
+ - If you are upgrading from 0.3.2 or earlier, note that **0.3.3 also carried a breaking model
128
+ removal** that went undocumented at the time — see the "Breaking" entry under 0.3.3 below
129
+ (`CreateFetchBulkBodyMetadata` and `CreateScrapeBulkBodyItemsItemMetadata`).
130
+
131
+ ## 0.3.3 [NEVER PUBLISHED]
132
+
133
+ > **Never published to PyPI.** This version was cut in-tree but no `bytekit-sdk` 0.3.3 artifact
134
+ > exists — `pip install bytekit-sdk==0.3.3` fails. Everything below shipped to users in **0.3.4**,
135
+ > which is the first published release containing it. Reconciled by issue #2680; the
136
+ > `release-drift` CI gate now blocks a new phantom heading from being introduced.
137
+
138
+ ### Breaking
139
+
140
+ - **`CreateFetchBulkBodyMetadata` and `CreateScrapeBulkBodyItemsItemMetadata` were removed;
141
+ both fields now use the shared `Metadata` model.** This landed with the default-stripping
142
+ traversal fix listed under "Fixed" below (issue #2592) and was not recorded at the time.
143
+ Once server defaults stopped being materialized into the request-direction schemas, the two
144
+ per-body `metadata` objects became structurally identical to the shared `Metadata`
145
+ component, and the code generator emits one model per distinct schema — so
146
+ `bytekit.models.create_fetch_bulk_body_metadata` and
147
+ `bytekit.models.create_scrape_bulk_body_items_item_metadata` no longer exist and importing
148
+ either raises `ModuleNotFoundError`. `CreateFetchBulkBody.metadata` and
149
+ `CreateScrapeBulkBodyItemsItem.metadata` are now typed `Union[Unset, Metadata]`. The wire
150
+ format is **unchanged** — the same JSON object is sent either way — so the migration is
151
+ purely at the import site: `from bytekit.models.metadata import Metadata`, then
152
+ `Metadata(...)` (or `Metadata.from_dict({...})`) wherever you constructed one of the two
153
+ removed classes.
30
154
 
31
155
  ### Security
32
156
 
@@ -125,7 +249,12 @@ PyPI distribution: `bytekit-sdk`. Import name: `bytekit`.
125
249
  real method in the class body that delegates to the same implementation: **runtime behavior,
126
250
  arguments, return type and raised errors are unchanged** — only the static surface is fixed.
127
251
 
128
- ## 0.3.1
252
+ ## 0.3.1 [NEVER PUBLISHED]
253
+
254
+ > **Never published to PyPI.** This version was cut in-tree but no `bytekit-sdk` 0.3.1 artifact
255
+ > exists — `pip install bytekit-sdk==0.3.1` fails. Everything below shipped to users in **0.3.2**,
256
+ > which is the first published release containing it. Reconciled by issue #2680; the
257
+ > `release-drift` CI gate now blocks a new phantom heading from being introduced.
129
258
 
130
259
  ### Fixed
131
260
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bytekit-sdk
3
- Version: 0.3.4
3
+ Version: 0.3.5
4
4
  Summary: Official Python SDK for the ByteKit API
5
5
  Project-URL: Homepage, https://bytekit.com
6
6
  Project-URL: Repository, https://github.com/Hunt-Labs-Inc/ByteKit
@@ -72,13 +72,22 @@ See [Error handling](#error-handling) for what `result` can be when the request
72
72
  ### Error handling
73
73
 
74
74
  The SDK has a **two-tier** error contract. Both tiers are safe: an operation never raises
75
- a bare `json.JSONDecodeError`, even when a server returns an HTML error page.
76
-
77
- | Situation | What you get |
78
- | --------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
79
- | A status the OpenAPI spec **documents** for that operation (e.g. a `422` or `500` on `create_scrape`), with a JSON body | The typed `Error` model is **returned**, not raised. Check with `isinstance(result, Error)` and read `result.error.code` / `result.error.message`. |
80
- | An **undocumented** status, or a **non-JSON body on a documented status** (HTML error page, load-balancer text, empty body) | `errors.UnexpectedStatus` is **raised**, carrying `.status_code` and the raw `.content`. When the body is the documented `Error` envelope, `.code` / `.message` are populated too. |
81
- | Either of the above, with `raise_on_unexpected_status=False` | Nothing is raised; the operation returns `None`. |
75
+ a bare `json.JSONDecodeError` or a bare `KeyError`, even when a server returns an HTML error
76
+ page or a payload whose shape has drifted from the spec.
77
+
78
+ | Situation | What you get |
79
+ | ----------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
80
+ | A status the OpenAPI spec **documents** for that operation (e.g. a `422` or `500` on `create_scrape`), with a JSON body of the documented shape | The typed `Error` model is **returned**, not raised. Check with `isinstance(result, Error)` and read `result.error.code` / `result.error.message`. |
81
+ | An **undocumented** status, or a **non-JSON body on a documented status** (HTML error page, load-balancer text, empty body) | `errors.UnexpectedStatus` is **raised**, carrying `.status_code` and the raw `.content`. When the body is the documented `Error` envelope, `.code` / `.message` are populated too. |
82
+ | A **documented status whose JSON body does not match the documented schema** — a field the server renamed, dropped or retyped | `errors.UnexpectedStatus` is **raised**, same shape as the row above. The underlying parse failure (e.g. `KeyError: 'schema_version'`) is attached as `__cause__` for diagnosis. |
83
+ | Any of the above, with `raise_on_unexpected_status=False` | Nothing is raised; the operation returns `None`. |
84
+
85
+ The table describes the **generated operations** (`create_scrape.sync`, `get_usage.sync`, …),
86
+ whose return types are `Optional[...]` accordingly. The hand-written
87
+ `AuthenticatedClient.search(...)` convenience method is deliberately outside it: it returns a
88
+ non-`Optional` `CreateSearchResponse200` and raises `errors.UnexpectedStatus` on anything else
89
+ — including documented error statuses, and including a malformed `200` — **in both raise
90
+ modes**. `raise_on_unexpected_status` does not apply to it.
82
91
 
83
92
  ```python
84
93
  from bytekit import AuthenticatedClient
@@ -86,12 +95,21 @@ from bytekit.api.scrape import create_scrape
86
95
  from bytekit.errors import UnexpectedStatus
87
96
  from bytekit.models.error import Error
88
97
  from bytekit.models.scrape_request import ScrapeRequest
98
+ from bytekit.models.scrape_request_formats_item import ScrapeRequestFormatsItem
89
99
  from bytekit.models.scrape_success_envelope import ScrapeSuccessEnvelope
90
100
 
91
101
  client = AuthenticatedClient(token="sk_live_your_api_key_here")
92
102
 
93
103
  try:
94
- result = create_scrape.sync(client=client, body=ScrapeRequest(url="https://example.com"))
104
+ result = create_scrape.sync(
105
+ client=client,
106
+ body=ScrapeRequest(
107
+ url="https://example.com",
108
+ # Ask for markdown explicitly — omit `formats` and the server returns raw HTML,
109
+ # leaving `formats.markdown` unset.
110
+ formats=[ScrapeRequestFormatsItem.MARKDOWN],
111
+ ),
112
+ )
95
113
  except UnexpectedStatus as err:
96
114
  # Undocumented status, or a non-JSON body on a documented one. Never a JSONDecodeError.
97
115
  print(f"request failed with status {err.status_code}: {err.code} {err.message}")
@@ -118,6 +136,22 @@ The client ships with production-ready defaults so `AuthenticatedClient(token=..
118
136
 
119
137
  Explicit constructor arguments always win over these defaults (explicit arg > default).
120
138
 
139
+ #### Every constructor argument is keyword-only
140
+
141
+ `AuthenticatedClient` accepts **no positional arguments**. `token`, `base_url`, `prefix`,
142
+ `auth_header_name` and the rest are all passed by name:
143
+
144
+ ```python
145
+ client = AuthenticatedClient(base_url="https://api.bytekit.com", token="sk_live_your_api_key_here")
146
+ ```
147
+
148
+ **Migrating from a pre-0.3.0 positional call.** `base_url` used to be the first positional
149
+ argument, so `AuthenticatedClient("https://…", "sk_live_…")` was a documented call. Once
150
+ `base_url` became a defaulted keyword argument, that same call silently bound the **URL to
151
+ `token`** and the **API key to `prefix`** — producing an `Authorization: sk_live_… https://…`
152
+ header sent to the _default_ host, i.e. a wrong credential against production with nothing
153
+ raised. Since 0.3.5 it raises `TypeError` instead. Add the keywords; nothing else changes.
154
+
121
155
  ## Async usage
122
156
 
123
157
  ```python
@@ -46,13 +46,22 @@ See [Error handling](#error-handling) for what `result` can be when the request
46
46
  ### Error handling
47
47
 
48
48
  The SDK has a **two-tier** error contract. Both tiers are safe: an operation never raises
49
- a bare `json.JSONDecodeError`, even when a server returns an HTML error page.
50
-
51
- | Situation | What you get |
52
- | --------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
53
- | A status the OpenAPI spec **documents** for that operation (e.g. a `422` or `500` on `create_scrape`), with a JSON body | The typed `Error` model is **returned**, not raised. Check with `isinstance(result, Error)` and read `result.error.code` / `result.error.message`. |
54
- | An **undocumented** status, or a **non-JSON body on a documented status** (HTML error page, load-balancer text, empty body) | `errors.UnexpectedStatus` is **raised**, carrying `.status_code` and the raw `.content`. When the body is the documented `Error` envelope, `.code` / `.message` are populated too. |
55
- | Either of the above, with `raise_on_unexpected_status=False` | Nothing is raised; the operation returns `None`. |
49
+ a bare `json.JSONDecodeError` or a bare `KeyError`, even when a server returns an HTML error
50
+ page or a payload whose shape has drifted from the spec.
51
+
52
+ | Situation | What you get |
53
+ | ----------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
54
+ | A status the OpenAPI spec **documents** for that operation (e.g. a `422` or `500` on `create_scrape`), with a JSON body of the documented shape | The typed `Error` model is **returned**, not raised. Check with `isinstance(result, Error)` and read `result.error.code` / `result.error.message`. |
55
+ | An **undocumented** status, or a **non-JSON body on a documented status** (HTML error page, load-balancer text, empty body) | `errors.UnexpectedStatus` is **raised**, carrying `.status_code` and the raw `.content`. When the body is the documented `Error` envelope, `.code` / `.message` are populated too. |
56
+ | A **documented status whose JSON body does not match the documented schema** — a field the server renamed, dropped or retyped | `errors.UnexpectedStatus` is **raised**, same shape as the row above. The underlying parse failure (e.g. `KeyError: 'schema_version'`) is attached as `__cause__` for diagnosis. |
57
+ | Any of the above, with `raise_on_unexpected_status=False` | Nothing is raised; the operation returns `None`. |
58
+
59
+ The table describes the **generated operations** (`create_scrape.sync`, `get_usage.sync`, …),
60
+ whose return types are `Optional[...]` accordingly. The hand-written
61
+ `AuthenticatedClient.search(...)` convenience method is deliberately outside it: it returns a
62
+ non-`Optional` `CreateSearchResponse200` and raises `errors.UnexpectedStatus` on anything else
63
+ — including documented error statuses, and including a malformed `200` — **in both raise
64
+ modes**. `raise_on_unexpected_status` does not apply to it.
56
65
 
57
66
  ```python
58
67
  from bytekit import AuthenticatedClient
@@ -60,12 +69,21 @@ from bytekit.api.scrape import create_scrape
60
69
  from bytekit.errors import UnexpectedStatus
61
70
  from bytekit.models.error import Error
62
71
  from bytekit.models.scrape_request import ScrapeRequest
72
+ from bytekit.models.scrape_request_formats_item import ScrapeRequestFormatsItem
63
73
  from bytekit.models.scrape_success_envelope import ScrapeSuccessEnvelope
64
74
 
65
75
  client = AuthenticatedClient(token="sk_live_your_api_key_here")
66
76
 
67
77
  try:
68
- result = create_scrape.sync(client=client, body=ScrapeRequest(url="https://example.com"))
78
+ result = create_scrape.sync(
79
+ client=client,
80
+ body=ScrapeRequest(
81
+ url="https://example.com",
82
+ # Ask for markdown explicitly — omit `formats` and the server returns raw HTML,
83
+ # leaving `formats.markdown` unset.
84
+ formats=[ScrapeRequestFormatsItem.MARKDOWN],
85
+ ),
86
+ )
69
87
  except UnexpectedStatus as err:
70
88
  # Undocumented status, or a non-JSON body on a documented one. Never a JSONDecodeError.
71
89
  print(f"request failed with status {err.status_code}: {err.code} {err.message}")
@@ -92,6 +110,22 @@ The client ships with production-ready defaults so `AuthenticatedClient(token=..
92
110
 
93
111
  Explicit constructor arguments always win over these defaults (explicit arg > default).
94
112
 
113
+ #### Every constructor argument is keyword-only
114
+
115
+ `AuthenticatedClient` accepts **no positional arguments**. `token`, `base_url`, `prefix`,
116
+ `auth_header_name` and the rest are all passed by name:
117
+
118
+ ```python
119
+ client = AuthenticatedClient(base_url="https://api.bytekit.com", token="sk_live_your_api_key_here")
120
+ ```
121
+
122
+ **Migrating from a pre-0.3.0 positional call.** `base_url` used to be the first positional
123
+ argument, so `AuthenticatedClient("https://…", "sk_live_…")` was a documented call. Once
124
+ `base_url` became a defaulted keyword argument, that same call silently bound the **URL to
125
+ `token`** and the **API key to `prefix`** — producing an `Authorization: sk_live_… https://…`
126
+ header sent to the _default_ host, i.e. a wrong credential against production with nothing
127
+ raised. Since 0.3.5 it raises `TypeError` instead. Add the keywords; nothing else changes.
128
+
95
129
  ## Async usage
96
130
 
97
131
  ```python
@@ -7,7 +7,7 @@
7
7
  # `pip install bytekit-sdk` yields a working `import bytekit`. Mirrors the npm sibling
8
8
  # @hunt-labs/bytekit-sdk.
9
9
  name = "bytekit-sdk"
10
- version = "0.3.4"
10
+ version = "0.3.5"
11
11
  description = "Official Python SDK for the ByteKit API"
12
12
  readme = "README.md"
13
13
  requires-python = ">=3.10"
@@ -1,4 +1,3 @@
1
- from http import HTTPStatus
2
1
  from typing import Any, Optional, Union
3
2
 
4
3
  import httpx
@@ -59,7 +58,7 @@ def _build_response(
59
58
  *, client: Union[AuthenticatedClient, Client], response: httpx.Response
60
59
  ) -> Response[Union[Error, Union["AccountBearerResponse", "AccountSessionResponse"]]]:
61
60
  return Response(
62
- status_code=HTTPStatus(response.status_code),
61
+ status_code=errors.bytekit_status_code(response.status_code), # BYTEKIT-STATUS-COERCE
63
62
  content=response.content,
64
63
  headers=response.headers,
65
64
  parsed=_parse_response(client=client, response=response),
@@ -1,4 +1,3 @@
1
- from http import HTTPStatus
2
1
  from typing import Any, Optional, Union
3
2
 
4
3
  import httpx
@@ -55,7 +54,7 @@ def _build_response(
55
54
  *, client: Union[AuthenticatedClient, Client], response: httpx.Response
56
55
  ) -> Response[Union[CreateBulkResponse202, Error]]:
57
56
  return Response(
58
- status_code=HTTPStatus(response.status_code),
57
+ status_code=errors.bytekit_status_code(response.status_code), # BYTEKIT-STATUS-COERCE
59
58
  content=response.content,
60
59
  headers=response.headers,
61
60
  parsed=_parse_response(client=client, response=response),
@@ -1,4 +1,3 @@
1
- from http import HTTPStatus
2
1
  from typing import Any, Optional, Union
3
2
  from urllib.parse import quote # BYTEKIT-PATH-QUOTE
4
3
 
@@ -43,7 +42,7 @@ def _build_response(
43
42
  *, client: Union[AuthenticatedClient, Client], response: httpx.Response
44
43
  ) -> Response[Union[DeleteBulkResponse200, Error]]:
45
44
  return Response(
46
- status_code=HTTPStatus(response.status_code),
45
+ status_code=errors.bytekit_status_code(response.status_code), # BYTEKIT-STATUS-COERCE
47
46
  content=response.content,
48
47
  headers=response.headers,
49
48
  parsed=_parse_response(client=client, response=response),
@@ -1,4 +1,3 @@
1
- from http import HTTPStatus
2
1
  from typing import Any, Optional, Union
3
2
  from urllib.parse import quote # BYTEKIT-PATH-QUOTE
4
3
 
@@ -43,7 +42,7 @@ def _build_response(
43
42
  *, client: Union[AuthenticatedClient, Client], response: httpx.Response
44
43
  ) -> Response[Union[Error, GetBulkResponse200]]:
45
44
  return Response(
46
- status_code=HTTPStatus(response.status_code),
45
+ status_code=errors.bytekit_status_code(response.status_code), # BYTEKIT-STATUS-COERCE
47
46
  content=response.content,
48
47
  headers=response.headers,
49
48
  parsed=_parse_response(client=client, response=response),
@@ -1,4 +1,3 @@
1
- from http import HTTPStatus
2
1
  from typing import Any, Optional, Union
3
2
  from urllib.parse import quote # BYTEKIT-PATH-QUOTE
4
3
 
@@ -38,7 +37,7 @@ def _build_response(
38
37
  *, client: Union[AuthenticatedClient, Client], response: httpx.Response
39
38
  ) -> Response[ListBulkScreenshotsResponse200]:
40
39
  return Response(
41
- status_code=HTTPStatus(response.status_code),
40
+ status_code=errors.bytekit_status_code(response.status_code), # BYTEKIT-STATUS-COERCE
42
41
  content=response.content,
43
42
  headers=response.headers,
44
43
  parsed=_parse_response(client=client, response=response),
@@ -52,6 +51,18 @@ def sync_detailed(
52
51
  ) -> Response[ListBulkScreenshotsResponse200]:
53
52
  """List bulk job items
54
53
 
54
+ Returns the bulk job's items, discriminated by `type`.
55
+
56
+ **Downloading item artifacts.** `image_url` (`type: screenshot`) and both
57
+ `content_url` and `markdown_url` (`type: scrape`) are **pre-signed** URLs,
58
+ minted fresh on every read of this endpoint and valid for **600 seconds
59
+ (10 minutes)** —
60
+ the same signing lifetime as `content_url` on `GET /v1/fetch/bulk/{id}`.
61
+ The underlying objects are private, so an unsigned URL returns `401`:
62
+ download inside that window, or re-poll this endpoint for a fresh
63
+ signature. Items that are not `completed`, and completed items with no
64
+ stored object, carry `null` or the unsigned stored URL instead.
65
+
55
66
  Args:
56
67
  id (str):
57
68
 
@@ -81,6 +92,18 @@ def sync(
81
92
  ) -> Optional[ListBulkScreenshotsResponse200]:
82
93
  """List bulk job items
83
94
 
95
+ Returns the bulk job's items, discriminated by `type`.
96
+
97
+ **Downloading item artifacts.** `image_url` (`type: screenshot`) and both
98
+ `content_url` and `markdown_url` (`type: scrape`) are **pre-signed** URLs,
99
+ minted fresh on every read of this endpoint and valid for **600 seconds
100
+ (10 minutes)** —
101
+ the same signing lifetime as `content_url` on `GET /v1/fetch/bulk/{id}`.
102
+ The underlying objects are private, so an unsigned URL returns `401`:
103
+ download inside that window, or re-poll this endpoint for a fresh
104
+ signature. Items that are not `completed`, and completed items with no
105
+ stored object, carry `null` or the unsigned stored URL instead.
106
+
84
107
  Args:
85
108
  id (str):
86
109
 
@@ -105,6 +128,18 @@ async def asyncio_detailed(
105
128
  ) -> Response[ListBulkScreenshotsResponse200]:
106
129
  """List bulk job items
107
130
 
131
+ Returns the bulk job's items, discriminated by `type`.
132
+
133
+ **Downloading item artifacts.** `image_url` (`type: screenshot`) and both
134
+ `content_url` and `markdown_url` (`type: scrape`) are **pre-signed** URLs,
135
+ minted fresh on every read of this endpoint and valid for **600 seconds
136
+ (10 minutes)** —
137
+ the same signing lifetime as `content_url` on `GET /v1/fetch/bulk/{id}`.
138
+ The underlying objects are private, so an unsigned URL returns `401`:
139
+ download inside that window, or re-poll this endpoint for a fresh
140
+ signature. Items that are not `completed`, and completed items with no
141
+ stored object, carry `null` or the unsigned stored URL instead.
142
+
108
143
  Args:
109
144
  id (str):
110
145
 
@@ -132,6 +167,18 @@ async def asyncio(
132
167
  ) -> Optional[ListBulkScreenshotsResponse200]:
133
168
  """List bulk job items
134
169
 
170
+ Returns the bulk job's items, discriminated by `type`.
171
+
172
+ **Downloading item artifacts.** `image_url` (`type: screenshot`) and both
173
+ `content_url` and `markdown_url` (`type: scrape`) are **pre-signed** URLs,
174
+ minted fresh on every read of this endpoint and valid for **600 seconds
175
+ (10 minutes)** —
176
+ the same signing lifetime as `content_url` on `GET /v1/fetch/bulk/{id}`.
177
+ The underlying objects are private, so an unsigned URL returns `401`:
178
+ download inside that window, or re-poll this endpoint for a fresh
179
+ signature. Items that are not `completed`, and completed items with no
180
+ stored object, carry `null` or the unsigned stored URL instead.
181
+
135
182
  Args:
136
183
  id (str):
137
184
 
@@ -1,4 +1,3 @@
1
- from http import HTTPStatus
2
1
  from typing import Any, Optional, Union
3
2
 
4
3
  import httpx
@@ -85,7 +84,7 @@ def _build_response(
85
84
  *, client: Union[AuthenticatedClient, Client], response: httpx.Response
86
85
  ) -> Response[Union[Error, str]]:
87
86
  return Response(
88
- status_code=HTTPStatus(response.status_code),
87
+ status_code=errors.bytekit_status_code(response.status_code), # BYTEKIT-STATUS-COERCE
89
88
  content=response.content,
90
89
  headers=response.headers,
91
90
  parsed=_parse_response(client=client, response=response),
@@ -1,4 +1,3 @@
1
- from http import HTTPStatus
2
1
  from typing import Any, Optional, Union
3
2
 
4
3
  import httpx
@@ -61,7 +60,7 @@ def _build_response(
61
60
  *, client: Union[AuthenticatedClient, Client], response: httpx.Response
62
61
  ) -> Response[Union[Error, str]]:
63
62
  return Response(
64
- status_code=HTTPStatus(response.status_code),
63
+ status_code=errors.bytekit_status_code(response.status_code), # BYTEKIT-STATUS-COERCE
65
64
  content=response.content,
66
65
  headers=response.headers,
67
66
  parsed=_parse_response(client=client, response=response),
@@ -1,4 +1,3 @@
1
- from http import HTTPStatus
2
1
  from typing import Any, Optional, Union
3
2
 
4
3
  import httpx
@@ -55,7 +54,7 @@ def _build_response(
55
54
  *, client: Union[AuthenticatedClient, Client], response: httpx.Response
56
55
  ) -> Response[Union[CreateFetchBulkResponse202, Error]]:
57
56
  return Response(
58
- status_code=HTTPStatus(response.status_code),
57
+ status_code=errors.bytekit_status_code(response.status_code), # BYTEKIT-STATUS-COERCE
59
58
  content=response.content,
60
59
  headers=response.headers,
61
60
  parsed=_parse_response(client=client, response=response),
@@ -1,4 +1,3 @@
1
- from http import HTTPStatus
2
1
  from typing import Any, Optional, Union
3
2
  from urllib.parse import quote # BYTEKIT-PATH-QUOTE
4
3
 
@@ -43,7 +42,7 @@ def _build_response(
43
42
  *, client: Union[AuthenticatedClient, Client], response: httpx.Response
44
43
  ) -> Response[Union[Error, GetFetchBulkResponse200]]:
45
44
  return Response(
46
- status_code=HTTPStatus(response.status_code),
45
+ status_code=errors.bytekit_status_code(response.status_code), # BYTEKIT-STATUS-COERCE
47
46
  content=response.content,
48
47
  headers=response.headers,
49
48
  parsed=_parse_response(client=client, response=response),
@@ -57,6 +56,17 @@ def sync_detailed(
57
56
  ) -> Response[Union[Error, GetFetchBulkResponse200]]:
58
57
  """Get fetch bulk job status
59
58
 
59
+ Returns the job envelope plus its per-URL items.
60
+
61
+ **Downloading item content.** Each completed item's `content_url` is a
62
+ **pre-signed** URL, minted fresh on every read of this endpoint and valid
63
+ for **600 seconds (10 minutes)** — the same signing lifetime as the
64
+ `image_url` returned by `GET /v1/bulk/{id}/screenshots`. The underlying
65
+ objects are private, so an unsigned URL returns `401`: download the
66
+ content inside that window, or re-poll this endpoint for a fresh
67
+ signature. Items that are not `completed`, and completed items with no
68
+ stored object, carry `null` or the unsigned stored URL instead.
69
+
60
70
  Args:
61
71
  id (str):
62
72
 
@@ -86,6 +96,17 @@ def sync(
86
96
  ) -> Optional[Union[Error, GetFetchBulkResponse200]]:
87
97
  """Get fetch bulk job status
88
98
 
99
+ Returns the job envelope plus its per-URL items.
100
+
101
+ **Downloading item content.** Each completed item's `content_url` is a
102
+ **pre-signed** URL, minted fresh on every read of this endpoint and valid
103
+ for **600 seconds (10 minutes)** — the same signing lifetime as the
104
+ `image_url` returned by `GET /v1/bulk/{id}/screenshots`. The underlying
105
+ objects are private, so an unsigned URL returns `401`: download the
106
+ content inside that window, or re-poll this endpoint for a fresh
107
+ signature. Items that are not `completed`, and completed items with no
108
+ stored object, carry `null` or the unsigned stored URL instead.
109
+
89
110
  Args:
90
111
  id (str):
91
112
 
@@ -110,6 +131,17 @@ async def asyncio_detailed(
110
131
  ) -> Response[Union[Error, GetFetchBulkResponse200]]:
111
132
  """Get fetch bulk job status
112
133
 
134
+ Returns the job envelope plus its per-URL items.
135
+
136
+ **Downloading item content.** Each completed item's `content_url` is a
137
+ **pre-signed** URL, minted fresh on every read of this endpoint and valid
138
+ for **600 seconds (10 minutes)** — the same signing lifetime as the
139
+ `image_url` returned by `GET /v1/bulk/{id}/screenshots`. The underlying
140
+ objects are private, so an unsigned URL returns `401`: download the
141
+ content inside that window, or re-poll this endpoint for a fresh
142
+ signature. Items that are not `completed`, and completed items with no
143
+ stored object, carry `null` or the unsigned stored URL instead.
144
+
113
145
  Args:
114
146
  id (str):
115
147
 
@@ -137,6 +169,17 @@ async def asyncio(
137
169
  ) -> Optional[Union[Error, GetFetchBulkResponse200]]:
138
170
  """Get fetch bulk job status
139
171
 
172
+ Returns the job envelope plus its per-URL items.
173
+
174
+ **Downloading item content.** Each completed item's `content_url` is a
175
+ **pre-signed** URL, minted fresh on every read of this endpoint and valid
176
+ for **600 seconds (10 minutes)** — the same signing lifetime as the
177
+ `image_url` returned by `GET /v1/bulk/{id}/screenshots`. The underlying
178
+ objects are private, so an unsigned URL returns `401`: download the
179
+ content inside that window, or re-poll this endpoint for a fresh
180
+ signature. Items that are not `completed`, and completed items with no
181
+ stored object, carry `null` or the unsigned stored URL instead.
182
+
140
183
  Args:
141
184
  id (str):
142
185
 
@@ -1,4 +1,3 @@
1
- from http import HTTPStatus
2
1
  from typing import Any, Optional, Union
3
2
 
4
3
  import httpx
@@ -59,7 +58,7 @@ def _build_response(
59
58
  *, client: Union[AuthenticatedClient, Client], response: httpx.Response
60
59
  ) -> Response[Union[Error, MonitorCreateResponse]]:
61
60
  return Response(
62
- status_code=HTTPStatus(response.status_code),
61
+ status_code=errors.bytekit_status_code(response.status_code), # BYTEKIT-STATUS-COERCE
63
62
  content=response.content,
64
63
  headers=response.headers,
65
64
  parsed=_parse_response(client=client, response=response),
@@ -1,4 +1,3 @@
1
- from http import HTTPStatus
2
1
  from typing import Any, Optional, Union, cast
3
2
  from urllib.parse import quote # BYTEKIT-PATH-QUOTE
4
3
 
@@ -41,7 +40,7 @@ def _build_response(
41
40
  *, client: Union[AuthenticatedClient, Client], response: httpx.Response
42
41
  ) -> Response[Union[Any, Error]]:
43
42
  return Response(
44
- status_code=HTTPStatus(response.status_code),
43
+ status_code=errors.bytekit_status_code(response.status_code), # BYTEKIT-STATUS-COERCE
45
44
  content=response.content,
46
45
  headers=response.headers,
47
46
  parsed=_parse_response(client=client, response=response),