narupa.imd.imd_client module¶
-
class
narupa.imd.imd_client.ImdClient(*, channel: grpc.Channel, make_channel_owner: bool = False)¶ Bases:
narupa.core.narupa_client.NarupaClientA simple IMD client, primarily for testing the IMD server.
-
close()¶ Closes the IMD client.
-
interactions¶
-
start_interaction() → str¶ Start an interaction
Returns: A unique identifier for the interaction.
-
stop_all_interactions()¶ Stops all active interactions governed by this client.
-
stop_interaction(interaction_id: str) → bool¶ Stops the interaction identified with the given interaction_id on the server.
Parameters: interaction_id – The unique interaction ID, created with start_interaction(), that identifies the interaction to stop.Raises: KeyError, if the given interaction ID does not exist.
-
update_interaction(interaction_id: str, interaction: narupa.imd.particle_interaction.ParticleInteraction)¶ Updates the interaction identified with the given interaction_id on the server with parameters from the given interaction.
Parameters: - interaction_id – The unique interaction ID, created with
start_interaction(), that identifies the interaction to update. - interaction – The :class: ParticleInteraction providing new parameters for the interaction.
Raises: KeyError, if the given interaction ID does not exist.
- interaction_id – The unique interaction ID, created with
-