class documentation
class Property(BaseType): (source)
Known subclasses: fiftyone.operators.types.ViewTargetProperty
Constructor: Property(type, **kwargs)
Represents a property on an fiftyone.operators.Operator
.
Properties are used to define the data that an operator can accept as input and return as output.
Properties may also define a View
that can be used to customize
how the property behaves in the FiftyOne App.
Examples:
import fiftyone.operators.types as types my_object = types.Object() # Define a string property my_object.str("name", label="Name", description="a description") # Define an enum property with a custom view radio_group = types.RadioGroup() radio_group.add_choice("car", "A brand new car") radio_group.add_choice("truck", "A fancy truck") my_object.enum("type", radio_group.values(), view=radio_group)
Parameters | |
type | the type of the property |
invalid | whether the property is invalid |
default | the default value of the property |
required | whether the property is required |
error | the error message of the property |
view | the View of the property |
Method | __init__ |
Undocumented |
Method | to |
Undocumented |
Instance Variable | choices |
Undocumented |
Instance Variable | default |
Undocumented |
Instance Variable | error |
Undocumented |
Instance Variable | invalid |
Undocumented |
Instance Variable | on |
Undocumented |
Instance Variable | required |
Undocumented |
Instance Variable | type |
Undocumented |
Instance Variable | view |
Undocumented |