@@ -200,8 +200,10 @@ def __init__(
200200 directed_read_options = None ,
201201 observability_options = None ,
202202 default_transaction_options : Optional [DefaultTransactionOptions ] = None ,
203+ experimental_host = None ,
203204 ):
204205 self ._emulator_host = _get_spanner_emulator_host ()
206+ self ._experimental_host = experimental_host
205207
206208 if client_options and type (client_options ) is dict :
207209 self ._client_options = google .api_core .client_options .from_dict (
@@ -212,6 +214,8 @@ def __init__(
212214
213215 if self ._emulator_host :
214216 credentials = AnonymousCredentials ()
217+ elif self ._experimental_host :
218+ credentials = AnonymousCredentials ()
215219 elif isinstance (credentials , AnonymousCredentials ):
216220 self ._emulator_host = self ._client_options .api_endpoint
217221
@@ -324,6 +328,15 @@ def instance_admin_api(self):
324328 client_options = self ._client_options ,
325329 transport = transport ,
326330 )
331+ elif self ._experimental_host :
332+ transport = InstanceAdminGrpcTransport (
333+ channel = grpc .insecure_channel (target = self ._experimental_host )
334+ )
335+ self ._instance_admin_api = InstanceAdminClient (
336+ client_info = self ._client_info ,
337+ client_options = self ._client_options ,
338+ transport = transport ,
339+ )
327340 else :
328341 self ._instance_admin_api = InstanceAdminClient (
329342 credentials = self .credentials ,
@@ -345,6 +358,15 @@ def database_admin_api(self):
345358 client_options = self ._client_options ,
346359 transport = transport ,
347360 )
361+ elif self ._experimental_host :
362+ transport = DatabaseAdminGrpcTransport (
363+ channel = grpc .insecure_channel (target = self ._experimental_host )
364+ )
365+ self ._database_admin_api = DatabaseAdminClient (
366+ client_info = self ._client_info ,
367+ client_options = self ._client_options ,
368+ transport = transport ,
369+ )
348370 else :
349371 self ._database_admin_api = DatabaseAdminClient (
350372 credentials = self .credentials ,
@@ -485,6 +507,7 @@ def instance(
485507 self ._emulator_host ,
486508 labels ,
487509 processing_units ,
510+ self ._experimental_host ,
488511 )
489512
490513 def list_instances (self , filter_ = "" , page_size = None ):
0 commit comments