update_inputs
update_inputs
Service for updating inputs on a session.
Classes
UpdateInputsRunner
Bases: BaseRunner[Dict[str, Any]]
Runner for updating inputs on a scenario through the main scenario endpoint.
PUT /api/v3/scenarios/{scenario_id}
Functions
build_request
staticmethod
Build input update request for concurrent batching.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scenario
|
Any
|
The scenario object (must have an 'id' attribute) |
required |
inputs
|
Dict[str, Any]
|
Dictionary of input updates to apply |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Request dict ready for AsyncBatchRunner |
Source code in src/pyetm/services/scenario_runners/update_inputs.py
run
staticmethod
Update inputs for a scenario.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
BaseClient
|
The HTTP client to use |
required |
scenario
|
Any
|
The scenario object (must have an 'id' attribute) |
required |
inputs
|
Dict[str, Any]
|
Dictionary of input updates to apply (input_key -> value) |
required |
**kwargs
|
Any
|
Additional arguments passed to the request |
{}
|
Example usage
result = UpdateInputsRunner.run( client=client, scenario=scenario, inputs={ "input_key_1": 42.5, "input_key_2": 100.0, } )