apify 2.0.1b3__tar.gz → 2.0.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.

Potentially problematic release.


This version of apify might be problematic. Click here for more details.

Files changed (37) hide show
  1. {apify-2.0.1b3 → apify-2.0.1b4}/PKG-INFO +2 -2
  2. {apify-2.0.1b3 → apify-2.0.1b4}/pyproject.toml +2 -2
  3. {apify-2.0.1b3 → apify-2.0.1b4}/src/apify/apify_storage_client/_request_queue_client.py +3 -15
  4. {apify-2.0.1b3 → apify-2.0.1b4}/LICENSE +0 -0
  5. {apify-2.0.1b3 → apify-2.0.1b4}/README.md +0 -0
  6. {apify-2.0.1b3 → apify-2.0.1b4}/src/apify/__init__.py +0 -0
  7. {apify-2.0.1b3 → apify-2.0.1b4}/src/apify/_actor.py +0 -0
  8. {apify-2.0.1b3 → apify-2.0.1b4}/src/apify/_configuration.py +0 -0
  9. {apify-2.0.1b3 → apify-2.0.1b4}/src/apify/_consts.py +0 -0
  10. {apify-2.0.1b3 → apify-2.0.1b4}/src/apify/_crypto.py +0 -0
  11. {apify-2.0.1b3 → apify-2.0.1b4}/src/apify/_models.py +0 -0
  12. {apify-2.0.1b3 → apify-2.0.1b4}/src/apify/_platform_event_manager.py +0 -0
  13. {apify-2.0.1b3 → apify-2.0.1b4}/src/apify/_proxy_configuration.py +0 -0
  14. {apify-2.0.1b3 → apify-2.0.1b4}/src/apify/_utils.py +0 -0
  15. {apify-2.0.1b3 → apify-2.0.1b4}/src/apify/apify_storage_client/__init__.py +0 -0
  16. {apify-2.0.1b3 → apify-2.0.1b4}/src/apify/apify_storage_client/_apify_storage_client.py +0 -0
  17. {apify-2.0.1b3 → apify-2.0.1b4}/src/apify/apify_storage_client/_dataset_client.py +0 -0
  18. {apify-2.0.1b3 → apify-2.0.1b4}/src/apify/apify_storage_client/_dataset_collection_client.py +0 -0
  19. {apify-2.0.1b3 → apify-2.0.1b4}/src/apify/apify_storage_client/_key_value_store_client.py +0 -0
  20. {apify-2.0.1b3 → apify-2.0.1b4}/src/apify/apify_storage_client/_key_value_store_collection_client.py +0 -0
  21. {apify-2.0.1b3 → apify-2.0.1b4}/src/apify/apify_storage_client/_request_queue_collection_client.py +0 -0
  22. {apify-2.0.1b3 → apify-2.0.1b4}/src/apify/apify_storage_client/py.typed +0 -0
  23. {apify-2.0.1b3 → apify-2.0.1b4}/src/apify/log.py +0 -0
  24. {apify-2.0.1b3 → apify-2.0.1b4}/src/apify/py.typed +0 -0
  25. {apify-2.0.1b3 → apify-2.0.1b4}/src/apify/scrapy/__init__.py +0 -0
  26. {apify-2.0.1b3 → apify-2.0.1b4}/src/apify/scrapy/middlewares/__init__.py +0 -0
  27. {apify-2.0.1b3 → apify-2.0.1b4}/src/apify/scrapy/middlewares/apify_proxy.py +0 -0
  28. {apify-2.0.1b3 → apify-2.0.1b4}/src/apify/scrapy/middlewares/py.typed +0 -0
  29. {apify-2.0.1b3 → apify-2.0.1b4}/src/apify/scrapy/pipelines/__init__.py +0 -0
  30. {apify-2.0.1b3 → apify-2.0.1b4}/src/apify/scrapy/pipelines/actor_dataset_push.py +0 -0
  31. {apify-2.0.1b3 → apify-2.0.1b4}/src/apify/scrapy/pipelines/py.typed +0 -0
  32. {apify-2.0.1b3 → apify-2.0.1b4}/src/apify/scrapy/py.typed +0 -0
  33. {apify-2.0.1b3 → apify-2.0.1b4}/src/apify/scrapy/requests.py +0 -0
  34. {apify-2.0.1b3 → apify-2.0.1b4}/src/apify/scrapy/scheduler.py +0 -0
  35. {apify-2.0.1b3 → apify-2.0.1b4}/src/apify/scrapy/utils.py +0 -0
  36. {apify-2.0.1b3 → apify-2.0.1b4}/src/apify/storages/__init__.py +0 -0
  37. {apify-2.0.1b3 → apify-2.0.1b4}/src/apify/storages/py.typed +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: apify
