apify-client 3.5.0__tar.gz → 3.5.1b2__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 (72) hide show
  1. {apify_client-3.5.0 → apify_client-3.5.1b2}/CHANGELOG.md +10 -0
  2. {apify_client-3.5.0 → apify_client-3.5.1b2}/PKG-INFO +1 -1
  3. {apify_client-3.5.0 → apify_client-3.5.1b2}/pyproject.toml +2 -2
  4. {apify_client-3.5.0 → apify_client-3.5.1b2}/pyproject.toml.orig +2 -2
  5. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_models.py +4 -4
  6. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_resource_clients/_resource_client.py +6 -30
  7. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_resource_clients/actor_version.py +4 -4
  8. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_resource_clients/key_value_store.py +7 -3
  9. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_resource_clients/schedule.py +2 -2
  10. {apify_client-3.5.0 → apify_client-3.5.1b2}/CONTRIBUTING.md +0 -0
  11. {apify_client-3.5.0 → apify_client-3.5.1b2}/LICENSE +0 -0
  12. {apify_client-3.5.0 → apify_client-3.5.1b2}/README.md +0 -0
  13. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/__init__.py +0 -0
  14. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_apify_client.py +0 -0
  15. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_client_registry.py +0 -0
  16. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_consts.py +0 -0
  17. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_docs.py +0 -0
  18. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_literals.py +0 -0
  19. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_logging.py +0 -0
  20. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_pagination.py +0 -0
  21. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_resource_clients/__init__.py +0 -0
  22. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_resource_clients/actor.py +0 -0
  23. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_resource_clients/actor_collection.py +0 -0
  24. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_resource_clients/actor_env_var.py +0 -0
  25. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_resource_clients/actor_env_var_collection.py +0 -0
  26. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_resource_clients/actor_server.py +0 -0
  27. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_resource_clients/actor_version_collection.py +0 -0
  28. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_resource_clients/build.py +0 -0
  29. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_resource_clients/build_collection.py +0 -0
  30. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_resource_clients/dataset.py +0 -0
  31. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_resource_clients/dataset_collection.py +0 -0
  32. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_resource_clients/key_value_store_collection.py +0 -0
  33. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_resource_clients/log.py +0 -0
  34. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_resource_clients/request_queue.py +0 -0
  35. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_resource_clients/request_queue_collection.py +0 -0
  36. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_resource_clients/run.py +0 -0
  37. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_resource_clients/run_collection.py +0 -0
  38. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_resource_clients/schedule_collection.py +0 -0
  39. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_resource_clients/store_collection.py +0 -0
  40. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_resource_clients/task.py +0 -0
  41. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_resource_clients/task_collection.py +0 -0
  42. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_resource_clients/user.py +0 -0
  43. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_resource_clients/webhook.py +0 -0
  44. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_resource_clients/webhook_collection.py +0 -0
  45. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_resource_clients/webhook_dispatch.py +0 -0
  46. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_resource_clients/webhook_dispatch_collection.py +0 -0
  47. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_statistics.py +0 -0
  48. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_status_message_watcher.py +0 -0
  49. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_streamed_log.py +0 -0
  50. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_typeddicts.py +0 -0
  51. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_utils/__init__.py +0 -0
  52. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_utils/crypto.py +0 -0
  53. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_utils/encoding.py +0 -0
  54. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_utils/errors.py +0 -0
  55. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_utils/http.py +0 -0
  56. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_utils/server_args.py +0 -0
  57. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_utils/time.py +0 -0
  58. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_utils/try_import.py +0 -0
  59. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/_utils/wait_for_resources.py +0 -0
  60. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/errors.py +0 -0
  61. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/http_clients/__init__.py +0 -0
  62. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/http_clients/_base.py +0 -0
  63. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/http_clients/_httpx2.py +0 -0
  64. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/http_clients/_impit.py +0 -0
  65. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/http_clients/_streamed_body.py +0 -0
  66. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/http_compressors/__init__.py +0 -0
  67. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/http_compressors/_base.py +0 -0
  68. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/http_compressors/_brotli.py +0 -0
  69. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/http_compressors/_gzip.py +0 -0
  70. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/http_compressors/_resolve.py +0 -0
  71. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/py.typed +0 -0
  72. {apify_client-3.5.0 → apify_client-3.5.1b2}/src/apify_client/types.py +0 -0
