update_metadata
update_metadata
Service for updating metadata on a scenario.
Classes
UpdateMetadataRunner
Bases: BaseRunner[Dict[str, Any]]
Runner for updating metadata fields on a scenario through the main scenario endpoint.
PUT /api/v3/scenarios/{scenario_id}
Functions
run
staticmethod
Update metadata for a scenario.
Fields in META_KEYS are set directly on the scenario. Other fields are automatically merged and nested under the 'metadata' field.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
BaseClient
|
The HTTP client to use |
required |
scenario
|
Any
|
The scenario object (must have an 'id' attribute) |
required |
metadata
|
Dict[str, Any]
|
Dictionary of metadata updates to apply |
required |
**kwargs
|
Any
|
Additional arguments passed to the request |
{}
|
Example usage
result = UpdateMetadataRunner.run( client=client, scenario=scenario, metadata={ "end_year": 2050, "private": True, "area_code": "nl", } )