SpecificationProperties#

class ansys.dpf.core.operator_specification.SpecificationProperties(user_name: str | None = None, category: str | None = None, scripting_name: str | None = None, exposure: Exposures = Exposures.public, plugin: str | None = None, license: str = None, spec=None, **kwargs)#

Properties of an Operator.

Parameters:
  • user_name (str) – Readable lower case name of the Operator. example: “custom operator”.

  • category (str, Categories) – Choose from Categories options. Arrange the different Operators in the documentation and in the code generation.

  • scripting_name (str) – Snake case name of the Operator. example: “custom_operator”.

  • exposure (Exposures) – Public by default, a hidden or private Operator doesn’t appear in the documentation.

  • plugin (str) – Snake case name of the plugin it belongs to.

  • license (str) – Optional license name to check out that is used to run the operator. The value “any_dpf_supported_increments” tells DPF than any DPF-accepted license is accepted by this operator (see here). # noqa

Overview#

__repr__

Return a string representation of the SpecificationProperties instance.

__setitem__

Set the value of a specified attribute.

__getitem__

Get the value of a specified attribute.

__eq__

Check if two SpecificationProperties instances are equal.

Import detail#

from ansys.dpf.core.operator_specification import SpecificationProperties

Method detail#

SpecificationProperties.__repr__()#

Return a string representation of the SpecificationProperties instance.

Returns:

A string representation of the instance, including all attributes and their values.

Return type:

str

SpecificationProperties.__setitem__(key, value)#

Set the value of a specified attribute.

If a specification is defined, the value is also updated in the operator specification.

Parameters:
  • key (str) – The name of the attribute to set.

  • value (any) – The value to assign to the attribute.

SpecificationProperties.__getitem__(item: str)#

Get the value of a specified attribute.

Parameters:

item (str) – The name of the attribute to retrieve.

Returns:

The value of the specified attribute.

Return type:

any

SpecificationProperties.__eq__(other)#

Check if two SpecificationProperties instances are equal.

Parameters:

other (SpecificationProperties) – The other instance to compare against.

Returns:

True if the two instances have the same attributes and values, False otherwise.

Return type:

bool