@@ -2,6 +2,16 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ <!-- git-cliff-unreleased-start -->
6
+ ## 3.5.1 - **not yet released**
7
+
8
+ ### 🐛 Bug Fixes
9
+
10
+ - Return JSON lines records as text in `get_record()` ([#1215](https://github.com/apify/apify-client-python/pull/1215)) ([eb8ded4](https://github.com/apify/apify-client-python/commit/eb8ded40d74d333de0187616a9c382c65af866ba)) by [@dheerajitbhu](https://github.com/dheerajitbhu), closes [#1140](https://github.com/apify/apify-client-python/issues/1140)
11
+ - Allow removing Actor build tags and clearing lists in `update()` ([#1221](https://github.com/apify/apify-client-python/pull/1221)) ([6f7375b](https://github.com/apify/apify-client-python/commit/6f7375bc2336bd55b8158ba5848abe2240c6a121)) by [@dheerajitbhu](https://github.com/dheerajitbhu), closes [#1136](https://github.com/apify/apify-client-python/issues/1136)
12
+
13
+
14
+ <!-- git-cliff-unreleased-end -->
5
15
  ## [3.5.0](https://github.com/apify/apify-client-python/releases/tag/v3.5.0) (2026-11-09)
6
16
 
7
17
  ### 🚀 Features
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: apify_client
3
- Version: 3.5.0
3
+ Version: 3.5.1b2
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.5.0"
7
+ version = "3.5.1b2"
8
8
  description = "Apify API client for Python"
9
9
  license = "Apache-2.0"
10
10
  license-files = ["LICENSE"]
@@ -249,7 +249,7 @@ disable_timestamp = true
249
249
  keep_model_order = true
250
250
 
251
251
  [tool.apify.openapi-spec]
252
- version = "v2-2026-11-04T151257Z"
252
+ version = "v2-2026-11-09T143926Z"
253
253
 
254
254
  [tool.uv]
255
255
  exclude-newer = "24 hours"
@@ -4,7 +4,7 @@ build-backend = "uv_build"
4
4
 
5
5
  [project]
6
6
  name = "apify_client"
7
- version = "3.5.0"
7
+ version = "3.5.1b2"
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"
@@ -251,7 +251,7 @@ keep_model_order = true
251
251
  # workflow committing nothing unless the models changed. A local regeneration that only moves this line is that
252
252
  # same case - drop it rather than committing it alone.
253
253
  [tool.apify.openapi-spec]
254
- version = "v2-2026-11-04T151257Z"
254
+ version = "v2-2026-11-09T143926Z"
255
255
 
256
256
  [tool.uv]
257
257
  # Minimal defense against supply-chain atatcks.
@@ -909,7 +909,7 @@ class ChargeRunRequest(BaseModel):
909
909
  count: Annotated[int, Field(examples=[1])]
910
910
  request_id: Annotated[str | None, Field(examples=['7Hs2kQw9LxP4mN1vB'])] = None
911
911
  """
912
- ID of the Server Actor request being charged, from the `X-Actor-Request-ID` header of the incoming request. Required for multi-tenant Server Actor runs, where it identifies the request the charge belongs to.
912
+ ID of the Server Actor request being charged, from the `X-Actor-Request-ID` header of the incoming request. Required for multi-tenant Server Actor runs, where it identifies the request the charge belongs to. Runs of single-tenant Server Actors ignore it.
913
913
  """
914
914
 
915
915
 
@@ -987,7 +987,7 @@ class CreateActorRequest(BaseModel):
987
987
  default_run_options: DefaultRunOptions | None = None
988
988
  actor_standby: ActorStandby | None = None
989
989
  """
990
- The configuration of the Actor's standby mode. For details, see [Standby mode](https://docs.apify.com/platform/actors/development/programming-interface/standby).
990
+ The configuration of the Actor's standby mode. For details, see [Develop Server Actors](https://docs.apify.com/platform/actors/development/programming-interface/server-actors).
991
991
  """
992
992
  example_run_input: ExampleRunInput | None = None
993
993
  """
@@ -3593,7 +3593,7 @@ class Run(BaseModel):
3593
3593
  """
3594
3594
  usage_usd: RunUsageUsd | None = None
3595
3595
  """
3596
- Platform usage costs breakdown in USD. Only present if you own the run and are paying for platform usage (pay-per-usage or pay-per-event with usage costs like Standby Actors). Not available for standard pay-per-event Actors. Requires authentication token to access.
3596
+ Platform usage costs breakdown in USD. Only present if you own the run and are paying for platform usage (pay per usage, or pay per event with usage costs, such as runs of single-tenant Server Actors). Not available for standard pay-per-event Actors. Requires authentication token to access.
3597
3597
  """
3598
3598
  metamorphs: list[RunMetamorphEvent] | None = None
3599
3599
  """
@@ -4570,7 +4570,7 @@ class UpdateActorRequest(BaseModel):
4570
4570
  """
4571
4571
  actor_standby: ActorStandby | None = None
4572
4572
  """
4573
- The configuration of the Actor's standby mode. For details, see [Standby mode](https://docs.apify.com/platform/actors/development/programming-interface/standby).
4573
+ The configuration of the Actor's standby mode. For details, see [Develop Server Actors](https://docs.apify.com/platform/actors/development/programming-interface/server-actors).
4574
4574
  """
4575
4575
  example_run_input: ExampleRunInput | None = None
4576
4576
  """
@@ -153,38 +153,14 @@ class ResourceClientBase(metaclass=WithLogDetailsClient):
153
153
 
154
154
  @staticmethod
155
155
  def _clean_json_payload(data: dict) -> dict:
156
- """Remove None values and empty nested dicts from an API request payload.
156
+ """Remove unset top-level fields from an API request payload.
157
157
 
158
- The Apify API ignores missing fields but may reject fields explicitly set to None.
159
- Nested sub-models serialized by Pydantic may produce empty dicts when all their
160
- fields are None - these are also removed.
161
-
162
- Uses an iterative stack-based approach, analogous to _build_params for query params.
158
+ A top-level `None` means the caller did not pass the argument, so the field is left out. A top-level empty dict
159
+ is a sub-model dumped with `exclude_none=True` whose fields are all unset, so it is left out too. Nested values
160
+ the caller passed are sent as given, so for example `tagged_builds={'beta': None}` sends
161
+ `{"taggedBuilds": {"beta": null}}` and removes the tag.
163
162
  """
164
- result: dict = {}
165
- stack: list[tuple[dict, dict]] = [(data, result)]
166
-
167
- while stack:
168
- source, target = stack.pop()
169
- for key, val in source.items():
170
- if val is None:
171
- continue
172
- if isinstance(val, dict):
173
- nested: dict = {}
174
- target[key] = nested
175
- stack.append((val, nested))
176
- else:
177
- target[key] = val
178
-
179
- # Remove dicts that became empty after None filtering
180
- def _remove_empty(d: dict) -> None:
181
- for key in [k for k, v in d.items() if isinstance(v, dict)]:
182
- _remove_empty(d[key])
183
- if not d[key]:
184
- del d[key]
185
-
186
- _remove_empty(result)
187
- return result
163
+ return {key: val for key, val in data.items() if val is not None and val != {}}
188
164
 
189
165
 
190
166
  @docs_group('Resource clients')
@@ -111,10 +111,10 @@ class ActorVersionClient(ResourceClient):
111
111
  """
112
112
  version_fields = UpdateVersionRequest(
113
113
  build_tag=build_tag,
114
- env_vars=[EnvVarRequest.model_validate(v) for v in env_vars] if env_vars else None,
114
+ env_vars=[EnvVarRequest.model_validate(v) for v in env_vars] if env_vars is not None else None,
115
115
  apply_env_vars_to_build=apply_env_vars_to_build,
116
116
  source_type=source_type,
117
- source_files=_source_file_list_adapter.validate_python(source_files) if source_files else None,
117
+ source_files=_source_file_list_adapter.validate_python(source_files) if source_files is not None else None,
118
118
  git_repo_url=git_repo_url,
119
119
  tarball_url=tarball_url,
120
120
  github_gist_url=github_gist_url,
@@ -235,10 +235,10 @@ class ActorVersionClientAsync(ResourceClientAsync):
235
235
  """
236
236
  version_fields = UpdateVersionRequest(
237
237
  build_tag=build_tag,
238
- env_vars=[EnvVarRequest.model_validate(v) for v in env_vars] if env_vars else None,
238
+ env_vars=[EnvVarRequest.model_validate(v) for v in env_vars] if env_vars is not None else None,
239
239
  apply_env_vars_to_build=apply_env_vars_to_build,
240
240
  source_type=source_type,
241
- source_files=_source_file_list_adapter.validate_python(source_files) if source_files else None,
241
+ source_files=_source_file_list_adapter.validate_python(source_files) if source_files is not None else None,
242
242
  git_repo_url=git_repo_url,
243
243
  tarball_url=tarball_url,
244
244
  github_gist_url=github_gist_url,
@@ -50,10 +50,14 @@ def _parse_get_record_response(response: HttpResponse) -> Any:
50
50
  content_type = response.headers['content-type'].split(';')[0].strip()
51
51
 
52
52
  try:
53
- if re.search(r'^application/json', content_type, flags=re.IGNORECASE):
53
+ if re.search(r'^application/json(?:$|.*\+json$)', content_type, flags=re.IGNORECASE):
54
54
  response_data = response.json()
55
- elif re.search(r'^application/.*xml$', content_type, flags=re.IGNORECASE) or re.search(
56
- r'^text/', content_type, flags=re.IGNORECASE
55
+ elif (
56
+ # Other `application/json*` types, such as `application/jsonl` or `application/json-seq`, are not a
57
+ # single JSON document, so they are returned as text.
58
+ re.search(r'^application/json', content_type, flags=re.IGNORECASE)
59
+ or re.search(r'^application/.*xml$', content_type, flags=re.IGNORECASE)
60
+ or re.search(r'^text/', content_type, flags=re.IGNORECASE)
57
61
  ):
58
62
  response_data = response.text
59
63
  else:
@@ -95,7 +95,7 @@ class ScheduleClient(ResourceClient):
95
95
  is_enabled=is_enabled,
96
96
  is_exclusive=is_exclusive,
97
97
  name=name,
98
- actions=actions or None,
98
+ actions=actions,
99
99
  description=description,
100
100
  timezone=timezone,
101
101
  title=title,
@@ -215,7 +215,7 @@ class ScheduleClientAsync(ResourceClientAsync):
215
215
  is_enabled=is_enabled,
216
216
  is_exclusive=is_exclusive,
217
217
  name=name,
218
- actions=actions or None,
218
+ actions=actions,
219
219
  description=description,
220
220
  timezone=timezone,
221
221
  title=title,
File without changes
File without changes