DynamicData¶
- model.DynamicData()¶
- Returns:
A new DynamicData object with an empty dictionary
- Return type:
DynamicData
Creates a new DynamicData object with an empty dictionary.
- model.DynamicData(datadict)¶
- Parameters:
datadict (object) – Dictionary-like object to populate the DynamicData
- Returns:
A new DynamicData object initialized with the provided dictionary data
- Return type:
DynamicData
Creates a new DynamicData object initialized with data from an existing dictionary-like object.
- model.GetValue(key)¶
- Parameters:
key (str) – Dictionary key to look up
- Returns:
The value associated with the key, or null if key doesn’t exist
- Return type:
object
Gets a value from the DynamicData dictionary by key.
- model.Remove(name)¶
- Parameters:
name (str) – Dictionary key to remove
Removes an entry from the DynamicData dictionary by key if it exists.
- model.AddValue(name, value)¶
- Parameters:
name (str) – Dictionary key to add or update
value (object) – Value to store
Adds or updates a value in the DynamicData dictionary.
- model.SetValue(name, value)¶
- Parameters:
name (str) – Dictionary key to add or update
value (str) – String value to store (will be converted to appropriate type if possible)
Adds or updates a value in the DynamicData dictionary, attempting to convert string values to numeric types if appropriate.
- model.ToString()¶
- Returns:
JSON string representation of the DynamicData dictionary
- Return type:
str
Returns a formatted JSON string representation of the DynamicData object.
- model.ToFlatString()¶
- Returns:
Flat JSON string representation with empty values removed and single quotes escaped
- Return type:
str
Returns a flat JSON string representation of the DynamicData object with empty values removed.
- model.Keys(metadata)¶
- Parameters:
metadata (DynamicData) – Optional metadata for filtering keys
- Returns:
List of keys in the DynamicData dictionary
- Return type:
List[str]
Returns a list of keys in the DynamicData dictionary, optionally filtered by metadata.
- model.SpecialKeys(metadata)¶
- Parameters:
metadata (DynamicData) – Metadata for identifying special keys
- Returns:
List of keys marked as special in the metadata
- Return type:
List[str]
Returns a list of keys from the metadata that are marked as special.