apify-client 3.0.1b2__tar.gz → 3.0.2__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.
- {apify_client-3.0.1b2 → apify_client-3.0.2}/CHANGELOG.md +11 -3
- {apify_client-3.0.1b2 → apify_client-3.0.2}/PKG-INFO +1 -1
- {apify_client-3.0.1b2 → apify_client-3.0.2}/pyproject.toml +1 -1
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_literals.py +2 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_models.py +265 -13
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_streamed_log.py +21 -16
- {apify_client-3.0.1b2 → apify_client-3.0.2}/.gitignore +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/CONTRIBUTING.md +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/LICENSE +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/README.md +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/__init__.py +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_apify_client.py +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_client_registry.py +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_consts.py +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_docs.py +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_logging.py +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_pagination.py +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_resource_clients/__init__.py +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_resource_clients/_resource_client.py +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_resource_clients/actor.py +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_resource_clients/actor_collection.py +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_resource_clients/actor_env_var.py +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_resource_clients/actor_env_var_collection.py +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_resource_clients/actor_version.py +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_resource_clients/actor_version_collection.py +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_resource_clients/build.py +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_resource_clients/build_collection.py +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_resource_clients/dataset.py +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_resource_clients/dataset_collection.py +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_resource_clients/key_value_store.py +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_resource_clients/key_value_store_collection.py +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_resource_clients/log.py +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_resource_clients/request_queue.py +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_resource_clients/request_queue_collection.py +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_resource_clients/run.py +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_resource_clients/run_collection.py +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_resource_clients/schedule.py +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_resource_clients/schedule_collection.py +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_resource_clients/store_collection.py +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_resource_clients/task.py +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_resource_clients/task_collection.py +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_resource_clients/user.py +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_resource_clients/webhook.py +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_resource_clients/webhook_collection.py +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_resource_clients/webhook_dispatch.py +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_resource_clients/webhook_dispatch_collection.py +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_statistics.py +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_status_message_watcher.py +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_typeddicts.py +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_utils.py +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/errors.py +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/http_clients/__init__.py +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/http_clients/_base.py +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/http_clients/_impit.py +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/py.typed +0 -0
- {apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/types.py +0 -0
|
@@ -2,16 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
## [3.0.2](https://github.com/apify/apify-client-python/releases/tag/v3.0.2) (2026-05-26)
|
|
6
|
+
|
|
7
|
+
### 🐛 Bug Fixes
|
|
8
|
+
|
|
9
|
+
- Add missing response fields returned by the live API ([#821](https://github.com/apify/apify-client-python/pull/821)) ([e794411](https://github.com/apify/apify-client-python/commit/e794411dd3935cd09941096abc9767f33c4a4cf9)) by [@apify-service-account](https://github.com/apify-service-account)
|
|
10
|
+
- Prevent StreamedLog stop() from hanging on a silent stream ([#825](https://github.com/apify/apify-client-python/pull/825)) ([c15cb1b](https://github.com/apify/apify-client-python/commit/c15cb1bb2702120dd6fabe154a4b3d879248aafa)) by [@vdusek](https://github.com/vdusek)
|
|
11
|
+
- Flush StreamedLogAsync tail when stop() cancels the task ([#754](https://github.com/apify/apify-client-python/pull/754)) ([ea23338](https://github.com/apify/apify-client-python/commit/ea2333822937c4ad9b72fbba63e6fd7b52343055)) by [@vdusek](https://github.com/vdusek)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [3.0.1](https://github.com/apify/apify-client-python/releases/tag/v3.0.1) (2026-05-22)
|
|
7
15
|
|
|
8
16
|
### 🐛 Bug Fixes
|
|
9
17
|
|
|
10
18
|
- Add new API error codes and drop obsolete UnknownBuildTagError model ([#813](https://github.com/apify/apify-client-python/pull/813)) ([d1e2020](https://github.com/apify/apify-client-python/commit/d1e202087a37e6ab5048b0b8724cc73a3769ea8e)) by [@apify-service-account](https://github.com/apify-service-account)
|
|
11
19
|
- Add support for tiered pricing in Actor charge events ([#818](https://github.com/apify/apify-client-python/pull/818)) ([c3ea8c1](https://github.com/apify/apify-client-python/commit/c3ea8c10ae1d606fd3954177b690703f220ae857)) by [@apify-service-account](https://github.com/apify-service-account), closes [#811](https://github.com/apify/apify-client-python/issues/811)
|
|
20
|
+
- Allow 128MB memory limits and add CI to RunOrigin in models ([#819](https://github.com/apify/apify-client-python/pull/819)) ([01eb993](https://github.com/apify/apify-client-python/commit/01eb9934467e17e669c51d1c1e6f7e0bce1a608e)) by [@apify-service-account](https://github.com/apify-service-account)
|
|
12
21
|
|
|
13
22
|
|
|
14
|
-
<!-- git-cliff-unreleased-end -->
|
|
15
23
|
## [3.0.0](https://github.com/apify/apify-client-python/releases/tag/v3.0.0) (2026-05-20)
|
|
16
24
|
|
|
17
25
|
- Check out the [Upgrading guide](https://docs.apify.com/api/client/python/docs/upgrading/upgrading-to-v3) to ensure a smooth update.
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "apify_client"
|
|
7
|
-
version = "3.0.
|
|
7
|
+
version = "3.0.2"
|
|
8
8
|
description = "Apify API client for Python"
|
|
9
9
|
authors = [{ name = "Apify Technologies s.r.o.", email = "support@apify.com" }]
|
|
10
10
|
license = { file = "LICENSE" }
|
|
@@ -32,6 +32,32 @@ class AccountLimits(BaseModel):
|
|
|
32
32
|
current: Current
|
|
33
33
|
|
|
34
34
|
|
|
35
|
+
@docs_group('Models')
|
|
36
|
+
class ActVersion(BaseModel):
|
|
37
|
+
"""Snapshot of the Actor version that this build was created from."""
|
|
38
|
+
|
|
39
|
+
model_config = ConfigDict(
|
|
40
|
+
extra='allow',
|
|
41
|
+
populate_by_name=True,
|
|
42
|
+
)
|
|
43
|
+
source_type: Annotated[VersionSourceType | None, Field(alias='sourceType')] = None
|
|
44
|
+
build_tag: Annotated[str | None, Field(alias='buildTag', examples=['experimental'])] = None
|
|
45
|
+
version_number: Annotated[
|
|
46
|
+
str | None, Field(alias='versionNumber', examples=['0.0'], pattern='^([0-9]|[1-9][0-9])\\.([0-9]|[1-9][0-9])$')
|
|
47
|
+
] = None
|
|
48
|
+
git_repo_url: Annotated[
|
|
49
|
+
str | None,
|
|
50
|
+
Field(alias='gitRepoUrl', examples=['https://github.com/apifytech/actor-crawler.git#experimental:web-scraper']),
|
|
51
|
+
] = None
|
|
52
|
+
"""
|
|
53
|
+
URL of the git repository, present when sourceType is GIT_REPO.
|
|
54
|
+
"""
|
|
55
|
+
source_files: Annotated[list[SourceCodeFile] | None, Field(alias='sourceFiles')] = None
|
|
56
|
+
"""
|
|
57
|
+
Inline source files, present when sourceType is SOURCE_FILES.
|
|
58
|
+
"""
|
|
59
|
+
|
|
60
|
+
|
|
35
61
|
@docs_group('Models')
|
|
36
62
|
class Actor(BaseModel):
|
|
37
63
|
model_config = ConfigDict(
|
|
@@ -74,6 +100,25 @@ class Actor(BaseModel):
|
|
|
74
100
|
"""
|
|
75
101
|
A brief, LLM-generated readme summary
|
|
76
102
|
"""
|
|
103
|
+
seo_title: Annotated[str | None, Field(alias='seoTitle', examples=['Web Scraper'])] = None
|
|
104
|
+
seo_description: Annotated[
|
|
105
|
+
str | None,
|
|
106
|
+
Field(
|
|
107
|
+
alias='seoDescription',
|
|
108
|
+
examples=['Crawls websites using Chrome and extracts data from pages using JavaScript.'],
|
|
109
|
+
),
|
|
110
|
+
] = None
|
|
111
|
+
picture_url: Annotated[
|
|
112
|
+
str | None,
|
|
113
|
+
Field(alias='pictureUrl', examples=['https://apify-image-uploads-prod.s3.amazonaws.com/.../actor-picture.png']),
|
|
114
|
+
] = None
|
|
115
|
+
standby_url: Annotated[str | None, Field(alias='standbyUrl', examples=['https://my-actor.apify.actor'])] = None
|
|
116
|
+
notice: Annotated[str | None, Field(examples=['NONE'])] = None
|
|
117
|
+
categories: Annotated[list[str] | None, Field(examples=[['DEVELOPER_TOOLS', 'OPEN_SOURCE']])] = None
|
|
118
|
+
is_critical: Annotated[bool | None, Field(alias='isCritical', examples=[False])] = None
|
|
119
|
+
is_generic: Annotated[bool | None, Field(alias='isGeneric', examples=[False])] = None
|
|
120
|
+
is_source_code_hidden: Annotated[bool | None, Field(alias='isSourceCodeHidden', examples=[False])] = None
|
|
121
|
+
has_no_dataset: Annotated[bool | None, Field(alias='hasNoDataset', examples=[False])] = None
|
|
77
122
|
|
|
78
123
|
|
|
79
124
|
@docs_group('Models')
|
|
@@ -166,11 +211,11 @@ class ActorDefinition(BaseModel):
|
|
|
166
211
|
"""
|
|
167
212
|
Specifies the default amount of memory in megabytes to be used when the Actor is started. Can be an integer or a [dynamic memory expression](/platform/actors/development/actor-definition/dynamic-actor-memory).
|
|
168
213
|
"""
|
|
169
|
-
min_memory_mbytes: Annotated[int | None, Field(alias='minMemoryMbytes', ge=
|
|
214
|
+
min_memory_mbytes: Annotated[int | None, Field(alias='minMemoryMbytes', ge=128)] = None
|
|
170
215
|
"""
|
|
171
216
|
Specifies the minimum amount of memory in megabytes required by the Actor.
|
|
172
217
|
"""
|
|
173
|
-
max_memory_mbytes: Annotated[int | None, Field(alias='maxMemoryMbytes', ge=
|
|
218
|
+
max_memory_mbytes: Annotated[int | None, Field(alias='maxMemoryMbytes', ge=128)] = None
|
|
174
219
|
"""
|
|
175
220
|
Specifies the maximum amount of memory in megabytes required by the Actor.
|
|
176
221
|
"""
|
|
@@ -256,6 +301,15 @@ class ActorStats(BaseModel):
|
|
|
256
301
|
last_run_started_at: Annotated[
|
|
257
302
|
AwareDatetime | None, Field(alias='lastRunStartedAt', examples=['2019-07-08T14:01:05.546Z'])
|
|
258
303
|
] = None
|
|
304
|
+
actor_review_count: Annotated[int | None, Field(alias='actorReviewCount', examples=[69])] = None
|
|
305
|
+
actor_review_rating: Annotated[float | None, Field(alias='actorReviewRating', examples=[4.7])] = None
|
|
306
|
+
bookmark_count: Annotated[int | None, Field(alias='bookmarkCount', examples=[1269])] = None
|
|
307
|
+
public_actor_run_stats30_days: Annotated[
|
|
308
|
+
PublicActorRunStats30Days | None, Field(alias='publicActorRunStats30Days')
|
|
309
|
+
] = None
|
|
310
|
+
"""
|
|
311
|
+
Run status counts over the past 30 days.
|
|
312
|
+
"""
|
|
259
313
|
|
|
260
314
|
|
|
261
315
|
@docs_group('Models')
|
|
@@ -420,7 +474,18 @@ class Build(BaseModel):
|
|
|
420
474
|
str | None, Field(alias='inputSchema', deprecated=True, examples=['{\\n "title": "Schema for ... }'])
|
|
421
475
|
] = None
|
|
422
476
|
readme: Annotated[str | None, Field(deprecated=True, examples=['# Magic Actor\\nThis Actor is magic.'])] = None
|
|
423
|
-
build_number: Annotated[
|
|
477
|
+
build_number: Annotated[
|
|
478
|
+
str,
|
|
479
|
+
Field(
|
|
480
|
+
alias='buildNumber',
|
|
481
|
+
examples=['0.1.1'],
|
|
482
|
+
pattern='^([0-9]|[1-9][0-9])\\.([0-9]|[1-9][0-9])(\\.[1-9][0-9]{0,4})$',
|
|
483
|
+
),
|
|
484
|
+
]
|
|
485
|
+
act_version: Annotated[ActVersion | None, Field(alias='actVersion', title='BuildActVersion')] = None
|
|
486
|
+
"""
|
|
487
|
+
Snapshot of the Actor version that this build was created from.
|
|
488
|
+
"""
|
|
424
489
|
actor_definition: Annotated[ActorDefinition | None, Field(alias='actorDefinition')] = None
|
|
425
490
|
|
|
426
491
|
|
|
@@ -455,12 +520,22 @@ class BuildShort(BaseModel):
|
|
|
455
520
|
)
|
|
456
521
|
id: Annotated[str, Field(examples=['HG7ML7M8z78YcAPEB'])]
|
|
457
522
|
act_id: Annotated[str | None, Field(alias='actId', examples=['janedoe~my-actor'])] = None
|
|
523
|
+
user_id: Annotated[str | None, Field(alias='userId', examples=['klmdEpoiojmdEMlk3'])] = None
|
|
458
524
|
status: ActorJobStatus
|
|
459
525
|
started_at: Annotated[AwareDatetime, Field(alias='startedAt', examples=['2019-11-30T07:34:24.202Z'])]
|
|
460
526
|
finished_at: Annotated[AwareDatetime | None, Field(alias='finishedAt', examples=['2019-12-12T09:30:12.202Z'])] = (
|
|
461
527
|
None
|
|
462
528
|
)
|
|
463
529
|
usage_total_usd: Annotated[float, Field(alias='usageTotalUsd', examples=[0.02])]
|
|
530
|
+
build_number: Annotated[
|
|
531
|
+
str,
|
|
532
|
+
Field(
|
|
533
|
+
alias='buildNumber',
|
|
534
|
+
examples=['0.1.1'],
|
|
535
|
+
pattern='^([0-9]|[1-9][0-9])\\.([0-9]|[1-9][0-9])(\\.[1-9][0-9]{0,4})$',
|
|
536
|
+
),
|
|
537
|
+
]
|
|
538
|
+
build_number_int: Annotated[int | None, Field(alias='buildNumberInt', examples=[10000])] = None
|
|
464
539
|
meta: BuildsMeta | None = None
|
|
465
540
|
|
|
466
541
|
|
|
@@ -473,6 +548,7 @@ class BuildStats(BaseModel):
|
|
|
473
548
|
duration_millis: Annotated[int | None, Field(alias='durationMillis', examples=[1000])] = None
|
|
474
549
|
run_time_secs: Annotated[float | None, Field(alias='runTimeSecs', examples=[45.718])] = None
|
|
475
550
|
compute_units: Annotated[float, Field(alias='computeUnits', examples=[0.0126994444444444])]
|
|
551
|
+
image_size_bytes: Annotated[int | None, Field(alias='imageSizeBytes', examples=[975770223])] = None
|
|
476
552
|
|
|
477
553
|
|
|
478
554
|
@docs_group('Models')
|
|
@@ -604,7 +680,9 @@ class CreateOrUpdateVersionRequest(BaseModel):
|
|
|
604
680
|
extra='allow',
|
|
605
681
|
populate_by_name=True,
|
|
606
682
|
)
|
|
607
|
-
version_number: Annotated[
|
|
683
|
+
version_number: Annotated[
|
|
684
|
+
str | None, Field(alias='versionNumber', examples=['0.0'], pattern='^([0-9]|[1-9][0-9])\\.([0-9]|[1-9][0-9])$')
|
|
685
|
+
] = None
|
|
608
686
|
source_type: Annotated[VersionSourceType | None, Field(alias='sourceType')] = None
|
|
609
687
|
env_vars: Annotated[list[EnvVarRequest] | None, Field(alias='envVars')] = None
|
|
610
688
|
apply_env_vars_to_build: Annotated[bool | None, Field(alias='applyEnvVarsToBuild', examples=[False])] = None
|
|
@@ -658,6 +736,7 @@ class Current(BaseModel):
|
|
|
658
736
|
actor_task_count: Annotated[int, Field(alias='actorTaskCount', examples=[130])]
|
|
659
737
|
active_actor_job_count: Annotated[int, Field(alias='activeActorJobCount', examples=[0])]
|
|
660
738
|
team_account_seat_count: Annotated[int, Field(alias='teamAccountSeatCount', examples=[5])]
|
|
739
|
+
schedule_count: Annotated[int | None, Field(alias='scheduleCount', examples=[77])] = None
|
|
661
740
|
|
|
662
741
|
|
|
663
742
|
@docs_group('Models')
|
|
@@ -667,6 +746,35 @@ class CurrentPricingInfo(BaseModel):
|
|
|
667
746
|
populate_by_name=True,
|
|
668
747
|
)
|
|
669
748
|
pricing_model: Annotated[str, Field(alias='pricingModel', examples=['FREE'])]
|
|
749
|
+
apify_margin_percentage: Annotated[float | None, Field(alias='apifyMarginPercentage', examples=[0.2])] = None
|
|
750
|
+
created_at: Annotated[AwareDatetime | None, Field(alias='createdAt', examples=['2023-01-01T00:00:00.000Z'])] = None
|
|
751
|
+
started_at: Annotated[AwareDatetime | None, Field(alias='startedAt', examples=['2023-01-01T00:00:00.000Z'])] = None
|
|
752
|
+
notified_about_change_at: Annotated[AwareDatetime | None, Field(alias='notifiedAboutChangeAt', examples=[None])] = (
|
|
753
|
+
None
|
|
754
|
+
)
|
|
755
|
+
notified_about_future_change_at: Annotated[
|
|
756
|
+
AwareDatetime | None, Field(alias='notifiedAboutFutureChangeAt', examples=[None])
|
|
757
|
+
] = None
|
|
758
|
+
is_price_change_notification_suppressed: Annotated[
|
|
759
|
+
bool | None, Field(alias='isPriceChangeNotificationSuppressed', examples=[False])
|
|
760
|
+
] = None
|
|
761
|
+
force_contains_significant_price_change: Annotated[
|
|
762
|
+
bool | None, Field(alias='forceContainsSignificantPriceChange', examples=[False])
|
|
763
|
+
] = None
|
|
764
|
+
is_ppe_platform_usage_paid_by_user: Annotated[
|
|
765
|
+
bool | None, Field(alias='isPPEPlatformUsagePaidByUser', examples=[False])
|
|
766
|
+
] = None
|
|
767
|
+
reason_for_change: Annotated[str | None, Field(alias='reasonForChange', examples=[None])] = None
|
|
768
|
+
trial_minutes: Annotated[int | None, Field(alias='trialMinutes', examples=[None])] = None
|
|
769
|
+
unit_name: Annotated[str | None, Field(alias='unitName', examples=[None])] = None
|
|
770
|
+
price_per_unit_usd: Annotated[float | None, Field(alias='pricePerUnitUsd', examples=[None])] = None
|
|
771
|
+
minimal_max_total_charge_usd: Annotated[float | None, Field(alias='minimalMaxTotalChargeUsd', examples=[0.5])] = (
|
|
772
|
+
None
|
|
773
|
+
)
|
|
774
|
+
pricing_per_event: Annotated[dict[str, Any] | None, Field(alias='pricingPerEvent')] = None
|
|
775
|
+
"""
|
|
776
|
+
Per-event pricing configuration for pay-per-event Actors.
|
|
777
|
+
"""
|
|
670
778
|
|
|
671
779
|
|
|
672
780
|
@docs_group('Models')
|
|
@@ -783,6 +891,10 @@ class DatasetListItem(BaseModel):
|
|
|
783
891
|
clean_item_count: Annotated[int, Field(alias='cleanItemCount', examples=[5])]
|
|
784
892
|
act_id: Annotated[str | None, Field(alias='actId', examples=['zdc3Pyhyz3m8vjDeM'])] = None
|
|
785
893
|
act_run_id: Annotated[str | None, Field(alias='actRunId', examples=['HG7ML7M8z78YcAPEB'])] = None
|
|
894
|
+
title: Annotated[str | None, Field(examples=['My Dataset'])] = None
|
|
895
|
+
username: Annotated[str | None, Field(examples=['janedoe'])] = None
|
|
896
|
+
general_access: Annotated[GeneralAccess | None, Field(alias='generalAccess')] = None
|
|
897
|
+
stats: DatasetStats | None = None
|
|
786
898
|
|
|
787
899
|
|
|
788
900
|
@docs_group('Models')
|
|
@@ -840,9 +952,16 @@ class DatasetStats(BaseModel):
|
|
|
840
952
|
extra='allow',
|
|
841
953
|
populate_by_name=True,
|
|
842
954
|
)
|
|
843
|
-
read_count: Annotated[int, Field(alias='readCount', examples=[22])]
|
|
844
|
-
write_count: Annotated[int, Field(alias='writeCount', examples=[3])]
|
|
845
|
-
storage_bytes: Annotated[int, Field(alias='storageBytes', examples=[783])]
|
|
955
|
+
read_count: Annotated[int | None, Field(alias='readCount', examples=[22])] = None
|
|
956
|
+
write_count: Annotated[int | None, Field(alias='writeCount', examples=[3])] = None
|
|
957
|
+
storage_bytes: Annotated[int | None, Field(alias='storageBytes', examples=[783])] = None
|
|
958
|
+
"""
|
|
959
|
+
Total storage size in bytes. Only returned by the single-dataset endpoint.
|
|
960
|
+
"""
|
|
961
|
+
inflated_bytes: Annotated[int | None, Field(alias='inflatedBytes', examples=[0])] = None
|
|
962
|
+
"""
|
|
963
|
+
Uncompressed size in bytes. Only returned by the dataset list endpoint.
|
|
964
|
+
"""
|
|
846
965
|
|
|
847
966
|
|
|
848
967
|
@docs_group('Models')
|
|
@@ -1081,6 +1200,7 @@ class ExampleWebhookDispatch(BaseModel):
|
|
|
1081
1200
|
finished_at: Annotated[AwareDatetime | None, Field(alias='finishedAt', examples=['2019-12-13T08:36:13.202Z'])] = (
|
|
1082
1201
|
None
|
|
1083
1202
|
)
|
|
1203
|
+
removed_at: Annotated[AwareDatetime | None, Field(alias='removedAt', examples=[None])] = None
|
|
1084
1204
|
|
|
1085
1205
|
|
|
1086
1206
|
@docs_group('Models')
|
|
@@ -1203,6 +1323,19 @@ class KeyValueStore(BaseModel):
|
|
|
1203
1323
|
"""
|
|
1204
1324
|
A public link to access keys of the key-value store directly.
|
|
1205
1325
|
"""
|
|
1326
|
+
records_public_url: Annotated[
|
|
1327
|
+
AnyUrl | None,
|
|
1328
|
+
Field(
|
|
1329
|
+
alias='recordsPublicUrl', examples=['https://api.apify.com/v2/key-value-stores/WkzbQMuFYuamGv3YF/records']
|
|
1330
|
+
),
|
|
1331
|
+
] = None
|
|
1332
|
+
"""
|
|
1333
|
+
A public link to access records of the key-value store directly.
|
|
1334
|
+
"""
|
|
1335
|
+
schema_: Annotated[dict[str, Any] | None, Field(alias='schema')] = None
|
|
1336
|
+
"""
|
|
1337
|
+
Optional JSON schema describing the keys stored in the key-value store.
|
|
1338
|
+
"""
|
|
1206
1339
|
url_signing_secret_key: Annotated[str | None, Field(alias='urlSigningSecretKey')] = None
|
|
1207
1340
|
"""
|
|
1208
1341
|
A secret key for generating signed public URLs. It is only provided to clients with WRITE permission for the key-value store.
|
|
@@ -1253,6 +1386,7 @@ class KeyValueStoreStats(BaseModel):
|
|
|
1253
1386
|
delete_count: Annotated[int, Field(alias='deleteCount', examples=[6])]
|
|
1254
1387
|
list_count: Annotated[int, Field(alias='listCount', examples=[2])]
|
|
1255
1388
|
s3_storage_bytes: Annotated[int | None, Field(alias='s3StorageBytes', examples=[18])] = None
|
|
1389
|
+
storage_bytes: Annotated[int | None, Field(alias='storageBytes', examples=[457225])] = None
|
|
1256
1390
|
|
|
1257
1391
|
|
|
1258
1392
|
@docs_group('Models')
|
|
@@ -1290,6 +1424,7 @@ class Limits(BaseModel):
|
|
|
1290
1424
|
max_concurrent_actor_jobs: Annotated[int, Field(alias='maxConcurrentActorJobs', examples=[256])]
|
|
1291
1425
|
max_team_account_seat_count: Annotated[int, Field(alias='maxTeamAccountSeatCount', examples=[9])]
|
|
1292
1426
|
data_retention_days: Annotated[int, Field(alias='dataRetentionDays', examples=[90])]
|
|
1427
|
+
max_schedule_count: Annotated[int | None, Field(alias='maxScheduleCount', examples=[100])] = None
|
|
1293
1428
|
|
|
1294
1429
|
|
|
1295
1430
|
@docs_group('Models')
|
|
@@ -1629,6 +1764,17 @@ class MonthlyUsageResponse(BaseModel):
|
|
|
1629
1764
|
data: MonthlyUsage
|
|
1630
1765
|
|
|
1631
1766
|
|
|
1767
|
+
@docs_group('Models')
|
|
1768
|
+
class Notifications(BaseModel):
|
|
1769
|
+
"""Notification settings for this schedule."""
|
|
1770
|
+
|
|
1771
|
+
model_config = ConfigDict(
|
|
1772
|
+
extra='allow',
|
|
1773
|
+
populate_by_name=True,
|
|
1774
|
+
)
|
|
1775
|
+
email: Annotated[bool | None, Field(examples=[True])] = None
|
|
1776
|
+
|
|
1777
|
+
|
|
1632
1778
|
@docs_group('Models')
|
|
1633
1779
|
class PaginationResponse(BaseModel):
|
|
1634
1780
|
"""Common pagination fields for list responses."""
|
|
@@ -1683,6 +1829,10 @@ class ListOfDatasets(PaginationResponse):
|
|
|
1683
1829
|
extra='allow',
|
|
1684
1830
|
populate_by_name=True,
|
|
1685
1831
|
)
|
|
1832
|
+
unnamed: Annotated[bool | None, Field(examples=[False])] = None
|
|
1833
|
+
"""
|
|
1834
|
+
Whether the listing was filtered to only unnamed datasets.
|
|
1835
|
+
"""
|
|
1686
1836
|
items: list[DatasetListItem]
|
|
1687
1837
|
|
|
1688
1838
|
|
|
@@ -1692,6 +1842,10 @@ class ListOfKeyValueStores(PaginationResponse):
|
|
|
1692
1842
|
extra='allow',
|
|
1693
1843
|
populate_by_name=True,
|
|
1694
1844
|
)
|
|
1845
|
+
unnamed: Annotated[bool | None, Field(examples=[False])] = None
|
|
1846
|
+
"""
|
|
1847
|
+
Whether the listing was filtered to only unnamed key-value stores.
|
|
1848
|
+
"""
|
|
1695
1849
|
items: list[KeyValueStore]
|
|
1696
1850
|
|
|
1697
1851
|
|
|
@@ -1703,6 +1857,10 @@ class ListOfRequestQueues(PaginationResponse):
|
|
|
1703
1857
|
extra='allow',
|
|
1704
1858
|
populate_by_name=True,
|
|
1705
1859
|
)
|
|
1860
|
+
unnamed: Annotated[bool | None, Field(examples=[False])] = None
|
|
1861
|
+
"""
|
|
1862
|
+
Whether the listing was filtered to only unnamed request queues.
|
|
1863
|
+
"""
|
|
1706
1864
|
items: list[RequestQueueShort]
|
|
1707
1865
|
"""
|
|
1708
1866
|
The array of request queues.
|
|
@@ -1812,6 +1970,14 @@ class Plan(BaseModel):
|
|
|
1812
1970
|
team_account_seat_count: Annotated[int, Field(alias='teamAccountSeatCount', examples=[1])]
|
|
1813
1971
|
support_level: Annotated[str, Field(alias='supportLevel', examples=['COMMUNITY'])]
|
|
1814
1972
|
available_add_ons: Annotated[list[str], Field(alias='availableAddOns', examples=[[]])]
|
|
1973
|
+
tier: Annotated[str | None, Field(examples=['FREE'])] = None
|
|
1974
|
+
api_rate_limit_boosts: Annotated[int | None, Field(alias='apiRateLimitBoosts', examples=[0])] = None
|
|
1975
|
+
max_schedule_count: Annotated[int | None, Field(alias='maxScheduleCount', examples=[100])] = None
|
|
1976
|
+
max_concurrent_actor_runs: Annotated[int | None, Field(alias='maxConcurrentActorRuns', examples=[25])] = None
|
|
1977
|
+
plan_pricing: Annotated[dict[str, Any] | None, Field(alias='planPricing')] = None
|
|
1978
|
+
"""
|
|
1979
|
+
Pricing details for this plan.
|
|
1980
|
+
"""
|
|
1815
1981
|
|
|
1816
1982
|
|
|
1817
1983
|
@docs_group('Models')
|
|
@@ -1909,10 +2075,25 @@ class ProxyGroup(BaseModel):
|
|
|
1909
2075
|
populate_by_name=True,
|
|
1910
2076
|
)
|
|
1911
2077
|
name: Annotated[str, Field(examples=['Group1'])]
|
|
1912
|
-
description: Annotated[str, Field(examples=['Group1 description'])]
|
|
2078
|
+
description: Annotated[str | None, Field(examples=['Group1 description'])]
|
|
1913
2079
|
available_count: Annotated[int, Field(alias='availableCount', examples=[10])]
|
|
1914
2080
|
|
|
1915
2081
|
|
|
2082
|
+
@docs_group('Models')
|
|
2083
|
+
class PublicActorRunStats30Days(BaseModel):
|
|
2084
|
+
"""Run status counts over the past 30 days."""
|
|
2085
|
+
|
|
2086
|
+
model_config = ConfigDict(
|
|
2087
|
+
extra='allow',
|
|
2088
|
+
populate_by_name=True,
|
|
2089
|
+
)
|
|
2090
|
+
aborted: Annotated[int | None, Field(alias='ABORTED', examples=[2542])] = None
|
|
2091
|
+
failed: Annotated[int | None, Field(alias='FAILED', examples=[1234])] = None
|
|
2092
|
+
succeeded: Annotated[int | None, Field(alias='SUCCEEDED', examples=[732805])] = None
|
|
2093
|
+
timed_out: Annotated[int | None, Field(alias='TIMED-OUT', examples=[12556])] = None
|
|
2094
|
+
total: Annotated[int | None, Field(alias='TOTAL', examples=[749137])] = None
|
|
2095
|
+
|
|
2096
|
+
|
|
1916
2097
|
@docs_group('Models')
|
|
1917
2098
|
class PublicUserDataResponse(BaseModel):
|
|
1918
2099
|
model_config = ConfigDict(
|
|
@@ -2135,6 +2316,14 @@ class RequestQueue(BaseModel):
|
|
|
2135
2316
|
"""
|
|
2136
2317
|
The ID of the user who owns the request queue.
|
|
2137
2318
|
"""
|
|
2319
|
+
act_id: Annotated[str | None, Field(alias='actId')] = None
|
|
2320
|
+
"""
|
|
2321
|
+
The ID of the Actor that created this request queue.
|
|
2322
|
+
"""
|
|
2323
|
+
act_run_id: Annotated[str | None, Field(alias='actRunId')] = None
|
|
2324
|
+
"""
|
|
2325
|
+
The ID of the Actor run that created this request queue.
|
|
2326
|
+
"""
|
|
2138
2327
|
created_at: Annotated[AwareDatetime, Field(alias='createdAt', examples=['2019-12-12T07:34:14.202Z'])]
|
|
2139
2328
|
"""
|
|
2140
2329
|
The timestamp when the request queue was created.
|
|
@@ -2274,6 +2463,8 @@ class RequestQueueShort(BaseModel):
|
|
|
2274
2463
|
"""
|
|
2275
2464
|
Whether the request queue has been accessed by multiple different clients.
|
|
2276
2465
|
"""
|
|
2466
|
+
general_access: Annotated[GeneralAccess | None, Field(alias='generalAccess')] = None
|
|
2467
|
+
stats: RequestQueueStats | None = None
|
|
2277
2468
|
|
|
2278
2469
|
|
|
2279
2470
|
@docs_group('Models')
|
|
@@ -2467,7 +2658,14 @@ class Run(BaseModel):
|
|
|
2467
2658
|
"""
|
|
2468
2659
|
A map of aliased storage IDs associated with this run, grouped by storage type.
|
|
2469
2660
|
"""
|
|
2470
|
-
build_number: Annotated[
|
|
2661
|
+
build_number: Annotated[
|
|
2662
|
+
str | None,
|
|
2663
|
+
Field(
|
|
2664
|
+
alias='buildNumber',
|
|
2665
|
+
examples=['0.0.36'],
|
|
2666
|
+
pattern='^([0-9]|[1-9][0-9])\\.([0-9]|[1-9][0-9])(\\.[1-9][0-9]{0,4})$',
|
|
2667
|
+
),
|
|
2668
|
+
] = None
|
|
2471
2669
|
"""
|
|
2472
2670
|
Build number of the Actor build used for this run.
|
|
2473
2671
|
"""
|
|
@@ -2501,6 +2699,12 @@ class Run(BaseModel):
|
|
|
2501
2699
|
"""
|
|
2502
2700
|
List of metamorph events that occurred during the run.
|
|
2503
2701
|
"""
|
|
2702
|
+
platform_usage_billing_model: Annotated[str | None, Field(alias='platformUsageBillingModel', examples=['USER'])] = (
|
|
2703
|
+
None
|
|
2704
|
+
)
|
|
2705
|
+
"""
|
|
2706
|
+
Indicates which party covers platform usage costs for this run.
|
|
2707
|
+
"""
|
|
2504
2708
|
|
|
2505
2709
|
|
|
2506
2710
|
@docs_group('Models')
|
|
@@ -2571,6 +2775,7 @@ class RunShort(BaseModel):
|
|
|
2571
2775
|
)
|
|
2572
2776
|
id: Annotated[str, Field(examples=['HG7ML7M8z78YcAPEB'])]
|
|
2573
2777
|
act_id: Annotated[str, Field(alias='actId', examples=['HDSasDasz78YcAPEB'])]
|
|
2778
|
+
user_id: Annotated[str | None, Field(alias='userId', examples=['7sT5jcggjjA9fNcxF'])] = None
|
|
2574
2779
|
actor_task_id: Annotated[str | None, Field(alias='actorTaskId', examples=['KJHSKHausidyaJKHs'])] = None
|
|
2575
2780
|
status: ActorJobStatus
|
|
2576
2781
|
started_at: Annotated[AwareDatetime, Field(alias='startedAt', examples=['2019-11-30T07:34:24.202Z'])]
|
|
@@ -2578,7 +2783,15 @@ class RunShort(BaseModel):
|
|
|
2578
2783
|
None
|
|
2579
2784
|
)
|
|
2580
2785
|
build_id: Annotated[str, Field(alias='buildId', examples=['HG7ML7M8z78YcAPEB'])]
|
|
2581
|
-
build_number: Annotated[
|
|
2786
|
+
build_number: Annotated[
|
|
2787
|
+
str | None,
|
|
2788
|
+
Field(
|
|
2789
|
+
alias='buildNumber',
|
|
2790
|
+
examples=['0.0.2'],
|
|
2791
|
+
pattern='^([0-9]|[1-9][0-9])\\.([0-9]|[1-9][0-9])(\\.[1-9][0-9]{0,4})$',
|
|
2792
|
+
),
|
|
2793
|
+
] = None
|
|
2794
|
+
build_number_int: Annotated[int | None, Field(alias='buildNumberInt', examples=[10000])] = None
|
|
2582
2795
|
meta: RunMeta
|
|
2583
2796
|
usage_total_usd: Annotated[float, Field(alias='usageTotalUsd', examples=[0.2])]
|
|
2584
2797
|
default_key_value_store_id: Annotated[str, Field(alias='defaultKeyValueStoreId', examples=['sfAjeR4QmeJCQzTfe'])]
|
|
@@ -2761,6 +2974,10 @@ class Schedule(ScheduleBase):
|
|
|
2761
2974
|
)
|
|
2762
2975
|
description: Annotated[str | None, Field(examples=['Schedule of actor ...'])] = None
|
|
2763
2976
|
title: str | None = None
|
|
2977
|
+
notifications: Annotated[Notifications | None, Field(title='ScheduleNotifications')] = None
|
|
2978
|
+
"""
|
|
2979
|
+
Notification settings for this schedule.
|
|
2980
|
+
"""
|
|
2764
2981
|
actions: list[Annotated[ScheduleActionRunActor | ScheduleActionRunActorTask, Field(discriminator='type')]]
|
|
2765
2982
|
|
|
2766
2983
|
|
|
@@ -2941,10 +3158,14 @@ class StoreListActor(BaseModel):
|
|
|
2941
3158
|
url: Annotated[AnyUrl | None, Field(examples=['https://...'])] = None
|
|
2942
3159
|
stats: ActorStats
|
|
2943
3160
|
current_pricing_info: Annotated[CurrentPricingInfo, Field(alias='currentPricingInfo')]
|
|
2944
|
-
|
|
3161
|
+
is_white_listed_for_agentic_payments: Annotated[bool | None, Field(alias='isWhiteListedForAgenticPayments')] = None
|
|
2945
3162
|
"""
|
|
2946
3163
|
Whether the Actor is whitelisted for agentic payment processing.
|
|
2947
3164
|
"""
|
|
3165
|
+
actor_review_count: Annotated[int | None, Field(alias='actorReviewCount', examples=[69])] = None
|
|
3166
|
+
actor_review_rating: Annotated[float | None, Field(alias='actorReviewRating', examples=[4.7])] = None
|
|
3167
|
+
bookmark_count: Annotated[int | None, Field(alias='bookmarkCount', examples=[1269])] = None
|
|
3168
|
+
badge: Annotated[str | None, Field(examples=[None])] = None
|
|
2948
3169
|
readme_summary: Annotated[str | None, Field(alias='readmeSummary')] = None
|
|
2949
3170
|
"""
|
|
2950
3171
|
A brief, LLM-generated readme summary
|
|
@@ -2963,10 +3184,21 @@ class TaggedBuildInfo(BaseModel):
|
|
|
2963
3184
|
"""
|
|
2964
3185
|
The ID of the build associated with this tag.
|
|
2965
3186
|
"""
|
|
2966
|
-
build_number: Annotated[
|
|
3187
|
+
build_number: Annotated[
|
|
3188
|
+
str | None,
|
|
3189
|
+
Field(
|
|
3190
|
+
alias='buildNumber',
|
|
3191
|
+
examples=['0.0.2'],
|
|
3192
|
+
pattern='^([0-9]|[1-9][0-9])\\.([0-9]|[1-9][0-9])(\\.[1-9][0-9]{0,4})$',
|
|
3193
|
+
),
|
|
3194
|
+
] = None
|
|
2967
3195
|
"""
|
|
2968
3196
|
The build number/version string.
|
|
2969
3197
|
"""
|
|
3198
|
+
build_number_int: Annotated[int | None, Field(alias='buildNumberInt', examples=[42])] = None
|
|
3199
|
+
"""
|
|
3200
|
+
The build number encoded as a single integer.
|
|
3201
|
+
"""
|
|
2970
3202
|
finished_at: Annotated[AwareDatetime | None, Field(alias='finishedAt', examples=['2019-06-10T11:15:49.286Z'])] = (
|
|
2971
3203
|
None
|
|
2972
3204
|
)
|
|
@@ -3374,7 +3606,9 @@ class Version(BaseModel):
|
|
|
3374
3606
|
extra='allow',
|
|
3375
3607
|
populate_by_name=True,
|
|
3376
3608
|
)
|
|
3377
|
-
version_number: Annotated[
|
|
3609
|
+
version_number: Annotated[
|
|
3610
|
+
str, Field(alias='versionNumber', examples=['0.0'], pattern='^([0-9]|[1-9][0-9])\\.([0-9]|[1-9][0-9])$')
|
|
3611
|
+
]
|
|
3378
3612
|
source_type: Annotated[VersionSourceType | None, Field(alias='sourceType')]
|
|
3379
3613
|
env_vars: Annotated[list[EnvVar] | None, Field(alias='envVars')] = None
|
|
3380
3614
|
apply_env_vars_to_build: Annotated[bool | None, Field(alias='applyEnvVarsToBuild', examples=[False])] = None
|
|
@@ -3480,6 +3714,7 @@ class WebhookDispatch(BaseModel):
|
|
|
3480
3714
|
status: WebhookDispatchStatus
|
|
3481
3715
|
event_type: Annotated[WebhookEventType, Field(alias='eventType')]
|
|
3482
3716
|
event_data: Annotated[EventData | None, Field(alias='eventData', title='eventData')] = None
|
|
3717
|
+
webhook: WebhookDispatchWebhookSummary | None = None
|
|
3483
3718
|
calls: Annotated[list[Call] | None, Field(title='calls')] = None
|
|
3484
3719
|
|
|
3485
3720
|
|
|
@@ -3488,6 +3723,20 @@ class WebhookDispatchResponse(TestWebhookResponse):
|
|
|
3488
3723
|
pass
|
|
3489
3724
|
|
|
3490
3725
|
|
|
3726
|
+
@docs_group('Models')
|
|
3727
|
+
class WebhookDispatchWebhookSummary(BaseModel):
|
|
3728
|
+
"""A summary of the webhook that triggered this dispatch."""
|
|
3729
|
+
|
|
3730
|
+
model_config = ConfigDict(
|
|
3731
|
+
extra='allow',
|
|
3732
|
+
populate_by_name=True,
|
|
3733
|
+
)
|
|
3734
|
+
action_type: Annotated[str | None, Field(alias='actionType', examples=['HTTP_REQUEST'])] = None
|
|
3735
|
+
condition: WebhookCondition | None = None
|
|
3736
|
+
request_url: Annotated[AnyUrl | None, Field(alias='requestUrl', examples=['https://example.com/webhook'])] = None
|
|
3737
|
+
is_ad_hoc: Annotated[bool | None, Field(alias='isAdHoc', examples=[False])] = None
|
|
3738
|
+
|
|
3739
|
+
|
|
3491
3740
|
@docs_group('Models')
|
|
3492
3741
|
class WebhookRepresentation(BaseModel):
|
|
3493
3742
|
"""Minimal representation of an ad-hoc webhook attached to a single Actor run or build via the
|
|
@@ -3541,6 +3790,9 @@ class WebhookShort(BaseModel):
|
|
|
3541
3790
|
modified_at: Annotated[AwareDatetime, Field(alias='modifiedAt', examples=['2019-12-13T08:36:13.202Z'])]
|
|
3542
3791
|
user_id: Annotated[str, Field(alias='userId', examples=['wRsJZtadYvn4mBZmm'])]
|
|
3543
3792
|
is_ad_hoc: Annotated[bool | None, Field(alias='isAdHoc', examples=[False])] = None
|
|
3793
|
+
is_apify_integration: Annotated[bool | None, Field(alias='isApifyIntegration', examples=[False])] = None
|
|
3794
|
+
is_enabled: Annotated[bool | None, Field(alias='isEnabled', examples=[True])] = None
|
|
3795
|
+
action_type: Annotated[str | None, Field(alias='actionType', examples=['HTTP_REQUEST'])] = None
|
|
3544
3796
|
should_interpolate_strings: Annotated[bool | None, Field(alias='shouldInterpolateStrings', examples=[False])] = None
|
|
3545
3797
|
event_types: Annotated[list[WebhookEventType], Field(alias='eventTypes', examples=[['ACTOR.RUN.SUCCEEDED']])]
|
|
3546
3798
|
condition: WebhookCondition
|
|
@@ -5,9 +5,9 @@ import logging
|
|
|
5
5
|
import re
|
|
6
6
|
import threading
|
|
7
7
|
from asyncio import Task
|
|
8
|
-
from datetime import UTC, datetime
|
|
8
|
+
from datetime import UTC, datetime, timedelta
|
|
9
9
|
from threading import Thread
|
|
10
|
-
from typing import TYPE_CHECKING, Self, cast
|
|
10
|
+
from typing import TYPE_CHECKING, ClassVar, Self, cast
|
|
11
11
|
|
|
12
12
|
from apify_client._docs import docs_group
|
|
13
13
|
|
|
@@ -90,6 +90,10 @@ class StreamedLog(StreamedLogBase):
|
|
|
90
90
|
call `start` and `stop` manually. Obtain an instance via `RunClient.get_streamed_log`.
|
|
91
91
|
"""
|
|
92
92
|
|
|
93
|
+
# Caps how long `iter_bytes()` can block on a silent stream so `stop()` can unblock within
|
|
94
|
+
# this window instead of waiting for the long-polling default.
|
|
95
|
+
_read_timeout: ClassVar[timedelta] = timedelta(seconds=30)
|
|
96
|
+
|
|
93
97
|
def __init__(self, log_client: LogClient, *, to_logger: logging.Logger, from_start: bool = True) -> None:
|
|
94
98
|
"""Initialize `StreamedLog`.
|
|
95
99
|
|
|
@@ -138,17 +142,17 @@ class StreamedLog(StreamedLogBase):
|
|
|
138
142
|
self.stop()
|
|
139
143
|
|
|
140
144
|
def _stream_log(self) -> None:
|
|
141
|
-
with self._log_client.stream(raw=True) as log_stream:
|
|
145
|
+
with self._log_client.stream(raw=True, timeout=self._read_timeout) as log_stream:
|
|
142
146
|
if not log_stream:
|
|
143
147
|
return
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
148
|
+
try:
|
|
149
|
+
for data in log_stream.iter_bytes():
|
|
150
|
+
self._process_new_data(data)
|
|
151
|
+
if self._stop_logging:
|
|
152
|
+
break
|
|
153
|
+
finally:
|
|
154
|
+
# Flush the last buffered part even if the read timed out or was stopped.
|
|
155
|
+
self._log_buffer_content(include_last_part=True)
|
|
152
156
|
|
|
153
157
|
|
|
154
158
|
@docs_group('Other')
|
|
@@ -214,8 +218,9 @@ class StreamedLogAsync(StreamedLogBase):
|
|
|
214
218
|
async with self._log_client.stream(raw=True) as log_stream:
|
|
215
219
|
if not log_stream:
|
|
216
220
|
return
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
221
|
+
try:
|
|
222
|
+
async for data in log_stream.aiter_bytes():
|
|
223
|
+
self._process_new_data(data)
|
|
224
|
+
finally:
|
|
225
|
+
# Flush the last buffered part even if the task is cancelled by `stop()`.
|
|
226
|
+
self._log_buffer_content(include_last_part=True)
|
|
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
|
|
File without changes
|
|
File without changes
|
{apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_resource_clients/_resource_client.py
RENAMED
|
File without changes
|
|
File without changes
|
{apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_resource_clients/actor_collection.py
RENAMED
|
File without changes
|
{apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_resource_clients/actor_env_var.py
RENAMED
|
File without changes
|
|
File without changes
|
{apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_resource_clients/actor_version.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_resource_clients/build_collection.py
RENAMED
|
File without changes
|
|
File without changes
|
{apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_resource_clients/dataset_collection.py
RENAMED
|
File without changes
|
{apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_resource_clients/key_value_store.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_resource_clients/request_queue.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_resource_clients/run_collection.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_resource_clients/store_collection.py
RENAMED
|
File without changes
|
|
File without changes
|
{apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_resource_clients/task_collection.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_resource_clients/webhook_collection.py
RENAMED
|
File without changes
|
{apify_client-3.0.1b2 → apify_client-3.0.2}/src/apify_client/_resource_clients/webhook_dispatch.py
RENAMED
|
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
|
|
File without changes
|
|
File without changes
|