settings#

Wrapper to settings gRPC service of CFX.

Classes:

SettingsService(channel, metadata, ...)

Service for accessing and modifying CFX settings.

class ansys.cfx.core.services.settings.SettingsService(channel, metadata, engine_eval, cfx_error_state)#

Bases: object

Service for accessing and modifying CFX settings.

Methods:

__init__(channel, metadata, engine_eval, ...)

Initialize an instance of the SettingsService class.

create(path, name)

Create a named object child for the given path.

delete(path, name)

Delete the object with the given name at the given path.

execute_cmd(path, command, **kwds)

Execute a given command with the provided keyword arguments.

execute_query(path, query, **kwds)

Execute a given query with the provided keyword arguments.

get_attrs(path, attrs[, recursive])

Return values of given attributes.

get_list_size(path)

Get the number of elements in a list object.

get_object_names(path)

Get a list of named objects.

get_static_info()

Get static information for settings.

get_var(path)

Get the value for the given path.

has_wildcard(name)

Check if a name has a wildcard pattern.

is_interactive_mode()

Check if commands can be executed interactively.

rename(path, new, old)

Rename the object at the given path.

resize_list_object(path, size)

Resize a list object.

set_var(path, value)

Set the value for the given path.

__init__(channel, metadata, engine_eval, cfx_error_state) None#

Initialize an instance of the SettingsService class.

create(path: str, name: str) None#

Create a named object child for the given path.

delete(path: str, name: str) None#

Delete the object with the given name at the given path.

execute_cmd(path: str, command: str, **kwds) Any#

Execute a given command with the provided keyword arguments.

execute_query(path: str, query: str, **kwds) Any#

Execute a given query with the provided keyword arguments.

get_attrs(path: str, attrs: list[str], recursive: bool = False) Any#

Return values of given attributes.

get_list_size(path: str) int#

Get the number of elements in a list object.

get_object_names(path: str) list[str]#

Get a list of named objects.

get_static_info() dict[str, Any]#

Get static information for settings.

Raises:
RuntimeError

If type is empty.

get_var(path: str) Any#

Get the value for the given path.

has_wildcard(name: str) bool#

Check if a name has a wildcard pattern.

is_interactive_mode() bool#

Check if commands can be executed interactively.

rename(path: str, new: str, old: str) None#

Rename the object at the given path.

resize_list_object(path: str, size: int) None#

Resize a list object.

set_var(path: str, value: Any) None#

Set the value for the given path.