Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions src/apify_client/_resource_clients/actor.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def __init__(
**kwargs,
)

def get(self, *, timeout: Timeout = 'long') -> Actor | None:
def get(self, *, timeout: Timeout = 'short') -> Actor | None:
"""Retrieve the Actor.

https://docs.apify.com/api/v2#/reference/actors/actor-object/get-actor
Expand Down Expand Up @@ -129,7 +129,7 @@ def update(
pricing_infos: list[dict[str, Any]] | None = None,
actor_permission_level: ActorPermissionLevel | None = None,
tagged_builds: dict[str, None | dict[str, str]] | None = None,
timeout: Timeout = 'long',
timeout: Timeout = 'short',
) -> Actor:
"""Update the Actor with the specified fields.

Expand Down Expand Up @@ -209,7 +209,7 @@ def update(
result = self._update(timeout=timeout, **actor_fields.model_dump(by_alias=True, exclude_none=True))
return ActorResponse.model_validate(result).data

def delete(self, *, timeout: Timeout = 'long') -> None:
def delete(self, *, timeout: Timeout = 'short') -> None:
"""Delete the Actor.

https://docs.apify.com/api/v2#/reference/actors/actor-object/delete-actor
Expand All @@ -233,7 +233,7 @@ def start(
force_permission_level: ActorPermissionLevel | None = None,
wait_for_finish: int | None = None,
webhooks: list[dict] | None = None,
timeout: Timeout = 'long',
timeout: Timeout = 'medium',
) -> Run:
"""Start the Actor and immediately return the Run object.

Expand Down Expand Up @@ -310,7 +310,7 @@ def call(
force_permission_level: ActorPermissionLevel | None = None,
wait_duration: timedelta | None = None,
logger: Logger | None | Literal['default'] = 'default',
timeout: Timeout = 'long',
timeout: Timeout = 'no_timeout',
) -> Run | None:
"""Start the Actor and wait for it to finish before returning the Run object.

Expand Down Expand Up @@ -386,7 +386,7 @@ def build(
tag: str | None = None,
use_cache: bool | None = None,
wait_for_finish: int | None = None,
timeout: Timeout = 'long',
timeout: Timeout = 'medium',
) -> Build:
"""Build the Actor.

Expand Down Expand Up @@ -444,7 +444,7 @@ def default_build(
self,
*,
wait_for_finish: int | None = None,
timeout: Timeout = 'long',
timeout: Timeout = 'short',
) -> BuildClient:
"""Retrieve Actor's default build.

Expand Down Expand Up @@ -533,7 +533,7 @@ def validate_input(
*,
build_tag: str | None = None,
content_type: str | None = None,
timeout: Timeout = 'long',
timeout: Timeout = 'short',
) -> bool:
"""Validate an input for the Actor that defines an input schema.

Expand Down Expand Up @@ -581,7 +581,7 @@ def __init__(
**kwargs,
)

async def get(self, *, timeout: Timeout = 'long') -> Actor | None:
async def get(self, *, timeout: Timeout = 'short') -> Actor | None:
"""Retrieve the Actor.

https://docs.apify.com/api/v2#/reference/actors/actor-object/get-actor
Expand Down Expand Up @@ -625,7 +625,7 @@ async def update(
pricing_infos: list[dict[str, Any]] | None = None,
actor_permission_level: ActorPermissionLevel | None = None,
tagged_builds: dict[str, None | dict[str, str]] | None = None,
timeout: Timeout = 'long',
timeout: Timeout = 'short',
) -> Actor:
"""Update the Actor with the specified fields.

Expand Down Expand Up @@ -705,7 +705,7 @@ async def update(
result = await self._update(timeout=timeout, **actor_fields.model_dump(by_alias=True, exclude_none=True))
return ActorResponse.model_validate(result).data

async def delete(self, *, timeout: Timeout = 'long') -> None:
async def delete(self, *, timeout: Timeout = 'short') -> None:
"""Delete the Actor.

https://docs.apify.com/api/v2#/reference/actors/actor-object/delete-actor
Expand All @@ -729,7 +729,7 @@ async def start(
force_permission_level: ActorPermissionLevel | None = None,
wait_for_finish: int | None = None,
webhooks: list[dict] | None = None,
timeout: Timeout = 'long',
timeout: Timeout = 'medium',
) -> Run:
"""Start the Actor and immediately return the Run object.

Expand Down Expand Up @@ -806,7 +806,7 @@ async def call(
force_permission_level: ActorPermissionLevel | None = None,
wait_duration: timedelta | None = None,
logger: Logger | None | Literal['default'] = 'default',
timeout: Timeout = 'long',
timeout: Timeout = 'no_timeout',
) -> Run | None:
"""Start the Actor and wait for it to finish before returning the Run object.

Expand Down Expand Up @@ -886,7 +886,7 @@ async def build(
tag: str | None = None,
use_cache: bool | None = None,
wait_for_finish: int | None = None,
timeout: Timeout = 'long',
timeout: Timeout = 'medium',
) -> Build:
"""Build the Actor.

Expand Down Expand Up @@ -944,7 +944,7 @@ async def default_build(
self,
*,
wait_for_finish: int | None = None,
timeout: Timeout = 'long',
timeout: Timeout = 'short',
) -> BuildClientAsync:
"""Retrieve Actor's default build.

Expand Down Expand Up @@ -1033,7 +1033,7 @@ async def validate_input(
*,
build_tag: str | None = None,
content_type: str | None = None,
timeout: Timeout = 'long',
timeout: Timeout = 'short',
) -> bool:
"""Validate an input for the Actor that defines an input schema.

Expand Down
8 changes: 4 additions & 4 deletions src/apify_client/_resource_clients/actor_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def list(
offset: int | None = None,
desc: bool | None = None,
sort_by: Literal['createdAt', 'stats.lastRunStartedAt'] | None = 'createdAt',
timeout: Timeout = 'long',
timeout: Timeout = 'medium',
) -> ListOfActors:
"""List the Actors the user has created or used.

Expand Down Expand Up @@ -94,7 +94,7 @@ def create(
actor_standby_idle_timeout: timedelta | None = None,
actor_standby_build: str | None = None,
actor_standby_memory_mbytes: int | None = None,
timeout: Timeout = 'long',
timeout: Timeout = 'medium',
) -> Actor:
"""Create a new Actor.

Expand Down Expand Up @@ -194,7 +194,7 @@ async def list(
offset: int | None = None,
desc: bool | None = None,
sort_by: Literal['createdAt', 'stats.lastRunStartedAt'] | None = 'createdAt',
timeout: Timeout = 'long',
timeout: Timeout = 'medium',
) -> ListOfActors:
"""List the Actors the user has created or used.

Expand Down Expand Up @@ -239,7 +239,7 @@ async def create(
actor_standby_idle_timeout: timedelta | None = None,
actor_standby_build: str | None = None,
actor_standby_memory_mbytes: int | None = None,
timeout: Timeout = 'long',
timeout: Timeout = 'medium',
) -> Actor:
"""Create a new Actor.

Expand Down
12 changes: 6 additions & 6 deletions src/apify_client/_resource_clients/actor_env_var.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __init__(
**kwargs,
)

def get(self, *, timeout: Timeout = 'long') -> EnvVar | None:
def get(self, *, timeout: Timeout = 'short') -> EnvVar | None:
"""Return information about the Actor environment variable.

https://docs.apify.com/api/v2#/reference/actors/environment-variable-object/get-environment-variable
Expand All @@ -53,7 +53,7 @@ def update(
is_secret: bool | None = None,
name: str,
value: str,
timeout: Timeout = 'long',
timeout: Timeout = 'short',
) -> EnvVar:
"""Update the Actor environment variable with specified fields.

Expand All @@ -74,7 +74,7 @@ def update(
)
return EnvVarResponse.model_validate(result).data

def delete(self, *, timeout: Timeout = 'long') -> None:
def delete(self, *, timeout: Timeout = 'short') -> None:
"""Delete the Actor environment variable.

https://docs.apify.com/api/v2#/reference/actors/environment-variable-object/delete-environment-variable
Expand Down Expand Up @@ -106,7 +106,7 @@ def __init__(
**kwargs,
)

async def get(self, *, timeout: Timeout = 'long') -> EnvVar | None:
async def get(self, *, timeout: Timeout = 'short') -> EnvVar | None:
"""Return information about the Actor environment variable.

https://docs.apify.com/api/v2#/reference/actors/environment-variable-object/get-environment-variable
Expand All @@ -128,7 +128,7 @@ async def update(
is_secret: bool | None = None,
name: str,
value: str,
timeout: Timeout = 'long',
timeout: Timeout = 'short',
) -> EnvVar:
"""Update the Actor environment variable with specified fields.

Expand All @@ -149,7 +149,7 @@ async def update(
)
return EnvVarResponse.model_validate(result).data

async def delete(self, *, timeout: Timeout = 'long') -> None:
async def delete(self, *, timeout: Timeout = 'short') -> None:
"""Delete the Actor environment variable.

https://docs.apify.com/api/v2#/reference/actors/environment-variable-object/delete-environment-variable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def __init__(
**kwargs,
)

def list(self, *, timeout: Timeout = 'long') -> ListOfEnvVars:
def list(self, *, timeout: Timeout = 'short') -> ListOfEnvVars:
"""List the available Actor environment variables.

https://docs.apify.com/api/v2#/reference/actors/environment-variable-collection/get-list-of-environment-variables
Expand All @@ -49,7 +49,7 @@ def create(
is_secret: bool | None = None,
name: str,
value: str,
timeout: Timeout = 'long',
timeout: Timeout = 'short',
) -> EnvVar:
"""Create a new Actor environment variable.

Expand Down Expand Up @@ -90,7 +90,7 @@ def __init__(
**kwargs,
)

async def list(self, *, timeout: Timeout = 'long') -> ListOfEnvVars:
async def list(self, *, timeout: Timeout = 'short') -> ListOfEnvVars:
"""List the available Actor environment variables.

https://docs.apify.com/api/v2#/reference/actors/environment-variable-collection/get-list-of-environment-variables
Expand All @@ -110,7 +110,7 @@ async def create(
is_secret: bool | None = None,
name: str,
value: str,
timeout: Timeout = 'long',
timeout: Timeout = 'short',
) -> EnvVar:
"""Create a new Actor environment variable.

Expand Down
12 changes: 6 additions & 6 deletions src/apify_client/_resource_clients/actor_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def __init__(
**kwargs,
)

def get(self, *, timeout: Timeout = 'long') -> Version | None:
def get(self, *, timeout: Timeout = 'short') -> Version | None:
"""Return information about the Actor version.

https://docs.apify.com/api/v2#/reference/actors/version-object/get-version
Expand All @@ -76,7 +76,7 @@ def update(
git_repo_url: str | None = None,
tarball_url: str | None = None,
github_gist_url: str | None = None,
timeout: Timeout = 'long',
timeout: Timeout = 'short',
) -> Version:
"""Update the Actor version with specified fields.

Expand Down Expand Up @@ -115,7 +115,7 @@ def update(
result = self._update(timeout=timeout, **version_fields.model_dump(by_alias=True, exclude_none=True))
return VersionResponse.model_validate(result).data

def delete(self, *, timeout: Timeout = 'long') -> None:
def delete(self, *, timeout: Timeout = 'short') -> None:
"""Delete the Actor version.

https://docs.apify.com/api/v2#/reference/actors/version-object/delete-version
Expand Down Expand Up @@ -165,7 +165,7 @@ def __init__(
**kwargs,
)

async def get(self, *, timeout: Timeout = 'long') -> Version | None:
async def get(self, *, timeout: Timeout = 'short') -> Version | None:
"""Return information about the Actor version.

https://docs.apify.com/api/v2#/reference/actors/version-object/get-version
Expand All @@ -192,7 +192,7 @@ async def update(
git_repo_url: str | None = None,
tarball_url: str | None = None,
github_gist_url: str | None = None,
timeout: Timeout = 'long',
timeout: Timeout = 'short',
) -> Version:
"""Update the Actor version with specified fields.

Expand Down Expand Up @@ -231,7 +231,7 @@ async def update(
result = await self._update(timeout=timeout, **version_fields.model_dump(by_alias=True, exclude_none=True))
return VersionResponse.model_validate(result).data

async def delete(self, *, timeout: Timeout = 'long') -> None:
async def delete(self, *, timeout: Timeout = 'short') -> None:
"""Delete the Actor version.

https://docs.apify.com/api/v2#/reference/actors/version-object/delete-version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def __init__(
**kwargs,
)

def list(self, *, timeout: Timeout = 'long') -> ListOfVersions:
def list(self, *, timeout: Timeout = 'short') -> ListOfVersions:
"""List the available Actor versions.

https://docs.apify.com/api/v2#/reference/actors/version-collection/get-list-of-versions
Expand All @@ -70,7 +70,7 @@ def create(
git_repo_url: str | None = None,
tarball_url: str | None = None,
github_gist_url: str | None = None,
timeout: Timeout = 'long',
timeout: Timeout = 'short',
) -> Version:
"""Create a new Actor version.

Expand Down Expand Up @@ -131,7 +131,7 @@ def __init__(
**kwargs,
)

async def list(self, *, timeout: Timeout = 'long') -> ListOfVersions:
async def list(self, *, timeout: Timeout = 'short') -> ListOfVersions:
"""List the available Actor versions.

https://docs.apify.com/api/v2#/reference/actors/version-collection/get-list-of-versions
Expand All @@ -157,7 +157,7 @@ async def create(
git_repo_url: str | None = None,
tarball_url: str | None = None,
github_gist_url: str | None = None,
timeout: Timeout = 'long',
timeout: Timeout = 'short',
) -> Version:
"""Create a new Actor version.

Expand Down
Loading