From 6ba1c9bc775bd9c914850a0918b0bd94212e891b Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Wed, 25 Feb 2026 16:51:22 +0100 Subject: [PATCH] allow to pass project bundle name to bundle methods --- ayon_api/_api.py | 19 ++++++++++++++++++- ayon_api/_api_helpers/bundles_addons.py | 15 +++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/ayon_api/_api.py b/ayon_api/_api.py index 06ece19b0..08b99e59b 100644 --- a/ayon_api/_api.py +++ b/ayon_api/_api.py @@ -2889,6 +2889,7 @@ def get_addon_site_settings( def get_bundle_settings( bundle_name: Optional[str] = None, project_name: Optional[str] = None, + project_bundle_name: Optional[str] = None, variant: Optional[str] = None, site_id: Optional[str] = None, use_site: bool = True, @@ -2928,6 +2929,7 @@ def get_bundle_settings( return con.get_bundle_settings( bundle_name=bundle_name, project_name=project_name, + project_bundle_name=project_bundle_name, variant=variant, site_id=site_id, use_site=use_site, @@ -2936,6 +2938,7 @@ def get_bundle_settings( def get_addons_studio_settings( bundle_name: Optional[str] = None, + project_bundle_name: Optional[str] = None, variant: Optional[str] = None, site_id: Optional[str] = None, use_site: bool = True, @@ -2951,6 +2954,8 @@ def get_addons_studio_settings( Args: bundle_name (Optional[str]): Name of bundle for which should be settings received. + project_bundle_name (Optional[str]): Project bundle name for + which should be settings received. variant (Optional[Literal['production', 'staging']]): Name of settings variant. Used 'default_settings_variant' by default. site_id (Optional[str]): Site id for which want to receive @@ -2968,6 +2973,7 @@ def get_addons_studio_settings( con = get_server_api_connection() return con.get_addons_studio_settings( bundle_name=bundle_name, + project_bundle_name=project_bundle_name, variant=variant, site_id=site_id, use_site=use_site, @@ -2978,6 +2984,7 @@ def get_addons_studio_settings( def get_addons_project_settings( project_name: str, bundle_name: Optional[str] = None, + project_bundle_name: Optional[str] = None, variant: Optional[str] = None, site_id: Optional[str] = None, use_site: bool = True, @@ -3009,6 +3016,8 @@ def get_addons_project_settings( received. bundle_name (Optional[str]): Name of bundle for which should be settings received. + project_bundle_name (Optional[str]): Project bundle name for which + should be settings received. variant (Optional[Literal['production', 'staging']]): Name of settings variant. Used 'default_settings_variant' by default. site_id (Optional[str]): Site id for which want to receive @@ -3028,6 +3037,7 @@ def get_addons_project_settings( return con.get_addons_project_settings( project_name=project_name, bundle_name=bundle_name, + project_bundle_name=project_bundle_name, variant=variant, site_id=site_id, use_site=use_site, @@ -3037,6 +3047,7 @@ def get_addons_project_settings( def get_addons_settings( bundle_name: Optional[str] = None, + project_bundle_name: Optional[str] = None, project_name: Optional[str] = None, variant: Optional[str] = None, site_id: Optional[str] = None, @@ -3056,6 +3067,8 @@ def get_addons_settings( Args: bundle_name (Optional[str]): Name of bundle for which should be settings received. + project_bundle_name (Optional[str]): Name of project bundle + for which should be settings received. project_name (Optional[str]): Name of project for which should be settings received. variant (Optional[Literal['production', 'staging']]): Name of @@ -3072,6 +3085,7 @@ def get_addons_settings( con = get_server_api_connection() return con.get_addons_settings( bundle_name=bundle_name, + project_bundle_name=project_bundle_name, project_name=project_name, variant=variant, site_id=site_id, @@ -6887,6 +6901,7 @@ def create_link( output_id: str, output_type: str, link_name: Optional[str] = None, + data: Optional[dict[str, Any]] = None, ) -> CreateLinkData: """Create link between 2 entities. @@ -6906,7 +6921,8 @@ def create_link( output_id (str): Output entity id. output_type (str): Entity type of output entity. link_name (Optional[str]): Name of link. - Available from server version '1.0.0-rc.6'. + data (Optional[dict[str, Any]]): Additional data to be stored + with the link. Returns: CreateLinkData: Information about link. @@ -6924,6 +6940,7 @@ def create_link( output_id=output_id, output_type=output_type, link_name=link_name, + data=data, ) diff --git a/ayon_api/_api_helpers/bundles_addons.py b/ayon_api/_api_helpers/bundles_addons.py index 9fc5de162..9bb7bc214 100644 --- a/ayon_api/_api_helpers/bundles_addons.py +++ b/ayon_api/_api_helpers/bundles_addons.py @@ -671,6 +671,7 @@ def get_bundle_settings( self, bundle_name: Optional[str] = None, project_name: Optional[str] = None, + project_bundle_name: Optional[str] = None, variant: Optional[str] = None, site_id: Optional[str] = None, use_site: bool = True, @@ -714,6 +715,7 @@ def get_bundle_settings( query = prepare_query_string({ "project_name": project_name or None, "bundle_name": bundle_name or None, + "project_bundle_name": project_bundle_name or None, "variant": variant or self.get_default_settings_variant() or None, "site_id": site_id, }) @@ -724,6 +726,7 @@ def get_bundle_settings( def get_addons_studio_settings( self, bundle_name: Optional[str] = None, + project_bundle_name: Optional[str] = None, variant: Optional[str] = None, site_id: Optional[str] = None, use_site: bool = True, @@ -739,6 +742,8 @@ def get_addons_studio_settings( Args: bundle_name (Optional[str]): Name of bundle for which should be settings received. + project_bundle_name (Optional[str]): Project bundle name for + which should be settings received. variant (Optional[Literal['production', 'staging']]): Name of settings variant. Used 'default_settings_variant' by default. site_id (Optional[str]): Site id for which want to receive @@ -755,6 +760,7 @@ def get_addons_studio_settings( """ output = self.get_bundle_settings( bundle_name=bundle_name, + project_bundle_name=project_bundle_name, variant=variant, site_id=site_id, use_site=use_site @@ -770,6 +776,7 @@ def get_addons_project_settings( self, project_name: str, bundle_name: Optional[str] = None, + project_bundle_name: Optional[str] = None, variant: Optional[str] = None, site_id: Optional[str] = None, use_site: bool = True, @@ -801,6 +808,8 @@ def get_addons_project_settings( received. bundle_name (Optional[str]): Name of bundle for which should be settings received. + project_bundle_name (Optional[str]): Project bundle name for which + should be settings received. variant (Optional[Literal['production', 'staging']]): Name of settings variant. Used 'default_settings_variant' by default. site_id (Optional[str]): Site id for which want to receive @@ -822,6 +831,7 @@ def get_addons_project_settings( output = self.get_bundle_settings( project_name=project_name, bundle_name=bundle_name, + project_bundle_name=project_bundle_name, variant=variant, site_id=site_id, use_site=use_site @@ -836,6 +846,7 @@ def get_addons_project_settings( def get_addons_settings( self, bundle_name: Optional[str] = None, + project_bundle_name: Optional[str] = None, project_name: Optional[str] = None, variant: Optional[str] = None, site_id: Optional[str] = None, @@ -855,6 +866,8 @@ def get_addons_settings( Args: bundle_name (Optional[str]): Name of bundle for which should be settings received. + project_bundle_name (Optional[str]): Name of project bundle + for which should be settings received. project_name (Optional[str]): Name of project for which should be settings received. variant (Optional[Literal['production', 'staging']]): Name of @@ -871,6 +884,7 @@ def get_addons_settings( if project_name is None: return self.get_addons_studio_settings( bundle_name=bundle_name, + project_bundle_name=project_bundle_name, variant=variant, site_id=site_id, use_site=use_site, @@ -880,6 +894,7 @@ def get_addons_settings( return self.get_addons_project_settings( project_name=project_name, bundle_name=bundle_name, + project_bundle_name=project_bundle_name, variant=variant, site_id=site_id, use_site=use_site,