apify-client 3.3.1b2__tar.gz → 3.3.1b4__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 (70) hide show
  1. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/CHANGELOG.md +2 -0
  2. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/PKG-INFO +1 -1
  3. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/pyproject.toml +1 -1
  4. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/pyproject.toml.orig +1 -1
  5. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_apify_client.py +14 -2
  6. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_resource_clients/run.py +4 -4
  7. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/http_clients/_base.py +7 -7
  8. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/http_clients/_httpx2.py +2 -2
  9. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/http_clients/_impit.py +2 -2
  10. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/CONTRIBUTING.md +0 -0
  11. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/LICENSE +0 -0
  12. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/README.md +0 -0
  13. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/__init__.py +0 -0
  14. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_client_registry.py +0 -0
  15. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_consts.py +0 -0
  16. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_docs.py +0 -0
  17. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_literals.py +0 -0
  18. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_logging.py +0 -0
  19. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_models.py +0 -0
  20. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_pagination.py +0 -0
  21. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_resource_clients/__init__.py +0 -0
  22. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_resource_clients/_resource_client.py +0 -0
  23. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_resource_clients/actor.py +0 -0
  24. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_resource_clients/actor_collection.py +0 -0
  25. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_resource_clients/actor_env_var.py +0 -0
  26. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_resource_clients/actor_env_var_collection.py +0 -0
  27. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_resource_clients/actor_version.py +0 -0
  28. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_resource_clients/actor_version_collection.py +0 -0
  29. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_resource_clients/build.py +0 -0
  30. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_resource_clients/build_collection.py +0 -0
  31. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_resource_clients/dataset.py +0 -0
  32. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_resource_clients/dataset_collection.py +0 -0
  33. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_resource_clients/key_value_store.py +0 -0
  34. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_resource_clients/key_value_store_collection.py +0 -0
  35. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_resource_clients/log.py +0 -0
  36. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_resource_clients/request_queue.py +0 -0
  37. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_resource_clients/request_queue_collection.py +0 -0
  38. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_resource_clients/run_collection.py +0 -0
  39. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_resource_clients/schedule.py +0 -0
  40. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_resource_clients/schedule_collection.py +0 -0
  41. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_resource_clients/store_collection.py +0 -0
  42. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_resource_clients/task.py +0 -0
  43. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_resource_clients/task_collection.py +0 -0
  44. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_resource_clients/user.py +0 -0
  45. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_resource_clients/webhook.py +0 -0
  46. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_resource_clients/webhook_collection.py +0 -0
  47. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_resource_clients/webhook_dispatch.py +0 -0
  48. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_resource_clients/webhook_dispatch_collection.py +0 -0
  49. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_statistics.py +0 -0
  50. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_status_message_watcher.py +0 -0
  51. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_streamed_log.py +0 -0
  52. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_typeddicts.py +0 -0
  53. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_utils/__init__.py +0 -0
  54. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_utils/crypto.py +0 -0
  55. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_utils/encoding.py +0 -0
  56. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_utils/errors.py +0 -0
  57. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_utils/http.py +0 -0
  58. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_utils/time.py +0 -0
  59. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_utils/try_import.py +0 -0
  60. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/_utils/wait_for_resources.py +0 -0
  61. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/errors.py +0 -0
  62. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/http_clients/__init__.py +0 -0
  63. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/http_clients/_streamed_body.py +0 -0
  64. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/http_compressors/__init__.py +0 -0
  65. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/http_compressors/_base.py +0 -0
  66. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/http_compressors/_brotli.py +0 -0
  67. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/http_compressors/_gzip.py +0 -0
  68. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/http_compressors/_resolve.py +0 -0
  69. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/py.typed +0 -0
  70. {apify_client-3.3.1b2 → apify_client-3.3.1b4}/src/apify_client/types.py +0 -0
@@ -13,6 +13,8 @@ All notable changes to this project will be documented in this file.
13
13
 
