@@ -71,9 +71,12 @@ class StackQL:
7171 :param max_depth: Max depth for indirect queries: views and subqueries
7272 (defaults to `5`, not supported in `server_mode`)
7373 :type max_depth: int, optional
74+ :param custom_registry: Custom StackQL provider registry URL
75+ (e.g. https://registry-dev.stackql.app/providers) supplied using the class constructor
76+ :type custom_registry: str, optional
7477 :param custom_auth: Custom StackQL provider authentication object supplied using the class constructor
7578 (not supported in `server_mode`)
76- :type auth : dict, optional
79+ :type custom_auth : dict, optional
7780 :param debug: Enable debug logging
7881 (defaults to `False`)
7982 :type debug: bool, optional
@@ -212,6 +215,7 @@ def __init__(self,
212215 app_root = None ,
213216 execution_concurrency_limit = 1 ,
214217 output = 'dict' ,
218+ custom_registry = None ,
215219 custom_auth = None ,
216220 sep = ',' ,
217221 header = False ,
@@ -323,6 +327,14 @@ def __init__(self,
323327 self .params .append ("--auth" )
324328 self .params .append (authstr )
325329
330+ # if custom_registry is set, use it
331+ if custom_registry is not None :
332+ self .custom_registry = custom_registry
333+ custom_reg_obj = { "url" : custom_registry }
334+ custom_reg_str = json .dumps (custom_reg_obj )
335+ self .params .append ("--registry" )
336+ self .params .append (custom_reg_str )
337+
326338 # csv output
327339 if self .output == "csv" :
328340 self .sep = sep
0 commit comments