bytekit-sdk 0.3.4__tar.gz → 0.3.6__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.
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/CHANGELOG.md +143 -2
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/PKG-INFO +43 -9
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/README.md +42 -8
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/pyproject.toml +1 -1
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/api/account/get_account.py +1 -2
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/api/bulk/create_bulk.py +1 -2
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/api/bulk/delete_bulk.py +1 -2
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/api/bulk/get_bulk.py +1 -2
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/api/bulk/list_bulk_screenshots.py +49 -2
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/api/fetch/get_fetch.py +1 -2
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/api/fetch/post_fetch.py +1 -2
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/api/fetch_bulk/create_fetch_bulk.py +1 -2
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/api/fetch_bulk/get_fetch_bulk.py +45 -2
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/api/monitors/create_monitor.py +1 -2
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/api/monitors/delete_monitor.py +1 -2
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/api/monitors/get_monitor.py +1 -2
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/api/monitors/list_monitor_captures.py +1 -2
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/api/monitors/list_monitors.py +1 -2
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/api/monitors/update_monitor.py +1 -2
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/api/scrape/create_scrape.py +1 -2
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/api/scrape/get_scrape.py +1 -2
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/api/scrape_bulk/create_scrape_bulk.py +1 -2
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/api/scrape_bulk/get_scrape_bulk.py +1 -2
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/api/screenshots/create_screenshot.py +28 -13
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/api/screenshots/get_screenshot.py +1 -2
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/api/search/create_search.py +1 -2
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/api/sitemap/create_sitemap.py +1 -2
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/api/sitemap/get_sitemap.py +1 -2
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/api/usage/get_usage.py +1 -2
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/api/usage/get_usage_by_endpoint.py +1 -2
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/api/usage/get_usage_daily.py +1 -2
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/api/webhooks/list_webhook_deliveries.py +1 -2
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/api/webhooks/retry_webhook_delivery.py +1 -2
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/client.py +47 -18
- bytekit_sdk-0.3.6/src/bytekit/errors.py +216 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/get_fetch_bulk_response_200_items_item.py +8 -2
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/get_usage_response_200.py +2 -2
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/get_usage_response_200_plan_type.py +0 -1
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/list_bulk_screenshots_response_200_items_item.py +10 -2
- bytekit_sdk-0.3.4/src/bytekit/errors.py +0 -106
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/.gitignore +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/LICENSE +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/__init__.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/api/__init__.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/api/account/__init__.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/api/bulk/__init__.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/api/fetch/__init__.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/api/fetch_bulk/__init__.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/api/monitors/__init__.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/api/scrape/__init__.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/api/scrape_bulk/__init__.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/api/screenshots/__init__.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/api/search/__init__.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/api/sitemap/__init__.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/api/usage/__init__.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/api/webhooks/__init__.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/__init__.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/account_bearer_response.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/account_bearer_response_api_key.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/account_bearer_response_api_key_environment.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/account_bearer_response_auto_topup.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/account_bearer_response_plan.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/account_bearer_response_subscription.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/account_bearer_response_subscription_plan.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/account_bearer_response_subscription_status.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/account_session_response.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/account_session_response_notifications.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/account_session_response_plan.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/bandwidth_balance.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/capture_response.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/capture_response_outcome.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/clip.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/cookie.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_bulk_body.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_bulk_body_defaults.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_bulk_body_defaults_device.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_bulk_body_defaults_device_scale_factor_type_1.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_bulk_body_defaults_device_scale_factor_type_2_type_1.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_bulk_body_defaults_device_scale_factor_type_3_type_1.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_bulk_body_defaults_formats_item.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_bulk_body_defaults_type.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_bulk_body_defaults_viewport_type_0.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_bulk_body_defaults_wait_until.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_bulk_body_items_item.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_bulk_body_items_item_device.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_bulk_body_items_item_formats_item.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_bulk_body_items_item_scenario.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_bulk_body_items_item_type.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_bulk_body_items_item_viewport_type_0.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_bulk_body_items_item_wait_until.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_bulk_response_202.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_bulk_response_202_status.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_fetch_bulk_body.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_fetch_bulk_body_defaults.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_fetch_bulk_body_defaults_format.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_fetch_bulk_body_urls_item_type_1.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_fetch_bulk_body_urls_item_type_1_format.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_fetch_bulk_response_202.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_fetch_bulk_response_202_status.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_scrape_bulk_body.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_scrape_bulk_body_custom.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_scrape_bulk_body_defaults.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_scrape_bulk_body_defaults_formats_item.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_scrape_bulk_body_defaults_headers.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_scrape_bulk_body_items_item.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_scrape_bulk_body_items_item_custom.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_scrape_bulk_body_items_item_formats_item.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_scrape_bulk_body_items_item_headers.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_scrape_bulk_response_202.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_scrape_bulk_response_202_status.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_search_body.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_search_body_date_range.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_search_body_type.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_search_response_200.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_search_response_200_results_item.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_search_response_200_results_item_image.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_search_response_502.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/create_search_response_502_error.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/credit_balance.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/delete_bulk_response_200.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/delete_bulk_response_200_status.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/error.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/error_error.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/error_status.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/fetch_request.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/fetch_request_cache_ttl_type_1.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/fetch_request_custom.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/fetch_request_format.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/fetch_request_markdown_images.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/fetch_request_markdown_links.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/fetch_request_markdown_mode.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/get_bulk_response_200.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/get_bulk_response_200_status.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/get_fetch_bulk_response_200.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/get_fetch_bulk_response_200_items_item_status.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/get_fetch_bulk_response_200_status.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/get_fetch_cache_ttl_type_1.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/get_fetch_format.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/get_scrape_bulk_response_200.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/get_scrape_bulk_response_200_status.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/get_usage_by_endpoint_response_200.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/get_usage_by_endpoint_response_200_rows_item.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/get_usage_by_endpoint_response_200_rows_item_endpoint.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/get_usage_by_endpoint_response_200_totals.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/get_usage_daily_response_200.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/get_usage_daily_response_200_data_item.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/list_bulk_screenshots_response_200.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/list_bulk_screenshots_response_200_items_item_status.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/list_bulk_screenshots_response_200_items_item_type.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/list_monitor_captures_response_200.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/list_monitors_response_200.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/list_monitors_status.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/list_webhook_deliveries_response_200.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/list_webhook_deliveries_status.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/metadata.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/monitor_create_request.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/monitor_create_request_interval_type.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/monitor_create_request_notify_on.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/monitor_create_request_options.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/monitor_create_request_scrape_options.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/monitor_create_request_type.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/monitor_create_request_webhook_headers.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/monitor_create_response.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/monitor_response.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/monitor_response_interval_type.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/monitor_response_metadata_type_0.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/monitor_response_status.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/monitor_response_type.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/monitor_response_webhook_headers_type_0.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/monitor_update_request.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/monitor_update_request_interval_type.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/monitor_update_request_notify_on.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/monitor_update_request_options.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/monitor_update_request_scrape_options.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/monitor_update_request_status.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/monitor_update_request_webhook_headers.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/scrape_error_envelope.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/scrape_error_envelope_error.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/scrape_error_envelope_error_code.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/scrape_error_envelope_schema_version.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/scrape_error_envelope_status.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/scrape_formats.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/scrape_markdown_tokens.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/scrape_metadata.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/scrape_queued_envelope.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/scrape_queued_envelope_schema_version.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/scrape_queued_envelope_status.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/scrape_request.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/scrape_request_cache_ttl_type_1.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/scrape_request_custom.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/scrape_request_events_item.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/scrape_request_formats_item.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/scrape_request_headers.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/scrape_request_markdown_images.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/scrape_request_markdown_links.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/scrape_request_markdown_mode.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/scrape_request_token_encoding.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/scrape_request_x_internal_scrape_path.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/scrape_scored_image.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/scrape_scored_link.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/scrape_stats.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/scrape_success_envelope.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/scrape_success_envelope_cache.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/scrape_success_envelope_custom.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/scrape_success_envelope_schema_version.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/scrape_success_envelope_status.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/scrape_table.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/scrape_table_kind.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/scrape_warning.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/scrape_warning_code.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/screenshot_request.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/screenshot_request_device.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/screenshot_request_device_scale_factor_type_1.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/screenshot_request_device_scale_factor_type_2_type_1.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/screenshot_request_device_scale_factor_type_3_type_1.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/screenshot_request_format.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/screenshot_request_headers.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/screenshot_request_wait_until.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/screenshot_response.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/screenshot_response_status.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/sitemap_request.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/sitemap_request_process_type_0.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/sitemap_request_process_type_0_options.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/sitemap_request_strategy.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/sitemap_response.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/sitemap_response_cache.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/sitemap_response_metadata_type_0.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/sitemap_response_process_type_0.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/sitemap_response_sources_type_0.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/sitemap_response_status.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/viewport.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/webhook_delivery_response.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/webhook_delivery_response_event_type.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/models/webhook_delivery_response_status.py +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/py.typed +0 -0
- {bytekit_sdk-0.3.4 → bytekit_sdk-0.3.6}/src/bytekit/types.py +0 -0
|
@@ -3,6 +3,116 @@
|
|
|
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.6
|
|
7
|
+
|
|
8
|
+
### Documentation
|
|
9
|
+
|
|
10
|
+
- No README change ships in 0.3.6. The README's Error handling documentation reached PyPI
|
|
11
|
+
inside the published 0.3.5 artifact (2026-08-10 publish rescue) and stays documented under
|
|
12
|
+
the 0.3.5 heading, which is the version whose wheel actually carries it.
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- Version-alignment release after the 2026-08-10 publish rescue: the published 0.3.5 artifact was built from the `main` promotion HEAD, which already contained every change documented under the 0.3.5 heading — but that commit postdates the one that introduced the 0.3.5 version string, so the `check-release-drift` gate (#2680) correctly reported shipped drift on every subsequent CI run (#2829). 0.3.6 realigns manifest ↔ registry ↔ version-introducing commit. **No consumer-visible change relative to the published 0.3.5.**
|
|
17
|
+
|
|
18
|
+
## 0.3.5
|
|
19
|
+
|
|
20
|
+
### Breaking
|
|
21
|
+
|
|
22
|
+
- **`AuthenticatedClient` takes no positional arguments.** `token`, `prefix` and
|
|
23
|
+
`auth_header_name` are now keyword-only, joining `base_url`, `timeout`,
|
|
24
|
+
`raise_on_unexpected_status` and the rest — so `AuthenticatedClient(...)` accepts keywords
|
|
25
|
+
only. Before 0.3.0 the first positional argument was `base_url`, which made
|
|
26
|
+
`AuthenticatedClient("https://api-stg.bytekit.com", "sk_live_…")` a documented call. When
|
|
27
|
+
0.3.0 made `base_url` a defaulted keyword argument, that call stopped meaning what it said
|
|
28
|
+
and started **binding the URL to `token` and the API key to `prefix`** — sending
|
|
29
|
+
`Authorization: sk_live_… https://api-stg.bytekit.com` to the _default_ host,
|
|
30
|
+
`https://api.bytekit.com`, with nothing raised and nothing warned. It now raises
|
|
31
|
+
`TypeError`. Migration is mechanical:
|
|
32
|
+
`AuthenticatedClient(base_url="https://api-stg.bytekit.com", token="sk_live_…")`. Keyword
|
|
33
|
+
construction — the form the README, the docs site and every example already use — is
|
|
34
|
+
entirely unchanged, including `prefix=`/`auth_header_name=` overrides and the
|
|
35
|
+
`with_headers`/`with_cookies`/`with_timeout` helpers. The unauthenticated `Client` was
|
|
36
|
+
already keyword-only and is unaffected.
|
|
37
|
+
|
|
38
|
+
### Fixed
|
|
39
|
+
|
|
40
|
+
- **A schema-drifted response body no longer crashes with a bare `KeyError`.** A generated
|
|
41
|
+
model's `from_dict` trusts the `required` keys the OpenAPI spec declared when the client
|
|
42
|
+
was generated, so a server that renamed, dropped or retyped a field leaked the generator's
|
|
43
|
+
own internal exception straight to the caller — `KeyError: 'schema_version'` from
|
|
44
|
+
`create_scrape`, `KeyError: 'period_start'` from `get_usage`, `KeyError: 'data'` from
|
|
45
|
+
`list_monitors`, plus `TypeError`/`ValueError` for non-object and nested-drift bodies. It
|
|
46
|
+
happened on a **documented** status (a `200`/`202`), in **both** raise modes, and no row of
|
|
47
|
+
the documented error table covered it, so a caller who handled that table faithfully still
|
|
48
|
+
had no branch for it. Schema drift now takes exactly the same two arms as a non-JSON body:
|
|
49
|
+
`errors.UnexpectedStatus` (carrying `.status_code` and the raw `.content`, with the
|
|
50
|
+
original parse failure attached as `__cause__`) in the default mode, and `None` under
|
|
51
|
+
`raise_on_unexpected_status=False`. Deliberately **no new exception type** — a new class
|
|
52
|
+
would be one every existing `except errors.UnexpectedStatus` silently fails to catch, i.e.
|
|
53
|
+
the same untyped crash in a different costume. Bodies that match the documented schema
|
|
54
|
+
parse exactly as before, and a genuinely optional key that is absent still yields `UNSET`.
|
|
55
|
+
- **`client.search()` never returns a silent `None`.** Its 200 body is parsed through the
|
|
56
|
+
same shared guard the generated operations use, which honors
|
|
57
|
+
`raise_on_unexpected_status` — so an opt-out client got `None` handed back from a non-JSON
|
|
58
|
+
200 or a schema-drifted one, contradicting both the method's non-`Optional` return
|
|
59
|
+
annotation and its own docstring. `search()` now raises `errors.UnexpectedStatus` in
|
|
60
|
+
**both** raise modes. `raise_on_unexpected_status` configures the generated two-tier
|
|
61
|
+
contract, whose signatures are `Optional[...]`; `search()` was never part of it — it
|
|
62
|
+
already raises on documented error statuses that the generated `create_search` returns as
|
|
63
|
+
a typed `Error` model. A well-formed 200 still returns the parsed
|
|
64
|
+
`CreateSearchResponse200` in either mode.
|
|
65
|
+
- **A non-IANA HTTP status no longer crashes every operation with a bare `ValueError`.**
|
|
66
|
+
Each generated operation built its `Response` with
|
|
67
|
+
`status_code=HTTPStatus(response.status_code)` evaluated _before_ the response was
|
|
68
|
+
parsed, so any status outside Python's `http.HTTPStatus` — Cloudflare's `520`–`530`
|
|
69
|
+
family, nginx's `499` — raised `ValueError: 520 is not a valid HTTPStatus` from inside
|
|
70
|
+
the SDK. This happened in **both** raise modes: the default
|
|
71
|
+
`raise_on_unexpected_status=True` never got to raise its `errors.UnexpectedStatus`, and
|
|
72
|
+
`raise_on_unexpected_status=False`, which promises `None`, raised the `ValueError` too.
|
|
73
|
+
`api.bytekit.com` is served through Cloudflare, so this was exactly the edge/CDN failure
|
|
74
|
+
class the typed-error contract exists for. All 29 operations now behave as documented:
|
|
75
|
+
`errors.UnexpectedStatus` (carrying `.status_code` and the raw `.content`) in the default
|
|
76
|
+
mode, a `Response` with `.parsed is None` in the opt-out mode. The hand-written
|
|
77
|
+
`client.search()` wrapper was never affected and is unchanged.
|
|
78
|
+
|
|
79
|
+
### Changed
|
|
80
|
+
|
|
81
|
+
- **`Response.status_code` is a plain `int` for a status `http.HTTPStatus` does not know.**
|
|
82
|
+
This is the contract decision behind the fix above, recorded here because it is the one
|
|
83
|
+
observable difference in the typed surface. Concretely:
|
|
84
|
+
- Every status the stdlib enum **does** know — documented by the API or not, `200` as
|
|
85
|
+
much as `503` — still comes back as a real `http.HTTPStatus` member, so
|
|
86
|
+
`response.status_code.phrase`, `.name`, and identity comparisons such as
|
|
87
|
+
`response.status_code is HTTPStatus.OK` keep working exactly as before.
|
|
88
|
+
- A status the enum does **not** know (`499`, `520`, `521`, `522`, `530`, …) comes back
|
|
89
|
+
as the plain `int` the wire carried. `int` comparisons (`response.status_code == 520`,
|
|
90
|
+
`>= 500`) work; enum-only attributes (`.phrase`, `.name`) do not exist on it. The
|
|
91
|
+
alternatives were rejected deliberately: a synthetic `IntEnum` member would invent a
|
|
92
|
+
`.phrase`/`.name` no registry backs, and raising before the `Response` is constructed
|
|
93
|
+
is the bug itself — it is precisely what `raise_on_unexpected_status=False` promises
|
|
94
|
+
not to do.
|
|
95
|
+
- The **declared** annotation on `Response.status_code` is unchanged (`HTTPStatus`), so
|
|
96
|
+
this release adds no type errors to existing consumer code; widening it to
|
|
97
|
+
`Union[HTTPStatus, int]` would make `.phrase`/`.name` a type error on _every_ response,
|
|
98
|
+
including the IANA ones, which is a far larger break than the residual it would close.
|
|
99
|
+
Reach for `.phrase`/`.name` only after an `isinstance(..., HTTPStatus)` check if you
|
|
100
|
+
handle edge statuses off a non-raising client.
|
|
101
|
+
|
|
102
|
+
In the default (raising) mode this is largely invisible: a non-IANA status raises
|
|
103
|
+
`errors.UnexpectedStatus` before any `Response` is returned, and
|
|
104
|
+
`UnexpectedStatus.status_code` has always been a plain `int`.
|
|
105
|
+
|
|
106
|
+
### Documentation
|
|
107
|
+
|
|
108
|
+
- The "Error handling" example in the README now requests `formats=[…MARKDOWN]` explicitly.
|
|
109
|
+
Run literally, its success arm printed `<bytekit.types.Unset object at 0x…>`: the snippet
|
|
110
|
+
built `ScrapeRequest(url=...)` with no `formats`, so the server applied its `raw_html`
|
|
111
|
+
default and `result.formats.markdown` was legitimately unset. The same class of defect
|
|
112
|
+
0.3.3 fixed in the quick start, in the block directly beneath it. The README's error table
|
|
113
|
+
gains the schema-drift row, a note that `search()` is outside the two-tier contract, and a
|
|
114
|
+
migration note for the keyword-only constructor.
|
|
115
|
+
|
|
6
116
|
## 0.3.4
|
|
7
117
|
|
|
8
118
|
### Breaking
|
|
@@ -26,7 +136,33 @@ PyPI distribution: `bytekit-sdk`. Import name: `bytekit`.
|
|
|
26
136
|
`create_bulk_body*` / `create_fetch_bulk_body_urls_item_type_1` models — no other generated
|
|
27
137
|
model is affected.
|
|
28
138
|
|
|
29
|
-
|
|
139
|
+
- If you are upgrading from 0.3.2 or earlier, note that **0.3.3 also carried a breaking model
|
|
140
|
+
removal** that went undocumented at the time — see the "Breaking" entry under 0.3.3 below
|
|
141
|
+
(`CreateFetchBulkBodyMetadata` and `CreateScrapeBulkBodyItemsItemMetadata`).
|
|
142
|
+
|
|
143
|
+
## 0.3.3 [NEVER PUBLISHED]
|
|
144
|
+
|
|
145
|
+
> **Never published to PyPI.** This version was cut in-tree but no `bytekit-sdk` 0.3.3 artifact
|
|
146
|
+
> exists — `pip install bytekit-sdk==0.3.3` fails. Everything below shipped to users in **0.3.4**,
|
|
147
|
+
> which is the first published release containing it. Reconciled by issue #2680; the
|
|
148
|
+
> `release-drift` CI gate now blocks a new phantom heading from being introduced.
|
|
149
|
+
|
|
150
|
+
### Breaking
|
|
151
|
+
|
|
152
|
+
- **`CreateFetchBulkBodyMetadata` and `CreateScrapeBulkBodyItemsItemMetadata` were removed;
|
|
153
|
+
both fields now use the shared `Metadata` model.** This landed with the default-stripping
|
|
154
|
+
traversal fix listed under "Fixed" below (issue #2592) and was not recorded at the time.
|
|
155
|
+
Once server defaults stopped being materialized into the request-direction schemas, the two
|
|
156
|
+
per-body `metadata` objects became structurally identical to the shared `Metadata`
|
|
157
|
+
component, and the code generator emits one model per distinct schema — so
|
|
158
|
+
`bytekit.models.create_fetch_bulk_body_metadata` and
|
|
159
|
+
`bytekit.models.create_scrape_bulk_body_items_item_metadata` no longer exist and importing
|
|
160
|
+
either raises `ModuleNotFoundError`. `CreateFetchBulkBody.metadata` and
|
|
161
|
+
`CreateScrapeBulkBodyItemsItem.metadata` are now typed `Union[Unset, Metadata]`. The wire
|
|
162
|
+
format is **unchanged** — the same JSON object is sent either way — so the migration is
|
|
163
|
+
purely at the import site: `from bytekit.models.metadata import Metadata`, then
|
|
164
|
+
`Metadata(...)` (or `Metadata.from_dict({...})`) wherever you constructed one of the two
|
|
165
|
+
removed classes.
|
|
30
166
|
|
|
31
167
|
### Security
|
|
32
168
|
|
|
@@ -125,7 +261,12 @@ PyPI distribution: `bytekit-sdk`. Import name: `bytekit`.
|
|
|
125
261
|
real method in the class body that delegates to the same implementation: **runtime behavior,
|
|
126
262
|
arguments, return type and raised errors are unchanged** — only the static surface is fixed.
|
|
127
263
|
|
|
128
|
-
## 0.3.1
|
|
264
|
+
## 0.3.1 [NEVER PUBLISHED]
|
|
265
|
+
|
|
266
|
+
> **Never published to PyPI.** This version was cut in-tree but no `bytekit-sdk` 0.3.1 artifact
|
|
267
|
+
> exists — `pip install bytekit-sdk==0.3.1` fails. Everything below shipped to users in **0.3.2**,
|
|
268
|
+
> which is the first published release containing it. Reconciled by issue #2680; the
|
|
269
|
+
> `release-drift` CI gate now blocks a new phantom heading from being introduced.
|
|
129
270
|
|
|
130
271
|
### Fixed
|
|
131
272
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: bytekit-sdk
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.6
|
|
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
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
|
79
|
-
|
|
|
80
|
-
|
|
|
81
|
-
|
|
|
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(
|
|
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
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
|
53
|
-
|
|
|
54
|
-
|
|
|
55
|
-
|
|
|
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(
|
|
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.
|
|
10
|
+
version = "0.3.6"
|
|
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=
|
|
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=
|
|
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=
|
|
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=
|
|
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=
|
|
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=
|
|
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=
|
|
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=
|
|
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=
|
|
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=
|
|
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=
|
|
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),
|