3
- Version: 2.0.1b3
3
+ Version: 2.0.1b4
4
4
  Summary: Apify SDK for Python
5
5
  License: Apache-2.0
6
6
  Keywords: apify,sdk,automation,chrome,crawlee,crawler,headless,scraper,scraping
@@ -18,7 +18,7 @@ Classifier: Programming Language :: Python :: 3.11
18
18
  Classifier: Programming Language :: Python :: 3.12
19
19
  Classifier: Topic :: Software Development :: Libraries
20
20
  Provides-Extra: scrapy
21
- Requires-Dist: apify-client (>=1.7.1)
21
+ Requires-Dist: apify-client (>=1.8.1)
22
22
  Requires-Dist: apify-shared (>=1.1.2)
23
23
  Requires-Dist: crawlee (>=0.3.5)
24
24
  Requires-Dist: cryptography (>=42.0.0)
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
4
4
 
5
5
  [tool.poetry]
6
6
  name = "apify"
7
- version = "2.0.1b3"
7
+ version = "2.0.1b4"
8
8
  description = "Apify SDK for Python"
9
9
  authors = ["Apify Technologies s.r.o. <support@apify.com>"]
10
10
  license = "Apache-2.0"
@@ -46,7 +46,7 @@ keywords = [
46
46
  # https://github.com/apify/apify-sdk-python/pull/154.
47
47
  [tool.poetry.dependencies]
48
48
  python = "^3.9"
49
- apify-client = ">=1.7.1"
49
+ apify-client = ">=1.8.1"
50
50
  apify-shared = ">=1.1.2"
51
51
  crawlee = ">=0.3.5"
52
52
  cryptography = ">=42.0.0"
@@ -2,7 +2,6 @@ from __future__ import annotations
2
2
 
3
3
  from typing import TYPE_CHECKING
4
4
 
5
- from more_itertools import chunked
6
5
  from typing_extensions import override
7
6
 
8
7
  from crawlee import Request
@@ -158,11 +157,8 @@ class RequestQueueClient(BaseRequestQueueClient):
158
157
  *,
159
158
  forefront: bool = False,
160
159
  ) -> BatchRequestsOperationResponse:
161
- processed = []
162
- unprocessed = []
163
-
164
- for chunk in chunked(requests, 25): # The API endpoint won't accept more than 25 requests at once
165
- response = await self._client.batch_add_requests(
160
+ return BatchRequestsOperationResponse.model_validate(
161
+ await self._client.batch_add_requests(
166
162
  requests=[
167
163
  r.model_dump(
168
164
  by_alias=True,
@@ -174,18 +170,10 @@ class RequestQueueClient(BaseRequestQueueClient):
174
170
  'data',
175
171
  },
176
172
  )
177
- for r in chunk
173
+ for r in requests
178
174
  ],
179
175
  forefront=forefront,
180
176
  )
181
- processed.extend(response['processedRequests'])
182
- unprocessed.extend(response['unprocessedRequests'])
183
-
184
- return BatchRequestsOperationResponse.model_validate(
185
- {
186
- 'processedRequests': processed,
187
- 'unprocessedRequests': unprocessed,
188
- }
189
177
  )
190
178
 
191
179
  @override
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes