From 7ca0d2311d3199bb9dfcd3a3e88dc1fe375be1fb Mon Sep 17 00:00:00 2001 From: Vlada Dusek Date: Tue, 27 Jan 2026 09:16:17 +0100 Subject: [PATCH 1/3] fix: Add missing tagged_builds parameter to Actor update method Add support for the missing `tagged_builds` parameter in the Actor update method, allowing users to create, update, or remove build tags. The parameter accepts a dictionary mapping tag names to either: - A dict with 'build_id' key to assign/reassign a tag - None to remove a tag Related JS client issue: https://github.com/apify/apify-client-js/issues/829 Closes #585 Co-Authored-By: Claude Sonnet 4.5 --- src/apify_client/clients/resource_clients/actor.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/apify_client/clients/resource_clients/actor.py b/src/apify_client/clients/resource_clients/actor.py index c9b206dc..18bc1998 100644 --- a/src/apify_client/clients/resource_clients/actor.py +++ b/src/apify_client/clients/resource_clients/actor.py @@ -60,6 +60,7 @@ def get_actor_representation( actor_standby_memory_mbytes: int | None = None, pricing_infos: list[dict] | None = None, actor_permission_level: ActorPermissionLevel | None = None, + tagged_builds: dict | None = None, ) -> dict: """Get dictionary representation of the Actor.""" return { @@ -95,6 +96,7 @@ def get_actor_representation( }, 'pricingInfos': pricing_infos, 'actorPermissionLevel': actor_permission_level, + 'taggedBuilds': tagged_builds, } @@ -143,6 +145,7 @@ def update( actor_standby_memory_mbytes: int | None = None, pricing_infos: list[dict] | None = None, actor_permission_level: ActorPermissionLevel | None = None, + tagged_builds: dict | None = None, ) -> dict: """Update the Actor with the specified fields. @@ -179,6 +182,9 @@ def update( actor_standby_memory_mbytes: The memory in megabytes to use when the Actor is in Standby mode. pricing_infos: A list of objects that describes the pricing of the Actor. actor_permission_level: The permission level of the Actor on Apify platform. + tagged_builds: A dictionary mapping build tag names to their settings. Use it to create, update, + or remove build tags. To assign a tag, provide a dict with 'buildId' key. To remove a tag, + set its value to None. Example: {'latest': {'buildId': 'abc'}, 'beta': None}. Returns: The updated Actor. @@ -209,6 +215,7 @@ def update( actor_standby_memory_mbytes=actor_standby_memory_mbytes, pricing_infos=pricing_infos, actor_permission_level=actor_permission_level, + tagged_builds=tagged_builds, ) return self._update(filter_out_none_values_recursively(actor_representation)) @@ -566,6 +573,7 @@ async def update( actor_standby_memory_mbytes: int | None = None, pricing_infos: list[dict] | None = None, actor_permission_level: ActorPermissionLevel | None = None, + tagged_builds: dict | None = None, ) -> dict: """Update the Actor with the specified fields. @@ -602,6 +610,9 @@ async def update( actor_standby_memory_mbytes: The memory in megabytes to use when the Actor is in Standby mode. pricing_infos: A list of objects that describes the pricing of the Actor. actor_permission_level: The permission level of the Actor on Apify platform. + tagged_builds: A dictionary mapping build tag names to their settings. Use it to create, update, + or remove build tags. To assign a tag, provide a dict with 'buildId' key. To remove a tag, + set its value to None. Example: {'latest': {'buildId': 'abc'}, 'beta': None}. Returns: The updated Actor. @@ -632,6 +643,7 @@ async def update( actor_standby_memory_mbytes=actor_standby_memory_mbytes, pricing_infos=pricing_infos, actor_permission_level=actor_permission_level, + tagged_builds=tagged_builds, ) return await self._update(filter_out_none_values_recursively(actor_representation)) From 295974bb3120fe99d87de7b4d67dd749d4df579e Mon Sep 17 00:00:00 2001 From: Vlada Dusek Date: Tue, 27 Jan 2026 10:45:54 +0100 Subject: [PATCH 2/3] Better types --- src/apify_client/clients/resource_clients/actor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/apify_client/clients/resource_clients/actor.py b/src/apify_client/clients/resource_clients/actor.py index 18bc1998..0aac082a 100644 --- a/src/apify_client/clients/resource_clients/actor.py +++ b/src/apify_client/clients/resource_clients/actor.py @@ -60,7 +60,7 @@ def get_actor_representation( actor_standby_memory_mbytes: int | None = None, pricing_infos: list[dict] | None = None, actor_permission_level: ActorPermissionLevel | None = None, - tagged_builds: dict | None = None, + tagged_builds: dict[str, None | dict[str, str]] | None = None, ) -> dict: """Get dictionary representation of the Actor.""" return { @@ -145,7 +145,7 @@ def update( actor_standby_memory_mbytes: int | None = None, pricing_infos: list[dict] | None = None, actor_permission_level: ActorPermissionLevel | None = None, - tagged_builds: dict | None = None, + tagged_builds: dict[str, None | dict[str, str]] | None = None, ) -> dict: """Update the Actor with the specified fields. @@ -573,7 +573,7 @@ async def update( actor_standby_memory_mbytes: int | None = None, pricing_infos: list[dict] | None = None, actor_permission_level: ActorPermissionLevel | None = None, - tagged_builds: dict | None = None, + tagged_builds: dict[str, None | dict[str, str]] | None = None, ) -> dict: """Update the Actor with the specified fields. From 4dd94b6441e0a4b32f46f972f27ad78c6e945905 Mon Sep 17 00:00:00 2001 From: Vlada Dusek Date: Tue, 27 Jan 2026 10:52:21 +0100 Subject: [PATCH 3/3] Better --- src/apify_client/clients/resource_clients/actor.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/apify_client/clients/resource_clients/actor.py b/src/apify_client/clients/resource_clients/actor.py index 15dc5bcd..5a312a40 100644 --- a/src/apify_client/clients/resource_clients/actor.py +++ b/src/apify_client/clients/resource_clients/actor.py @@ -88,6 +88,7 @@ def get_actor_representation( }, 'pricingInfos': pricing_infos, 'actorPermissionLevel': actor_permission_level, + 'taggedBuilds': tagged_builds, } # Only include actorStandby if at least one field is provided @@ -110,10 +111,6 @@ def get_actor_representation( 'memoryMbytes': actor_standby_memory_mbytes, } - # Add taggedBuilds if provided - if tagged_builds is not None: - actor_dict['taggedBuilds'] = tagged_builds - return actor_dict