14
14
  - Redirect the run log when the first log stream comes back empty ([#1084](https://github.com/apify/apify-client-python/pull/1084)) ([a370e7a](https://github.com/apify/apify-client-python/commit/a370e7a9db75053c2f65ad626ba1bcb67c4cf398)) by [@vdusek](https://github.com/vdusek)
15
15
  - **deps:** Allow impit v0.15 ([#1128](https://github.com/apify/apify-client-python/pull/1128)) ([eb9e188](https://github.com/apify/apify-client-python/commit/eb9e188dfb4cdbae620307c7696b0886ed8a6db3)) by [@vdusek](https://github.com/vdusek)
16
+ - Allow `max_retries=0` to disable retries ([#1142](https://github.com/apify/apify-client-python/pull/1142)) ([3b128d1](https://github.com/apify/apify-client-python/commit/3b128d1f8481fdfe1107d7768b1dff9f9b80b94d)) by [@vdusek](https://github.com/vdusek), closes [#1139](https://github.com/apify/apify-client-python/issues/1139)
17
+ - Fetch the Actor from the API root in `get_streamed_log()` on `last_run()` clients ([#1143](https://github.com/apify/apify-client-python/pull/1143)) ([2b58a2b](https://github.com/apify/apify-client-python/commit/2b58a2ba26a920d1dab22accd4a783effaaabca6)) by [@vdusek](https://github.com/vdusek), closes [#1137](https://github.com/apify/apify-client-python/issues/1137)
16
18
 
17
19
 
18
20
  <!-- git-cliff-unreleased-end -->
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: apify_client
3
- Version: 3.3.1b2
3
+ Version: 3.3.1b4
4
4
  Summary: Apify API client for Python
5
5
  Keywords: apify,api,client,automation,crawling,scraping
6
6
  Author: Apify Technologies s.r.o.
@@ -4,7 +4,7 @@ build-backend = "uv_build"
4
4
 
5
5
  [project]
6
6
  name = "apify_client"
7
- version = "3.3.1b2"
7
+ version = "3.3.1b4"
8
8
  description = "Apify API client for Python"
9
9
  license = "Apache-2.0"
10
10
  license-files = ["LICENSE"]
@@ -4,7 +4,7 @@ build-backend = "uv_build"
4
4
 
5
5
  [project]
6
6
  name = "apify_client"
7
- version = "3.3.1b2"
7
+ version = "3.3.1b4"
8
8
  description = "Apify API client for Python"
9
9
  authors = [{ name = "Apify Technologies s.r.o.", email = "support@apify.com" }]
10
10
  license = "Apache-2.0"
@@ -140,7 +140,7 @@ class ApifyClient:
140
140
  as well.
141
141
  api_public_url: The globally accessible URL of the Apify API server. Should be set only if `api_url`
142
142
  is an internal URL that is not globally accessible. Defaults to https://api.apify.com.
143
- max_retries: How many times to retry a failed request at most.
143
+ max_retries: How many times to retry a failed request at most. Set to 0 to disable retries.
144
144
  min_delay_between_retries: How long will the client wait between retrying requests
145
145
  (increases exponentially from this value).
146
146
  timeout_short: Default timeout for short-duration API operations (simple CRUD operations, ...).
@@ -150,7 +150,13 @@ class ApifyClient:
150
150
  headers: Additional HTTP headers to include in all API requests.
151
151
  compression: Compression algorithm for request bodies. Pass a string literal to select an algorithm,
152
152
  or an `HttpCompressor` instance for finer-grained control.
153
+
154
+ Raises:
155
+ ValueError: If `max_retries` is negative.
153
156
  """
157
+ if max_retries < 0:
158
+ raise ValueError(f'max_retries must be a non-negative integer, got {max_retries}')
159
+
154
160
  # We need to do this because of mocking in tests and default mutable arguments.
155
161
  api_url = DEFAULT_API_URL if api_url is None else api_url
156
162
  api_public_url = DEFAULT_API_URL if api_public_url is None else api_public_url
@@ -504,7 +510,7 @@ class ApifyClientAsync:
504
510
  as well.
505
511
  api_public_url: The globally accessible URL of the Apify API server. Should be set only if `api_url`
506
512
  is an internal URL that is not globally accessible. Defaults to https://api.apify.com.
507
- max_retries: How many times to retry a failed request at most.
513
+ max_retries: How many times to retry a failed request at most. Set to 0 to disable retries.
508
514
  min_delay_between_retries: How long will the client wait between retrying requests
509
515
  (increases exponentially from this value).
510
516
  timeout_short: Default timeout for short-duration API operations (simple CRUD operations, ...).
@@ -514,7 +520,13 @@ class ApifyClientAsync:
514
520
  headers: Additional HTTP headers to include in all API requests.
515
521
  compression: Compression algorithm for request bodies. Pass a string literal to select an algorithm,
516
522
  or an `HttpCompressor` instance for finer-grained control.
523
+
524
+ Raises:
525
+ ValueError: If `max_retries` is negative.
517
526
  """
527
+ if max_retries < 0:
528
+ raise ValueError(f'max_retries must be a non-negative integer, got {max_retries}')
529
+
518
530
  # We need to do this because of mocking in tests and default mutable arguments.
519
531
  api_url = DEFAULT_API_URL if api_url is None else api_url
520
532
  api_public_url = DEFAULT_API_URL if api_public_url is None else api_public_url
@@ -370,7 +370,7 @@ class RunClient(ResourceClient):
370
370
  if actor_id:
371
371
  actor_client = self._client_registry.actor_client(
372
372
  resource_id=actor_id,
373
- base_url=self._base_url,
373
+ base_url=self._api_base_url,
374
374
  public_base_url=self._public_base_url,
375
375
  http_client=self._http_client,
376
376
  client_registry=self._client_registry,
@@ -458,7 +458,7 @@ class RunClient(ResourceClient):
458
458
  if actor_id:
459
459
  actor_client = self._client_registry.actor_client(
460
460
  resource_id=actor_id,
461
- base_url=self._base_url,
461
+ base_url=self._api_base_url,
462
462
  public_base_url=self._public_base_url,
463
463
  http_client=self._http_client,
464
464
  client_registry=self._client_registry,
@@ -920,7 +920,7 @@ class RunClientAsync(ResourceClientAsync):
920
920
  if actor_id:
921
921
  actor_client = self._client_registry.actor_client(
922
922
  resource_id=actor_id,
923
- base_url=self._base_url,
923
+ base_url=self._api_base_url,
924
924
  public_base_url=self._public_base_url,
925
925
  http_client=self._http_client,
926
926
  client_registry=self._client_registry,
@@ -1009,7 +1009,7 @@ class RunClientAsync(ResourceClientAsync):
1009
1009
  if actor_id:
1010
1010
  actor_client = self._client_registry.actor_client(
1011
1011
  resource_id=actor_id,
1012
- base_url=self._base_url,
1012
+ base_url=self._api_base_url,
1013
1013
  public_base_url=self._public_base_url,
1014
1014
  http_client=self._http_client,
1015
1015
  client_registry=self._client_registry,
@@ -136,12 +136,18 @@ class HttpClientBase:
136
136
  timeout_medium: Default timeout for medium-duration API operations (batch operations, listing, ...).
137
137
  timeout_long: Default timeout for long-duration API operations (long-polling, streaming, ...).
138
138
  timeout_max: Maximum timeout cap for any single request attempt, including tier and per-call timeouts.
139
- max_retries: Maximum number of retries for failed requests.
139
+ max_retries: Maximum number of retries for failed requests. Set to 0 to disable retries.
140
140
  min_delay_between_retries: Minimum delay between retries.
141
141
  statistics: Statistics tracker for API calls. Created automatically if not provided.
142
142
  headers: Additional HTTP headers to include in all requests.
143
143
  http_compressor: Compressor used to compress request bodies. Defaults to `GzipHttpCompressor`.
144
+
145
+ Raises:
146
+ ValueError: If `max_retries` is negative.
144
147
  """
148
+ if max_retries < 0:
149
+ raise ValueError(f'max_retries must be a non-negative integer, got {max_retries}')
150
+
145
151
  self._http_compressor = http_compressor if http_compressor is not None else GzipHttpCompressor()
146
152
  self._timeout_short = timeout_short
147
153
  self._timeout_medium = timeout_medium
@@ -598,9 +604,6 @@ class HttpClient(HttpClientBase):
598
604
  random_factor: float = 1,
599
605
  ) -> T:
600
606
  """Retry a function with exponential backoff and jitter."""
601
- if max_retries < 1:
602
- raise ValueError(f'max_retries must be at least 1, got {max_retries}')
603
-
604
607
  random_factor = min(max(0, random_factor), 1)
605
608
  backoff_factor = min(max(1, backoff_factor), 10)
606
609
  swallow = True
@@ -825,9 +828,6 @@ class HttpClientAsync(HttpClientBase):
825
828
  random_factor: float = 1,
826
829
  ) -> T:
827
830
  """Retry an async function with exponential backoff and jitter."""
828
- if max_retries < 1:
829
- raise ValueError(f'max_retries must be at least 1, got {max_retries}')
830
-
831
831
  random_factor = min(max(0, random_factor), 1)
832
832
  backoff_factor = min(max(1, backoff_factor), 10)
833
833
  swallow = True
@@ -75,7 +75,7 @@ class Httpx2HttpClient(HttpClient):
75
75
  timeout_medium: Default timeout for medium-duration API operations (batch operations, listing, ...).
76
76
  timeout_long: Default timeout for long-duration API operations (long-polling, streaming, ...).
77
77
  timeout_max: Maximum timeout cap for any single request attempt, including tier and per-call timeouts.
78
- max_retries: Maximum number of retry attempts for failed requests.
78
+ max_retries: Maximum number of retry attempts for failed requests. Set to 0 to disable retries.
79
79
  min_delay_between_retries: Minimum delay between retries (increases exponentially with each attempt).
80
80
  statistics: Statistics tracker for API calls. Created automatically if not provided.
81
81
  headers: Additional HTTP headers to include in all requests.
@@ -179,7 +179,7 @@ class Httpx2HttpClientAsync(HttpClientAsync):
179
179
  timeout_medium: Default timeout for medium-duration API operations (batch operations, listing, ...).
180
180
  timeout_long: Default timeout for long-duration API operations (long-polling, streaming, ...).
181
181
  timeout_max: Maximum timeout cap for any single request attempt, including tier and per-call timeouts.
182
- max_retries: Maximum number of retry attempts for failed requests.
182
+ max_retries: Maximum number of retry attempts for failed requests. Set to 0 to disable retries.
183
183
  min_delay_between_retries: Minimum delay between retries (increases exponentially with each attempt).
184
184
  statistics: Statistics tracker for API calls. Created automatically if not provided.
185
185
  headers: Additional HTTP headers to include in all requests.
@@ -71,7 +71,7 @@ class ImpitHttpClient(HttpClient):
71
71
  timeout_medium: Default timeout for medium-duration API operations (batch operations, listing, ...).
72
72
  timeout_long: Default timeout for long-duration API operations (long-polling, streaming, ...).
73
73
  timeout_max: Maximum timeout cap for any single request attempt, including tier and per-call timeouts.
74
- max_retries: Maximum number of retry attempts for failed requests.
74
+ max_retries: Maximum number of retry attempts for failed requests. Set to 0 to disable retries.
75
75
  min_delay_between_retries: Minimum delay between retries (increases exponentially with each attempt).
76
76
  statistics: Statistics tracker for API calls. Created automatically if not provided.
77
77
  headers: Additional HTTP headers to include in all requests.
@@ -171,7 +171,7 @@ class ImpitHttpClientAsync(HttpClientAsync):
171
171
  timeout_medium: Default timeout for medium-duration API operations (batch operations, listing, ...).
172
172
  timeout_long: Default timeout for long-duration API operations (long-polling, streaming, ...).
173
173
  timeout_max: Maximum timeout cap for any single request attempt, including tier and per-call timeouts.
174
- max_retries: Maximum number of retry attempts for failed requests.
174
+ max_retries: Maximum number of retry attempts for failed requests. Set to 0 to disable retries.
175
175
  min_delay_between_retries: Minimum delay between retries (increases exponentially with each attempt).
176
176
  statistics: Statistics tracker for API calls. Created automatically if not provided.
177
177
  headers: Additional HTTP headers to include in all requests.
File without changes
File without changes