kittycad.models.modeling_cmd

Classes

camera_drag_end(**data)

Camera drag ended.

camera_drag_move(**data)

Camera drag continued.

camera_drag_start(**data)

Camera drag started.

center_of_mass(**data)

Get the center of mass of entities in the scene or the default scene.

close_path(**data)

Closes a path, converting it to a 2D solid.

curve_get_control_points(**data)

Get control points of a given curve.

curve_get_end_points(**data)

Find the start and end of a curve.

curve_get_type(**data)

Get type of a given curve.

curve_set_constraint(**data)

Constrain a curve.

default_camera_disable_sketch_mode(**data)

Disable sketch mode, from the default camera.

default_camera_enable_sketch_mode(**data)

Enable sketch mode, where users can sketch 2D geometry.

default_camera_focus_on(**data)

Focus default camera on object.

default_camera_look_at(**data)

Change what the default camera is looking at.

default_camera_zoom(**data)

Adjust zoom of the default camera.

density(**data)

Get the density of entities in the scene or the default scene.

edit_mode_enter(**data)

Enter edit mode

edit_mode_exit(**data)

Exit edit mode

entity_fade(**data)

Fade the entity in or out.

entity_get_all_child_uuids(**data)

What are all UUIDs of this entity's children?

entity_get_child_uuid(**data)

What is the UUID of this entity's n-th child?

entity_get_num_children(**data)

How many children does the entity have?

entity_get_parent_id(**data)

What is this entity's parent?

entity_set_opacity(**data)

Set opacity of the entity.

export(**data)

Export the scene to a file.

extend_path(**data)

Extend a path by adding a new segment which starts at the path's "pen".

extrude(**data)

Extrude a 2D solid.

get_entity_type(**data)

What type of entity is this?

get_sketch_mode_plane(**data)

Get the plane of the sketch mode.

handle_mouse_drag_end(**data)

Stop dragging mouse.

handle_mouse_drag_move(**data)

Continue dragging mouse.

handle_mouse_drag_start(**data)

Start dragging mouse.

highlight_set_entities(**data)

Changes the current highlighted entity to these entities.

highlight_set_entity(**data)

Changes the current highlighted entity to whichever one is at the given window coordinate.

import_files(**data)

Import files to the current model.

make_axes_gizmo(**data)

Add a gizmo showing the axes.

make_plane(**data)

Make a plane.

mass(**data)

Get the mass of entities in the scene or the default scene.

mouse_click(**data)

Send a mouse click event.

mouse_move(**data)

Send a mouse move event.

move_path_pen(**data)

Move the path's "pen".

new_annotation(**data)

Create a new annotation

object_bring_to_front(**data)

Bring an object to the front of the scene

object_visible(**data)

Hide or show an object

path_get_curve_uuids_for_vertices(**data)

Get curves for vertices within a path

path_get_info(**data)

Query the given path

path_get_vertex_uuids(**data)

Get vertices within a path

plane_intersect_and_project(**data)

Utility method.

plane_set_color(**data)

Set the plane's color.

reconfigure_stream(**data)

Reconfigure the stream.

remove_scene_objects(**data)

Remove scene objects.

select_add(**data)

Adds one or more entities (by UUID) to the selection.

select_clear(**data)

Clear the selection

select_get(**data)

Find all IDs of selected entities

select_remove(**data)

Removes one or more entities (by UUID) from the selection.

select_replace(**data)

Replaces the current selection with these new entities (by UUID).

select_with_point(**data)

Modifies the selection by simulating a "mouse click" at the given x,y window coordinate Returns ID of whatever was selected.

send_object(**data)

Sends object to front or back.

set_tool(**data)

Set the active tool.

sketch_mode_disable(**data)

Disable sketch mode.

sketch_mode_enable(**data)

Enable sketch mode on the given plane.

solid2d_add_hole(**data)

Add a hole to a Solid2d object before extruding it.

solid3d_get_all_edge_faces(**data)

Gets all faces which use the given edge.

solid3d_get_all_opposite_edges(**data)

Gets all edges which are opposite the given edge, across all possible faces.

solid3d_get_next_adjacent_edge(**data)

Gets the next adjacent edge for the given edge, along the given face.

solid3d_get_opposite_edge(**data)

Gets the edge opposite the given edge, along the given face.

solid3d_get_prev_adjacent_edge(**data)

Gets the previous adjacent edge for the given edge, along the given face.

start_path(**data)

Start a path.

surface_area(**data)

Get the surface area of entities in the scene or the default scene.

take_snapshot(**data)

Take a snapshot.

update_annotation(**data)

Update an annotation

volume(**data)

Get the volume of entities in the scene or the default scene.

class kittycad.models.modeling_cmd.camera_drag_end(**data)[source][source]

Camera drag ended.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'interaction': <enum 'CameraDragInteractionType'>, 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'type': typing.Literal['camera_drag_end'], 'window': <class 'kittycad.models.point2d.Point2d'>}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'interaction': FieldInfo(annotation=CameraDragInteractionType, required=True), 'type': FieldInfo(annotation=Literal['camera_drag_end'], required=False, default='camera_drag_end'), 'window': FieldInfo(annotation=Point2d, required=True)}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.camera_drag_end'>, 'config': {'title': 'camera_drag_end'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.camera_drag_end'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.camera_drag_end'>>]}, 'ref': 'kittycad.models.modeling_cmd.camera_drag_end:93825018872480', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'interaction': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'lax_schema': {'steps': [{'type': 'str'}, {'type': 'function-plain', 'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}}], 'type': 'chain'}, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_functions': [<function get_enum_core_schema.<locals>.get_json_schema>]}, 'ref': 'kittycad.models.camera_drag_interaction_type.CameraDragInteractionType:93825016553120', 'strict_schema': {'json_schema': {'function': {'function': <function get_enum_core_schema.<locals>.to_enum>, 'type': 'no-info'}, 'schema': {'type': 'str'}, 'type': 'function-after'}, 'python_schema': {'cls': <enum 'CameraDragInteractionType'>, 'type': 'is-instance'}, 'type': 'json-or-python'}, 'type': 'lax-or-strict'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'camera_drag_end', 'schema': {'expected': ['camera_drag_end'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}, 'window': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'cls': <class 'kittycad.models.point2d.Point2d'>, 'config': {'title': 'Point2d'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.point2d.Point2d'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.point2d.Point2d'>>]}, 'ref': 'kittycad.models.point2d.Point2d:93825018798944', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'x': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}, 'y': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}}, 'model_name': 'Point2d', 'type': 'model-fields'}, 'type': 'model'}, 'type': 'model-field'}}, 'model_name': 'camera_drag_end', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556ebc2a0,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "interaction": SerField {                         key_py: Py(                             0x00007fffff4aa830,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             JsonOrPython(                                 JsonOrPythonSerializer {                                     json: Str(                                         StrSerializer,                                     ),                                     python: Any(                                         AnySerializer,                                     ),                                     name: "json-or-python[json=str, python=any]",                                 },                             ),                         ),                         required: true,                     },                     "window": SerField {                         key_py: Py(                             0x00007ffffdca04f0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Model(                                 ModelSerializer {                                     class: Py(                                         0x0000555556eaa360,                                     ),                                     serializer: Fields(                                         GeneralFieldsSerializer {                                             fields: {                                                 "x": SerField {                                                     key_py: Py(                                                         0x00007fffff8fe870,                                                     ),                                                     alias: None,                                                     alias_py: None,                                                     serializer: Some(                                                         Float(                                                             FloatSerializer {                                                                 inf_nan_mode: Null,                                                             },                                                         ),                                                     ),                                                     required: true,                                                 },                                                 "y": SerField {                                                     key_py: Py(                                                         0x00007fffff72a730,                                                     ),                                                     alias: None,                                                     alias_py: None,                                                     serializer: Some(                                                         Float(                                                             FloatSerializer {                                                                 inf_nan_mode: Null,                                                             },                                                         ),                                                     ),                                                     required: true,                                                 },                                             },                                             computed_fields: Some(                                                 ComputedFields(                                                     [],                                                 ),                                             ),                                             mode: SimpleDict,                                             extra_serializer: None,                                             filter: SchemaFilter {                                                 include: None,                                                 exclude: None,                                             },                                             required_fields: 2,                                         },                                     ),                                     has_extra: false,                                     root_model: false,                                     name: "Point2d",                                 },                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe10bbab0,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "camera_drag_end",                                             },                                             expected_py: None,                                             name: "literal['camera_drag_end']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 3,             },         ),         has_extra: false,         root_model: false,         name: "camera_drag_end",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="camera_drag_end", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "interaction",                         lookup_key: Simple {                             key: "interaction",                             py_key: Py(                                 0x00007fffff4aa830,                             ),                             path: LookupPath(                                 [                                     S(                                         "interaction",                                         Py(                                             0x00007fffff4aa830,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff4aa830,                         ),                         validator: LaxOrStrict(                             LaxOrStrictValidator {                                 strict: false,                                 lax_validator: Chain(                                     ChainValidator {                                         steps: [                                             Str(                                                 StrValidator {                                                     strict: false,                                                     coerce_numbers_to_str: false,                                                 },                                             ),                                             FunctionPlain(                                                 FunctionPlainValidator {                                                     func: Py(                                                         0x00007fffe1009280,                                                     ),                                                     config: Py(                                                         0x00007fffe1007e40,                                                     ),                                                     name: "function-plain[to_enum()]",                                                     field_name: None,                                                     info_arg: false,                                                 },                                             ),                                         ],                                         name: "chain[str,function-plain[to_enum()]]",                                     },                                 ),                                 strict_validator: JsonOrPython(                                     JsonOrPython {                                         json: FunctionAfter(                                             FunctionAfterValidator {                                                 validator: Str(                                                     StrValidator {                                                         strict: false,                                                         coerce_numbers_to_str: false,                                                     },                                                 ),                                                 func: Py(                                                     0x00007fffe1009280,                                                 ),                                                 config: Py(                                                     0x00007fffe1007e40,                                                 ),                                                 name: "function-after[to_enum(), str]",                                                 field_name: None,                                                 info_arg: false,                                             },                                         ),                                         python: IsInstance(                                             IsInstanceValidator {                                                 class: Py(                                                     0x0000555556c85ea0,                                                 ),                                                 class_repr: "CameraDragInteractionType",                                                 name: "is-instance[CameraDragInteractionType]",                                             },                                         ),                                         name: "json-or-python[json=function-after[to_enum(), str],python=is-instance[CameraDragInteractionType]]",                                     },                                 ),                                 name: "lax-or-strict[lax=chain[str,function-plain[to_enum()]],strict=json-or-python[json=function-after[to_enum(), str],python=is-instance[CameraDragInteractionType]]]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe10bbab0,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "camera_drag_end": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe10bbab0,                                                 ),                                             ],                                         },                                         expected_repr: "'camera_drag_end'",                                         name: "literal['camera_drag_end']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['camera_drag_end']]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "window",                         lookup_key: Simple {                             key: "window",                             py_key: Py(                                 0x00007ffffdca04f0,                             ),                             path: LookupPath(                                 [                                     S(                                         "window",                                         Py(                                             0x00007ffffdca04f0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007ffffdca04f0,                         ),                         validator: Model(                             ModelValidator {                                 revalidate: Never,                                 validator: ModelFields(                                     ModelFieldsValidator {                                         fields: [                                             Field {                                                 name: "x",                                                 lookup_key: Simple {                                                     key: "x",                                                     py_key: Py(                                                         0x00007fffff8fe870,                                                     ),                                                     path: LookupPath(                                                         [                                                             S(                                                                 "x",                                                                 Py(                                                                     0x00007fffff8fe870,                                                                 ),                                                             ),                                                         ],                                                     ),                                                 },                                                 name_py: Py(                                                     0x00007fffff8fe870,                                                 ),                                                 validator: Float(                                                     FloatValidator {                                                         strict: false,                                                         allow_inf_nan: true,                                                     },                                                 ),                                                 frozen: false,                                             },                                             Field {                                                 name: "y",                                                 lookup_key: Simple {                                                     key: "y",                                                     py_key: Py(                                                         0x00007fffff72a730,                                                     ),                                                     path: LookupPath(                                                         [                                                             S(                                                                 "y",                                                                 Py(                                                                     0x00007fffff72a730,                                                                 ),                                                             ),                                                         ],                                                     ),                                                 },                                                 name_py: Py(                                                     0x00007fffff72a730,                                                 ),                                                 validator: Float(                                                     FloatValidator {                                                         strict: false,                                                         allow_inf_nan: true,                                                     },                                                 ),                                                 frozen: false,                                             },                                         ],                                         model_name: "Point2d",                                         extra_behavior: Ignore,                                         extras_validator: None,                                         strict: false,                                         from_attributes: false,                                         loc_by_alias: true,                                     },                                 ),                                 class: Py(                                     0x0000555556eaa360,                                 ),                                 post_init: None,                                 frozen: false,                                 custom_init: false,                                 root_model: false,                                 name: "Point2d",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "camera_drag_end",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556ebc2a0,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "camera_drag_end",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, interaction: kittycad.models.camera_drag_interaction_type.CameraDragInteractionType, type: Literal['camera_drag_end'] = 'camera_drag_end', window: kittycad.models.point2d.Point2d) -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

classmethod from_orm(cls, obj)[source]
Return type:

Model

interaction: CameraDragInteractionType[source]
json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'interaction': FieldInfo(annotation=CameraDragInteractionType, required=True), 'type': FieldInfo(annotation=Literal['camera_drag_end'], required=False, default='camera_drag_end'), 'window': FieldInfo(annotation=Point2d, required=True)}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['camera_drag_end'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

window: Point2d[source]
class kittycad.models.modeling_cmd.camera_drag_move(**data)[source][source]

Camera drag continued.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'interaction': <enum 'CameraDragInteractionType'>, 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'sequence': typing.Optional[int], 'type': typing.Literal['camera_drag_move'], 'window': <class 'kittycad.models.point2d.Point2d'>}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'interaction': FieldInfo(annotation=CameraDragInteractionType, required=True), 'sequence': FieldInfo(annotation=Union[int, NoneType], required=False), 'type': FieldInfo(annotation=Literal['camera_drag_move'], required=False, default='camera_drag_move'), 'window': FieldInfo(annotation=Point2d, required=True)}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.camera_drag_move'>, 'config': {'title': 'camera_drag_move'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.camera_drag_move'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.camera_drag_move'>>]}, 'ref': 'kittycad.models.modeling_cmd.camera_drag_move:93825018794992', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'interaction': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'lax_schema': {'steps': [{'type': 'str'}, {'type': 'function-plain', 'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}}], 'type': 'chain'}, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_functions': [<function get_enum_core_schema.<locals>.get_json_schema>]}, 'ref': 'kittycad.models.camera_drag_interaction_type.CameraDragInteractionType:93825016553120', 'strict_schema': {'json_schema': {'function': {'function': <function get_enum_core_schema.<locals>.to_enum>, 'type': 'no-info'}, 'schema': {'type': 'str'}, 'type': 'function-after'}, 'python_schema': {'cls': <enum 'CameraDragInteractionType'>, 'type': 'is-instance'}, 'type': 'json-or-python'}, 'type': 'lax-or-strict'}, 'type': 'model-field'}, 'sequence': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': None, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'int'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'camera_drag_move', 'schema': {'expected': ['camera_drag_move'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}, 'window': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'cls': <class 'kittycad.models.point2d.Point2d'>, 'config': {'title': 'Point2d'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.point2d.Point2d'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.point2d.Point2d'>>]}, 'ref': 'kittycad.models.point2d.Point2d:93825018798944', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'x': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}, 'y': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}}, 'model_name': 'Point2d', 'type': 'model-fields'}, 'type': 'model'}, 'type': 'model-field'}}, 'model_name': 'camera_drag_move', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556ea93f0,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "window": SerField {                         key_py: Py(                             0x00007ffffdca04f0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Model(                                 ModelSerializer {                                     class: Py(                                         0x0000555556eaa360,                                     ),                                     serializer: Fields(                                         GeneralFieldsSerializer {                                             fields: {                                                 "x": SerField {                                                     key_py: Py(                                                         0x00007fffff8fe870,                                                     ),                                                     alias: None,                                                     alias_py: None,                                                     serializer: Some(                                                         Float(                                                             FloatSerializer {                                                                 inf_nan_mode: Null,                                                             },                                                         ),                                                     ),                                                     required: true,                                                 },                                                 "y": SerField {                                                     key_py: Py(                                                         0x00007fffff72a730,                                                     ),                                                     alias: None,                                                     alias_py: None,                                                     serializer: Some(                                                         Float(                                                             FloatSerializer {                                                                 inf_nan_mode: Null,                                                             },                                                         ),                                                     ),                                                     required: true,                                                 },                                             },                                             computed_fields: Some(                                                 ComputedFields(                                                     [],                                                 ),                                             ),                                             mode: SimpleDict,                                             extra_serializer: None,                                             filter: SchemaFilter {                                                 include: None,                                                 exclude: None,                                             },                                             required_fields: 2,                                         },                                     ),                                     has_extra: false,                                     root_model: false,                                     name: "Point2d",                                 },                             ),                         ),                         required: true,                     },                     "interaction": SerField {                         key_py: Py(                             0x00007fffff4aa830,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             JsonOrPython(                                 JsonOrPythonSerializer {                                     json: Str(                                         StrSerializer,                                     ),                                     python: Any(                                         AnySerializer,                                     ),                                     name: "json-or-python[json=str, python=any]",                                 },                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe10e1cb0,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "camera_drag_move",                                             },                                             expected_py: None,                                             name: "literal['camera_drag_move']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                     "sequence": SerField {                         key_py: Py(                             0x00007fffff11ecf0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007ffffff85420,                                         ),                                     ),                                     serializer: Nullable(                                         NullableSerializer {                                             serializer: Int(                                                 IntSerializer,                                             ),                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 4,             },         ),         has_extra: false,         root_model: false,         name: "camera_drag_move",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="camera_drag_move", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "interaction",                         lookup_key: Simple {                             key: "interaction",                             py_key: Py(                                 0x00007fffff4aa830,                             ),                             path: LookupPath(                                 [                                     S(                                         "interaction",                                         Py(                                             0x00007fffff4aa830,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff4aa830,                         ),                         validator: LaxOrStrict(                             LaxOrStrictValidator {                                 strict: false,                                 lax_validator: Chain(                                     ChainValidator {                                         steps: [                                             Str(                                                 StrValidator {                                                     strict: false,                                                     coerce_numbers_to_str: false,                                                 },                                             ),                                             FunctionPlain(                                                 FunctionPlainValidator {                                                     func: Py(                                                         0x00007fffe1057790,                                                     ),                                                     config: Py(                                                         0x00007fffe1002980,                                                     ),                                                     name: "function-plain[to_enum()]",                                                     field_name: None,                                                     info_arg: false,                                                 },                                             ),                                         ],                                         name: "chain[str,function-plain[to_enum()]]",                                     },                                 ),                                 strict_validator: JsonOrPython(                                     JsonOrPython {                                         json: FunctionAfter(                                             FunctionAfterValidator {                                                 validator: Str(                                                     StrValidator {                                                         strict: false,                                                         coerce_numbers_to_str: false,                                                     },                                                 ),                                                 func: Py(                                                     0x00007fffe1057790,                                                 ),                                                 config: Py(                                                     0x00007fffe1002980,                                                 ),                                                 name: "function-after[to_enum(), str]",                                                 field_name: None,                                                 info_arg: false,                                             },                                         ),                                         python: IsInstance(                                             IsInstanceValidator {                                                 class: Py(                                                     0x0000555556c85ea0,                                                 ),                                                 class_repr: "CameraDragInteractionType",                                                 name: "is-instance[CameraDragInteractionType]",                                             },                                         ),                                         name: "json-or-python[json=function-after[to_enum(), str],python=is-instance[CameraDragInteractionType]]",                                     },                                 ),                                 name: "lax-or-strict[lax=chain[str,function-plain[to_enum()]],strict=json-or-python[json=function-after[to_enum(), str],python=is-instance[CameraDragInteractionType]]]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "sequence",                         lookup_key: Simple {                             key: "sequence",                             py_key: Py(                                 0x00007fffff11ecf0,                             ),                             path: LookupPath(                                 [                                     S(                                         "sequence",                                         Py(                                             0x00007fffff11ecf0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff11ecf0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007ffffff85420,                                     ),                                 ),                                 on_error: Raise,                                 validator: Nullable(                                     NullableValidator {                                         validator: Int(                                             IntValidator {                                                 strict: false,                                             },                                         ),                                         name: "nullable[int]",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[nullable[int]]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe10e1cb0,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "camera_drag_move": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe10e1cb0,                                                 ),                                             ],                                         },                                         expected_repr: "'camera_drag_move'",                                         name: "literal['camera_drag_move']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['camera_drag_move']]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "window",                         lookup_key: Simple {                             key: "window",                             py_key: Py(                                 0x00007ffffdca04f0,                             ),                             path: LookupPath(                                 [                                     S(                                         "window",                                         Py(                                             0x00007ffffdca04f0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007ffffdca04f0,                         ),                         validator: Model(                             ModelValidator {                                 revalidate: Never,                                 validator: ModelFields(                                     ModelFieldsValidator {                                         fields: [                                             Field {                                                 name: "x",                                                 lookup_key: Simple {                                                     key: "x",                                                     py_key: Py(                                                         0x00007fffff8fe870,                                                     ),                                                     path: LookupPath(                                                         [                                                             S(                                                                 "x",                                                                 Py(                                                                     0x00007fffff8fe870,                                                                 ),                                                             ),                                                         ],                                                     ),                                                 },                                                 name_py: Py(                                                     0x00007fffff8fe870,                                                 ),                                                 validator: Float(                                                     FloatValidator {                                                         strict: false,                                                         allow_inf_nan: true,                                                     },                                                 ),                                                 frozen: false,                                             },                                             Field {                                                 name: "y",                                                 lookup_key: Simple {                                                     key: "y",                                                     py_key: Py(                                                         0x00007fffff72a730,                                                     ),                                                     path: LookupPath(                                                         [                                                             S(                                                                 "y",                                                                 Py(                                                                     0x00007fffff72a730,                                                                 ),                                                             ),                                                         ],                                                     ),                                                 },                                                 name_py: Py(                                                     0x00007fffff72a730,                                                 ),                                                 validator: Float(                                                     FloatValidator {                                                         strict: false,                                                         allow_inf_nan: true,                                                     },                                                 ),                                                 frozen: false,                                             },                                         ],                                         model_name: "Point2d",                                         extra_behavior: Ignore,                                         extras_validator: None,                                         strict: false,                                         from_attributes: false,                                         loc_by_alias: true,                                     },                                 ),                                 class: Py(                                     0x0000555556eaa360,                                 ),                                 post_init: None,                                 frozen: false,                                 custom_init: false,                                 root_model: false,                                 name: "Point2d",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "camera_drag_move",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556ea93f0,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "camera_drag_move",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, interaction: kittycad.models.camera_drag_interaction_type.CameraDragInteractionType, sequence: Optional[int] = None, type: Literal['camera_drag_move'] = 'camera_drag_move', window: kittycad.models.point2d.Point2d) -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

classmethod from_orm(cls, obj)[source]
Return type:

Model

interaction: CameraDragInteractionType[source]
json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'interaction': FieldInfo(annotation=CameraDragInteractionType, required=True), 'sequence': FieldInfo(annotation=Union[int, NoneType], required=False), 'type': FieldInfo(annotation=Literal['camera_drag_move'], required=False, default='camera_drag_move'), 'window': FieldInfo(annotation=Point2d, required=True)}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

sequence: Optional[int][source]
type: Literal['camera_drag_move'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

window: Point2d[source]
class kittycad.models.modeling_cmd.camera_drag_start(**data)[source][source]

Camera drag started.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'interaction': <enum 'CameraDragInteractionType'>, 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'type': typing.Literal['camera_drag_start'], 'window': <class 'kittycad.models.point2d.Point2d'>}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'interaction': FieldInfo(annotation=CameraDragInteractionType, required=True), 'type': FieldInfo(annotation=Literal['camera_drag_start'], required=False, default='camera_drag_start'), 'window': FieldInfo(annotation=Point2d, required=True)}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.camera_drag_start'>, 'config': {'title': 'camera_drag_start'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.camera_drag_start'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.camera_drag_start'>>]}, 'ref': 'kittycad.models.modeling_cmd.camera_drag_start:93825018864896', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'interaction': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'lax_schema': {'steps': [{'type': 'str'}, {'type': 'function-plain', 'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}}], 'type': 'chain'}, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_functions': [<function get_enum_core_schema.<locals>.get_json_schema>]}, 'ref': 'kittycad.models.camera_drag_interaction_type.CameraDragInteractionType:93825016553120', 'strict_schema': {'json_schema': {'function': {'function': <function get_enum_core_schema.<locals>.to_enum>, 'type': 'no-info'}, 'schema': {'type': 'str'}, 'type': 'function-after'}, 'python_schema': {'cls': <enum 'CameraDragInteractionType'>, 'type': 'is-instance'}, 'type': 'json-or-python'}, 'type': 'lax-or-strict'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'camera_drag_start', 'schema': {'expected': ['camera_drag_start'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}, 'window': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'cls': <class 'kittycad.models.point2d.Point2d'>, 'config': {'title': 'Point2d'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.point2d.Point2d'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.point2d.Point2d'>>]}, 'ref': 'kittycad.models.point2d.Point2d:93825018798944', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'x': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}, 'y': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}}, 'model_name': 'Point2d', 'type': 'model-fields'}, 'type': 'model'}, 'type': 'model-field'}}, 'model_name': 'camera_drag_start', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556eba500,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "interaction": SerField {                         key_py: Py(                             0x00007fffff4aa830,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             JsonOrPython(                                 JsonOrPythonSerializer {                                     json: Str(                                         StrSerializer,                                     ),                                     python: Any(                                         AnySerializer,                                     ),                                     name: "json-or-python[json=str, python=any]",                                 },                             ),                         ),                         required: true,                     },                     "window": SerField {                         key_py: Py(                             0x00007ffffdca04f0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Model(                                 ModelSerializer {                                     class: Py(                                         0x0000555556eaa360,                                     ),                                     serializer: Fields(                                         GeneralFieldsSerializer {                                             fields: {                                                 "y": SerField {                                                     key_py: Py(                                                         0x00007fffff72a730,                                                     ),                                                     alias: None,                                                     alias_py: None,                                                     serializer: Some(                                                         Float(                                                             FloatSerializer {                                                                 inf_nan_mode: Null,                                                             },                                                         ),                                                     ),                                                     required: true,                                                 },                                                 "x": SerField {                                                     key_py: Py(                                                         0x00007fffff8fe870,                                                     ),                                                     alias: None,                                                     alias_py: None,                                                     serializer: Some(                                                         Float(                                                             FloatSerializer {                                                                 inf_nan_mode: Null,                                                             },                                                         ),                                                     ),                                                     required: true,                                                 },                                             },                                             computed_fields: Some(                                                 ComputedFields(                                                     [],                                                 ),                                             ),                                             mode: SimpleDict,                                             extra_serializer: None,                                             filter: SchemaFilter {                                                 include: None,                                                 exclude: None,                                             },                                             required_fields: 2,                                         },                                     ),                                     has_extra: false,                                     root_model: false,                                     name: "Point2d",                                 },                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe10e1d00,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "camera_drag_start",                                             },                                             expected_py: None,                                             name: "literal['camera_drag_start']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 3,             },         ),         has_extra: false,         root_model: false,         name: "camera_drag_start",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="camera_drag_start", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "interaction",                         lookup_key: Simple {                             key: "interaction",                             py_key: Py(                                 0x00007fffff4aa830,                             ),                             path: LookupPath(                                 [                                     S(                                         "interaction",                                         Py(                                             0x00007fffff4aa830,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff4aa830,                         ),                         validator: LaxOrStrict(                             LaxOrStrictValidator {                                 strict: false,                                 lax_validator: Chain(                                     ChainValidator {                                         steps: [                                             Str(                                                 StrValidator {                                                     strict: false,                                                     coerce_numbers_to_str: false,                                                 },                                             ),                                             FunctionPlain(                                                 FunctionPlainValidator {                                                     func: Py(                                                         0x00007fffe1083700,                                                     ),                                                     config: Py(                                                         0x00007fffe0ffba00,                                                     ),                                                     name: "function-plain[to_enum()]",                                                     field_name: None,                                                     info_arg: false,                                                 },                                             ),                                         ],                                         name: "chain[str,function-plain[to_enum()]]",                                     },                                 ),                                 strict_validator: JsonOrPython(                                     JsonOrPython {                                         json: FunctionAfter(                                             FunctionAfterValidator {                                                 validator: Str(                                                     StrValidator {                                                         strict: false,                                                         coerce_numbers_to_str: false,                                                     },                                                 ),                                                 func: Py(                                                     0x00007fffe1083700,                                                 ),                                                 config: Py(                                                     0x00007fffe0ffba00,                                                 ),                                                 name: "function-after[to_enum(), str]",                                                 field_name: None,                                                 info_arg: false,                                             },                                         ),                                         python: IsInstance(                                             IsInstanceValidator {                                                 class: Py(                                                     0x0000555556c85ea0,                                                 ),                                                 class_repr: "CameraDragInteractionType",                                                 name: "is-instance[CameraDragInteractionType]",                                             },                                         ),                                         name: "json-or-python[json=function-after[to_enum(), str],python=is-instance[CameraDragInteractionType]]",                                     },                                 ),                                 name: "lax-or-strict[lax=chain[str,function-plain[to_enum()]],strict=json-or-python[json=function-after[to_enum(), str],python=is-instance[CameraDragInteractionType]]]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe10e1d00,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "camera_drag_start": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe10e1d00,                                                 ),                                             ],                                         },                                         expected_repr: "'camera_drag_start'",                                         name: "literal['camera_drag_start']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['camera_drag_start']]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "window",                         lookup_key: Simple {                             key: "window",                             py_key: Py(                                 0x00007ffffdca04f0,                             ),                             path: LookupPath(                                 [                                     S(                                         "window",                                         Py(                                             0x00007ffffdca04f0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007ffffdca04f0,                         ),                         validator: Model(                             ModelValidator {                                 revalidate: Never,                                 validator: ModelFields(                                     ModelFieldsValidator {                                         fields: [                                             Field {                                                 name: "x",                                                 lookup_key: Simple {                                                     key: "x",                                                     py_key: Py(                                                         0x00007fffff8fe870,                                                     ),                                                     path: LookupPath(                                                         [                                                             S(                                                                 "x",                                                                 Py(                                                                     0x00007fffff8fe870,                                                                 ),                                                             ),                                                         ],                                                     ),                                                 },                                                 name_py: Py(                                                     0x00007fffff8fe870,                                                 ),                                                 validator: Float(                                                     FloatValidator {                                                         strict: false,                                                         allow_inf_nan: true,                                                     },                                                 ),                                                 frozen: false,                                             },                                             Field {                                                 name: "y",                                                 lookup_key: Simple {                                                     key: "y",                                                     py_key: Py(                                                         0x00007fffff72a730,                                                     ),                                                     path: LookupPath(                                                         [                                                             S(                                                                 "y",                                                                 Py(                                                                     0x00007fffff72a730,                                                                 ),                                                             ),                                                         ],                                                     ),                                                 },                                                 name_py: Py(                                                     0x00007fffff72a730,                                                 ),                                                 validator: Float(                                                     FloatValidator {                                                         strict: false,                                                         allow_inf_nan: true,                                                     },                                                 ),                                                 frozen: false,                                             },                                         ],                                         model_name: "Point2d",                                         extra_behavior: Ignore,                                         extras_validator: None,                                         strict: false,                                         from_attributes: false,                                         loc_by_alias: true,                                     },                                 ),                                 class: Py(                                     0x0000555556eaa360,                                 ),                                 post_init: None,                                 frozen: false,                                 custom_init: false,                                 root_model: false,                                 name: "Point2d",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "camera_drag_start",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556eba500,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "camera_drag_start",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, interaction: kittycad.models.camera_drag_interaction_type.CameraDragInteractionType, type: Literal['camera_drag_start'] = 'camera_drag_start', window: kittycad.models.point2d.Point2d) -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

classmethod from_orm(cls, obj)[source]
Return type:

Model

interaction: CameraDragInteractionType[source]
json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'interaction': FieldInfo(annotation=CameraDragInteractionType, required=True), 'type': FieldInfo(annotation=Literal['camera_drag_start'], required=False, default='camera_drag_start'), 'window': FieldInfo(annotation=Point2d, required=True)}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['camera_drag_start'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

window: Point2d[source]
class kittycad.models.modeling_cmd.center_of_mass(**data)[source][source]

Get the center of mass of entities in the scene or the default scene.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'entity_ids': typing.List[str], 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'output_unit': <enum 'UnitLength'>, 'source_unit': <enum 'UnitLength'>, 'type': typing.Literal['center_of_mass']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'entity_ids': FieldInfo(annotation=List[str], required=True), 'output_unit': FieldInfo(annotation=UnitLength, required=True), 'source_unit': FieldInfo(annotation=UnitLength, required=True), 'type': FieldInfo(annotation=Literal['center_of_mass'], required=False, default='center_of_mass')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'definitions': [{'type': 'lax-or-strict', 'lax_schema': {'type': 'chain', 'steps': [{'type': 'str'}, {'type': 'function-plain', 'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}}]}, 'strict_schema': {'type': 'json-or-python', 'json_schema': {'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}, 'schema': {'type': 'str'}, 'type': 'function-after'}, 'python_schema': {'type': 'is-instance', 'cls': <enum 'UnitLength'>}}, 'ref': 'kittycad.models.unit_length.UnitLength:93825014613552', 'metadata': {'pydantic_js_functions': [<function get_enum_core_schema.<locals>.get_json_schema>], 'pydantic.internal.needs_apply_discriminated_union': False}}], 'schema': {'cls': <class 'kittycad.models.modeling_cmd.center_of_mass'>, 'config': {'title': 'center_of_mass'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.center_of_mass'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.center_of_mass'>>]}, 'ref': 'kittycad.models.modeling_cmd.center_of_mass:93825020107872', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'entity_ids': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'items_schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'strict': False, 'type': 'list'}, 'type': 'model-field'}, 'output_unit': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'schema_ref': 'kittycad.models.unit_length.UnitLength:93825014613552', 'type': 'definition-ref'}, 'type': 'model-field'}, 'source_unit': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'schema_ref': 'kittycad.models.unit_length.UnitLength:93825014613552', 'type': 'definition-ref'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'center_of_mass', 'schema': {'expected': ['center_of_mass'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'center_of_mass', 'type': 'model-fields'}, 'type': 'model'}, 'type': 'definitions'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_control_points': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_end_points': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'density': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_fade': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_set_opacity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'get_entity_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'handle_mouse_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'handle_mouse_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'handle_mouse_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entities': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'import_files': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_axes_gizmo': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_plane': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_click': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'new_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_bring_to_front': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_visible': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_curve_uuids_for_vertices': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_info': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_vertex_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'plane_intersect_and_project': <pydantic._internal._model_construction._PydanticWeakRef object>, 'plane_set_color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'reconfigure_stream': <pydantic._internal._model_construction._PydanticWeakRef object>, 'remove_scene_objects': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'send_object': <pydantic._internal._model_construction._PydanticWeakRef object>, 'set_tool': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_disable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_enable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid2d_add_hole': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_edge_faces': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_opposite_edges': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_next_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_opposite_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_prev_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'take_snapshot': <pydantic._internal._model_construction._PydanticWeakRef object>, 'update_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'volume': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556fe9c60,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "entity_ids": SerField {                         key_py: Py(                             0x00007fffe118cc70,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             List(                                 ListSerializer {                                     item_serializer: Str(                                         StrSerializer,                                     ),                                     filter: SchemaFilter {                                         include: None,                                         exclude: None,                                     },                                     name: "list[str]",                                 },                             ),                         ),                         required: true,                     },                     "output_unit": SerField {                         key_py: Py(                             0x00007fffe14f4170,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Recursive(                                 DefinitionRefSerializer {                                     definition: "kittycad.models.unit_length.UnitLength:93825014613552",                                 },                             ),                         ),                         required: true,                     },                     "source_unit": SerField {                         key_py: Py(                             0x00007fffe10dd370,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Recursive(                                 DefinitionRefSerializer {                                     definition: "kittycad.models.unit_length.UnitLength:93825014613552",                                 },                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe1c815b0,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "center_of_mass",                                             },                                             expected_py: None,                                             name: "literal['center_of_mass']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 4,             },         ),         has_extra: false,         root_model: false,         name: "center_of_mass",     }, ), definitions=[JsonOrPython(JsonOrPythonSerializer { json: Str(StrSerializer), python: Any(AnySerializer), name: "json-or-python[json=str, python=any]" })])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="center_of_mass", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "entity_ids",                         lookup_key: Simple {                             key: "entity_ids",                             py_key: Py(                                 0x00007fffe118cc70,                             ),                             path: LookupPath(                                 [                                     S(                                         "entity_ids",                                         Py(                                             0x00007fffe118cc70,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe118cc70,                         ),                         validator: List(                             ListValidator {                                 strict: false,                                 item_validator: Some(                                     Str(                                         StrValidator {                                             strict: false,                                             coerce_numbers_to_str: false,                                         },                                     ),                                 ),                                 min_length: None,                                 max_length: None,                                 name: OnceLock(                                     <uninit>,                                 ),                             },                         ),                         frozen: false,                     },                     Field {                         name: "output_unit",                         lookup_key: Simple {                             key: "output_unit",                             py_key: Py(                                 0x00007fffe14f4170,                             ),                             path: LookupPath(                                 [                                     S(                                         "output_unit",                                         Py(                                             0x00007fffe14f4170,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe14f4170,                         ),                         validator: DefinitionRef(                             DefinitionRefValidator {                                 definition: "kittycad.models.unit_length.UnitLength:93825014613552",                             },                         ),                         frozen: false,                     },                     Field {                         name: "source_unit",                         lookup_key: Simple {                             key: "source_unit",                             py_key: Py(                                 0x00007fffe10dd370,                             ),                             path: LookupPath(                                 [                                     S(                                         "source_unit",                                         Py(                                             0x00007fffe10dd370,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe10dd370,                         ),                         validator: DefinitionRef(                             DefinitionRefValidator {                                 definition: "kittycad.models.unit_length.UnitLength:93825014613552",                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe1c815b0,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "center_of_mass": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe1c815b0,                                                 ),                                             ],                                         },                                         expected_repr: "'center_of_mass'",                                         name: "literal['center_of_mass']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['center_of_mass']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "center_of_mass",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556fe9c60,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "center_of_mass",     }, ), definitions=[LaxOrStrict(LaxOrStrictValidator { strict: false, lax_validator: Chain(ChainValidator { steps: [Str(StrValidator { strict: false, coerce_numbers_to_str: false }), FunctionPlain(FunctionPlainValidator { func: Py(0x7fffe0e55430), config: Py(0x7fffe0e68900), name: "function-plain[to_enum()]", field_name: None, info_arg: false })], name: "chain[str,function-plain[to_enum()]]" }), strict_validator: JsonOrPython(JsonOrPython { json: FunctionAfter(FunctionAfterValidator { validator: Str(StrValidator { strict: false, coerce_numbers_to_str: false }), func: Py(0x7fffe0e55430), config: Py(0x7fffe0e68900), name: "function-after[to_enum(), str]", field_name: None, info_arg: false }), python: IsInstance(IsInstanceValidator { class: Py(0x555556aac630), class_repr: "UnitLength", name: "is-instance[UnitLength]" }), name: "json-or-python[json=function-after[to_enum(), str],python=is-instance[UnitLength]]" }), name: "lax-or-strict[lax=chain[str,function-plain[to_enum()]],strict=json-or-python[json=function-after[to_enum(), str],python=is-instance[UnitLength]]]" })])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, entity_ids: List[str], output_unit: kittycad.models.unit_length.UnitLength, source_unit: kittycad.models.unit_length.UnitLength, type: Literal['center_of_mass'] = 'center_of_mass') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

entity_ids: List[str][source]
classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'entity_ids': FieldInfo(annotation=List[str], required=True), 'output_unit': FieldInfo(annotation=UnitLength, required=True), 'source_unit': FieldInfo(annotation=UnitLength, required=True), 'type': FieldInfo(annotation=Literal['center_of_mass'], required=False, default='center_of_mass')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

output_unit: UnitLength[source]
classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

source_unit: UnitLength[source]
type: Literal['center_of_mass'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.close_path(**data)[source][source]

Closes a path, converting it to a 2D solid.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'path_id': <class 'str'>, 'type': typing.Literal['close_path']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'path_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['close_path'], required=False, default='close_path')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.close_path'>, 'config': {'title': 'close_path'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.close_path'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.close_path'>>]}, 'ref': 'kittycad.models.modeling_cmd.close_path:93825019121920', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'path_id': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'close_path', 'schema': {'expected': ['close_path'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'close_path', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556ef9100,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "path_id": SerField {                         key_py: Py(                             0x00007fffe2481fb0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Str(                                 StrSerializer,                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe107bef0,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "close_path",                                             },                                             expected_py: None,                                             name: "literal['close_path']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 2,             },         ),         has_extra: false,         root_model: false,         name: "close_path",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="close_path", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "path_id",                         lookup_key: Simple {                             key: "path_id",                             py_key: Py(                                 0x00007fffe2481fb0,                             ),                             path: LookupPath(                                 [                                     S(                                         "path_id",                                         Py(                                             0x00007fffe2481fb0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe2481fb0,                         ),                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe107bef0,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "close_path": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe107bef0,                                                 ),                                             ],                                         },                                         expected_repr: "'close_path'",                                         name: "literal['close_path']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['close_path']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "close_path",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556ef9100,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "close_path",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, path_id: str, type: Literal['close_path'] = 'close_path') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'path_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['close_path'], required=False, default='close_path')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

path_id: str[source]
classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['close_path'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.curve_get_control_points(**data)[source][source]

Get control points of a given curve.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'curve_id': <class 'str'>, 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'type': typing.Literal['curve_get_control_points']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'curve_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['curve_get_control_points'], required=False, default='curve_get_control_points')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.curve_get_control_points'>, 'config': {'title': 'curve_get_control_points'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.curve_get_control_points'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.curve_get_control_points'>>]}, 'ref': 'kittycad.models.modeling_cmd.curve_get_control_points:93825019772224', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'curve_id': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'curve_get_control_points', 'schema': {'expected': ['curve_get_control_points'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'curve_get_control_points', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_fade': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_set_opacity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'get_entity_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entities': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_plane': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_click': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'new_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_bring_to_front': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_visible': <pydantic._internal._model_construction._PydanticWeakRef object>, 'plane_set_color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'send_object': <pydantic._internal._model_construction._PydanticWeakRef object>, 'set_tool': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_disable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_enable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid2d_add_hole': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_edge_faces': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_opposite_edges': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_next_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_opposite_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_prev_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'update_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556f97d40,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "curve_id": SerField {                         key_py: Py(                             0x00007fffe10f8670,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Str(                                 StrSerializer,                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe1c919e0,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "curve_get_control_points",                                             },                                             expected_py: None,                                             name: "literal['curve_get_control_points']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 2,             },         ),         has_extra: false,         root_model: false,         name: "curve_get_control_points",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="curve_get_control_points", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "curve_id",                         lookup_key: Simple {                             key: "curve_id",                             py_key: Py(                                 0x00007fffe10f8670,                             ),                             path: LookupPath(                                 [                                     S(                                         "curve_id",                                         Py(                                             0x00007fffe10f8670,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe10f8670,                         ),                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe1c919e0,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "curve_get_control_points": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe1c919e0,                                                 ),                                             ],                                         },                                         expected_repr: "'curve_get_control_points'",                                         name: "literal['curve_get_control_points']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['curve_get_control_points']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "curve_get_control_points",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556f97d40,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "curve_get_control_points",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, curve_id: str, type: Literal['curve_get_control_points'] = 'curve_get_control_points') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

curve_id: str[source]
dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'curve_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['curve_get_control_points'], required=False, default='curve_get_control_points')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['curve_get_control_points'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.curve_get_end_points(**data)[source][source]

Find the start and end of a curve.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'curve_id': <class 'str'>, 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'type': typing.Literal['curve_get_end_points']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'curve_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['curve_get_end_points'], required=False, default='curve_get_end_points')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.curve_get_end_points'>, 'config': {'title': 'curve_get_end_points'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.curve_get_end_points'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.curve_get_end_points'>>]}, 'ref': 'kittycad.models.modeling_cmd.curve_get_end_points:93825019978336', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'curve_id': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'curve_get_end_points', 'schema': {'expected': ['curve_get_end_points'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'curve_get_end_points', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_control_points': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_fade': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_set_opacity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'get_entity_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'handle_mouse_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'handle_mouse_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'handle_mouse_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entities': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_axes_gizmo': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_plane': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_click': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'new_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_bring_to_front': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_visible': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_curve_uuids_for_vertices': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_info': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_vertex_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'plane_intersect_and_project': <pydantic._internal._model_construction._PydanticWeakRef object>, 'plane_set_color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'remove_scene_objects': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'send_object': <pydantic._internal._model_construction._PydanticWeakRef object>, 'set_tool': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_disable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_enable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid2d_add_hole': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_edge_faces': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_opposite_edges': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_next_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_opposite_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_prev_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'take_snapshot': <pydantic._internal._model_construction._PydanticWeakRef object>, 'update_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556fca260,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe1c91a30,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "curve_get_end_points",                                             },                                             expected_py: None,                                             name: "literal['curve_get_end_points']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                     "curve_id": SerField {                         key_py: Py(                             0x00007fffe10f8670,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Str(                                 StrSerializer,                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 2,             },         ),         has_extra: false,         root_model: false,         name: "curve_get_end_points",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="curve_get_end_points", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "curve_id",                         lookup_key: Simple {                             key: "curve_id",                             py_key: Py(                                 0x00007fffe10f8670,                             ),                             path: LookupPath(                                 [                                     S(                                         "curve_id",                                         Py(                                             0x00007fffe10f8670,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe10f8670,                         ),                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe1c91a30,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "curve_get_end_points": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe1c91a30,                                                 ),                                             ],                                         },                                         expected_repr: "'curve_get_end_points'",                                         name: "literal['curve_get_end_points']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['curve_get_end_points']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "curve_get_end_points",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556fca260,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "curve_get_end_points",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, curve_id: str, type: Literal['curve_get_end_points'] = 'curve_get_end_points') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

curve_id: str[source]
dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'curve_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['curve_get_end_points'], required=False, default='curve_get_end_points')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['curve_get_end_points'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.curve_get_type(**data)[source][source]

Get type of a given curve.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'curve_id': <class 'str'>, 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'type': typing.Literal['curve_get_type']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'curve_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['curve_get_type'], required=False, default='curve_get_type')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.curve_get_type'>, 'config': {'title': 'curve_get_type'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.curve_get_type'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.curve_get_type'>>]}, 'ref': 'kittycad.models.modeling_cmd.curve_get_type:93825018874720', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'curve_id': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'curve_get_type', 'schema': {'expected': ['curve_get_type'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'curve_get_type', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_fade': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_set_opacity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'get_entity_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entities': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_plane': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_click': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'new_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_bring_to_front': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_visible': <pydantic._internal._model_construction._PydanticWeakRef object>, 'plane_set_color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'send_object': <pydantic._internal._model_construction._PydanticWeakRef object>, 'set_tool': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_disable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_enable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid2d_add_hole': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_edge_faces': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_opposite_edges': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_next_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_opposite_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_prev_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'update_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556ebcb60,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe1c818b0,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "curve_get_type",                                             },                                             expected_py: None,                                             name: "literal['curve_get_type']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                     "curve_id": SerField {                         key_py: Py(                             0x00007fffe10f8670,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Str(                                 StrSerializer,                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 2,             },         ),         has_extra: false,         root_model: false,         name: "curve_get_type",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="curve_get_type", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "curve_id",                         lookup_key: Simple {                             key: "curve_id",                             py_key: Py(                                 0x00007fffe10f8670,                             ),                             path: LookupPath(                                 [                                     S(                                         "curve_id",                                         Py(                                             0x00007fffe10f8670,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe10f8670,                         ),                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe1c818b0,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "curve_get_type": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe1c818b0,                                                 ),                                             ],                                         },                                         expected_repr: "'curve_get_type'",                                         name: "literal['curve_get_type']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['curve_get_type']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "curve_get_type",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556ebcb60,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "curve_get_type",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, curve_id: str, type: Literal['curve_get_type'] = 'curve_get_type') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

curve_id: str[source]
dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'curve_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['curve_get_type'], required=False, default='curve_get_type')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['curve_get_type'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.curve_set_constraint(**data)[source][source]

Constrain a curve.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'constraint_bound': <enum 'PathComponentConstraintBound'>, 'constraint_type': <enum 'PathComponentConstraintType'>, 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'object_id': <class 'str'>, 'type': typing.Literal['curve_set_constraint']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'constraint_bound': FieldInfo(annotation=PathComponentConstraintBound, required=True), 'constraint_type': FieldInfo(annotation=PathComponentConstraintType, required=True), 'object_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['curve_set_constraint'], required=False, default='curve_set_constraint')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.curve_set_constraint'>, 'config': {'title': 'curve_set_constraint'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.curve_set_constraint'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.curve_set_constraint'>>]}, 'ref': 'kittycad.models.modeling_cmd.curve_set_constraint:93825020228320', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'constraint_bound': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'lax_schema': {'steps': [{'type': 'str'}, {'type': 'function-plain', 'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}}], 'type': 'chain'}, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_functions': [<function get_enum_core_schema.<locals>.get_json_schema>]}, 'ref': 'kittycad.models.path_component_constraint_bound.PathComponentConstraintBound:93825018797056', 'strict_schema': {'json_schema': {'function': {'function': <function get_enum_core_schema.<locals>.to_enum>, 'type': 'no-info'}, 'schema': {'type': 'str'}, 'type': 'function-after'}, 'python_schema': {'cls': <enum 'PathComponentConstraintBound'>, 'type': 'is-instance'}, 'type': 'json-or-python'}, 'type': 'lax-or-strict'}, 'type': 'model-field'}, 'constraint_type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'lax_schema': {'steps': [{'type': 'str'}, {'type': 'function-plain', 'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}}], 'type': 'chain'}, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_functions': [<function get_enum_core_schema.<locals>.get_json_schema>]}, 'ref': 'kittycad.models.path_component_constraint_type.PathComponentConstraintType:93825018798000', 'strict_schema': {'json_schema': {'function': {'function': <function get_enum_core_schema.<locals>.to_enum>, 'type': 'no-info'}, 'schema': {'type': 'str'}, 'type': 'function-after'}, 'python_schema': {'cls': <enum 'PathComponentConstraintType'>, 'type': 'is-instance'}, 'type': 'json-or-python'}, 'type': 'lax-or-strict'}, 'type': 'model-field'}, 'object_id': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'curve_set_constraint', 'schema': {'expected': ['curve_set_constraint'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'curve_set_constraint', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'center_of_mass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_control_points': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_end_points': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'density': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_fade': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_set_opacity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'get_entity_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'get_sketch_mode_plane': <pydantic._internal._model_construction._PydanticWeakRef object>, 'handle_mouse_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'handle_mouse_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'handle_mouse_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entities': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'import_files': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_axes_gizmo': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_plane': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_click': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'new_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_bring_to_front': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_visible': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_curve_uuids_for_vertices': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_info': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_vertex_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'plane_intersect_and_project': <pydantic._internal._model_construction._PydanticWeakRef object>, 'plane_set_color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'reconfigure_stream': <pydantic._internal._model_construction._PydanticWeakRef object>, 'remove_scene_objects': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'send_object': <pydantic._internal._model_construction._PydanticWeakRef object>, 'set_tool': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_disable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_enable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid2d_add_hole': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_edge_faces': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_opposite_edges': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_next_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_opposite_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_prev_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'surface_area': <pydantic._internal._model_construction._PydanticWeakRef object>, 'take_snapshot': <pydantic._internal._model_construction._PydanticWeakRef object>, 'update_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'volume': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x00005555570072e0,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "constraint_bound": SerField {                         key_py: Py(                             0x00007fffe114b6c0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             JsonOrPython(                                 JsonOrPythonSerializer {                                     json: Str(                                         StrSerializer,                                     ),                                     python: Any(                                         AnySerializer,                                     ),                                     name: "json-or-python[json=str, python=any]",                                 },                             ),                         ),                         required: true,                     },                     "object_id": SerField {                         key_py: Py(                             0x00007ffffdc17c30,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Str(                                 StrSerializer,                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe114b620,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "curve_set_constraint",                                             },                                             expected_py: None,                                             name: "literal['curve_set_constraint']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                     "constraint_type": SerField {                         key_py: Py(                             0x00007fffe10f8d30,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             JsonOrPython(                                 JsonOrPythonSerializer {                                     json: Str(                                         StrSerializer,                                     ),                                     python: Any(                                         AnySerializer,                                     ),                                     name: "json-or-python[json=str, python=any]",                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 4,             },         ),         has_extra: false,         root_model: false,         name: "curve_set_constraint",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="curve_set_constraint", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "constraint_bound",                         lookup_key: Simple {                             key: "constraint_bound",                             py_key: Py(                                 0x00007fffe114b6c0,                             ),                             path: LookupPath(                                 [                                     S(                                         "constraint_bound",                                         Py(                                             0x00007fffe114b6c0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe114b6c0,                         ),                         validator: LaxOrStrict(                             LaxOrStrictValidator {                                 strict: false,                                 lax_validator: Chain(                                     ChainValidator {                                         steps: [                                             Str(                                                 StrValidator {                                                     strict: false,                                                     coerce_numbers_to_str: false,                                                 },                                             ),                                             FunctionPlain(                                                 FunctionPlainValidator {                                                     func: Py(                                                         0x00007fffe0e55ca0,                                                     ),                                                     config: Py(                                                         0x00007fffe0e1c240,                                                     ),                                                     name: "function-plain[to_enum()]",                                                     field_name: None,                                                     info_arg: false,                                                 },                                             ),                                         ],                                         name: "chain[str,function-plain[to_enum()]]",                                     },                                 ),                                 strict_validator: JsonOrPython(                                     JsonOrPython {                                         json: FunctionAfter(                                             FunctionAfterValidator {                                                 validator: Str(                                                     StrValidator {                                                         strict: false,                                                         coerce_numbers_to_str: false,                                                     },                                                 ),                                                 func: Py(                                                     0x00007fffe0e55ca0,                                                 ),                                                 config: Py(                                                     0x00007fffe0e1c240,                                                 ),                                                 name: "function-after[to_enum(), str]",                                                 field_name: None,                                                 info_arg: false,                                             },                                         ),                                         python: IsInstance(                                             IsInstanceValidator {                                                 class: Py(                                                     0x0000555556ea9c00,                                                 ),                                                 class_repr: "PathComponentConstraintBound",                                                 name: "is-instance[PathComponentConstraintBound]",                                             },                                         ),                                         name: "json-or-python[json=function-after[to_enum(), str],python=is-instance[PathComponentConstraintBound]]",                                     },                                 ),                                 name: "lax-or-strict[lax=chain[str,function-plain[to_enum()]],strict=json-or-python[json=function-after[to_enum(), str],python=is-instance[PathComponentConstraintBound]]]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "constraint_type",                         lookup_key: Simple {                             key: "constraint_type",                             py_key: Py(                                 0x00007fffe10f8d30,                             ),                             path: LookupPath(                                 [                                     S(                                         "constraint_type",                                         Py(                                             0x00007fffe10f8d30,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe10f8d30,                         ),                         validator: LaxOrStrict(                             LaxOrStrictValidator {                                 strict: false,                                 lax_validator: Chain(                                     ChainValidator {                                         steps: [                                             Str(                                                 StrValidator {                                                     strict: false,                                                     coerce_numbers_to_str: false,                                                 },                                             ),                                             FunctionPlain(                                                 FunctionPlainValidator {                                                     func: Py(                                                         0x00007fffe0f4f9d0,                                                     ),                                                     config: Py(                                                         0x00007fffe0e1c240,                                                     ),                                                     name: "function-plain[to_enum()]",                                                     field_name: None,                                                     info_arg: false,                                                 },                                             ),                                         ],                                         name: "chain[str,function-plain[to_enum()]]",                                     },                                 ),                                 strict_validator: JsonOrPython(                                     JsonOrPython {                                         json: FunctionAfter(                                             FunctionAfterValidator {                                                 validator: Str(                                                     StrValidator {                                                         strict: false,                                                         coerce_numbers_to_str: false,                                                     },                                                 ),                                                 func: Py(                                                     0x00007fffe0f4f9d0,                                                 ),                                                 config: Py(                                                     0x00007fffe0e1c240,                                                 ),                                                 name: "function-after[to_enum(), str]",                                                 field_name: None,                                                 info_arg: false,                                             },                                         ),                                         python: IsInstance(                                             IsInstanceValidator {                                                 class: Py(                                                     0x0000555556ea9fb0,                                                 ),                                                 class_repr: "PathComponentConstraintType",                                                 name: "is-instance[PathComponentConstraintType]",                                             },                                         ),                                         name: "json-or-python[json=function-after[to_enum(), str],python=is-instance[PathComponentConstraintType]]",                                     },                                 ),                                 name: "lax-or-strict[lax=chain[str,function-plain[to_enum()]],strict=json-or-python[json=function-after[to_enum(), str],python=is-instance[PathComponentConstraintType]]]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "object_id",                         lookup_key: Simple {                             key: "object_id",                             py_key: Py(                                 0x00007ffffdc17c30,                             ),                             path: LookupPath(                                 [                                     S(                                         "object_id",                                         Py(                                             0x00007ffffdc17c30,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007ffffdc17c30,                         ),                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe114b620,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "curve_set_constraint": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe114b620,                                                 ),                                             ],                                         },                                         expected_repr: "'curve_set_constraint'",                                         name: "literal['curve_set_constraint']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['curve_set_constraint']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "curve_set_constraint",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x00005555570072e0,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "curve_set_constraint",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, constraint_bound: kittycad.models.path_component_constraint_bound.PathComponentConstraintBound, constraint_type: kittycad.models.path_component_constraint_type.PathComponentConstraintType, object_id: str, type: Literal['curve_set_constraint'] = 'curve_set_constraint') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

constraint_bound: PathComponentConstraintBound[source]
constraint_type: PathComponentConstraintType[source]
classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'constraint_bound': FieldInfo(annotation=PathComponentConstraintBound, required=True), 'constraint_type': FieldInfo(annotation=PathComponentConstraintType, required=True), 'object_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['curve_set_constraint'], required=False, default='curve_set_constraint')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

object_id: str[source]
classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['curve_set_constraint'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.default_camera_disable_sketch_mode(**data)[source][source]

Disable sketch mode, from the default camera.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'type': typing.Literal['default_camera_disable_sketch_mode']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'type': FieldInfo(annotation=Literal['default_camera_disable_sketch_mode'], required=False, default='default_camera_disable_sketch_mode')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.default_camera_disable_sketch_mode'>, 'config': {'title': 'default_camera_disable_sketch_mode'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.default_camera_disable_sketch_mode'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.default_camera_disable_sketch_mode'>>]}, 'ref': 'kittycad.models.modeling_cmd.default_camera_disable_sketch_mode:93825018977904', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'default_camera_disable_sketch_mode', 'schema': {'expected': ['default_camera_disable_sketch_mode'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'default_camera_disable_sketch_mode', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556ed5e70,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe1197e10,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "default_camera_disable_sketch_mode",                                             },                                             expected_py: None,                                             name: "literal['default_camera_disable_sketch_mode']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 1,             },         ),         has_extra: false,         root_model: false,         name: "default_camera_disable_sketch_mode",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="default_camera_disable_sketch_mode", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe1197e10,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "default_camera_disable_sketch_mode": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe1197e10,                                                 ),                                             ],                                         },                                         expected_repr: "'default_camera_disable_sketch_mode'",                                         name: "literal['default_camera_disable_sketch_mode']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['default_camera_disable_sketch_mode']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "default_camera_disable_sketch_mode",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556ed5e70,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "default_camera_disable_sketch_mode",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, type: Literal['default_camera_disable_sketch_mode'] = 'default_camera_disable_sketch_mode') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'type': FieldInfo(annotation=Literal['default_camera_disable_sketch_mode'], required=False, default='default_camera_disable_sketch_mode')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['default_camera_disable_sketch_mode'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.default_camera_enable_sketch_mode(**data)[source][source]

Enable sketch mode, where users can sketch 2D geometry. Users choose a plane to sketch on.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'animated': <class 'bool'>, 'distance_to_plane': <class 'float'>, 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'origin': <class 'kittycad.models.point3d.Point3d'>, 'ortho': <class 'bool'>, 'type': typing.Literal['default_camera_enable_sketch_mode'], 'x_axis': <class 'kittycad.models.point3d.Point3d'>, 'y_axis': <class 'kittycad.models.point3d.Point3d'>}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'animated': FieldInfo(annotation=bool, required=True), 'distance_to_plane': FieldInfo(annotation=float, required=True), 'origin': FieldInfo(annotation=Point3d, required=True), 'ortho': FieldInfo(annotation=bool, required=True), 'type': FieldInfo(annotation=Literal['default_camera_enable_sketch_mode'], required=False, default='default_camera_enable_sketch_mode'), 'x_axis': FieldInfo(annotation=Point3d, required=True), 'y_axis': FieldInfo(annotation=Point3d, required=True)}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'definitions': [{'type': 'model', 'cls': <class 'kittycad.models.point3d.Point3d'>, 'schema': {'type': 'model-fields', 'fields': {'x': {'type': 'model-field', 'schema': {'type': 'float', 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'y': {'type': 'model-field', 'schema': {'type': 'float', 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'z': {'type': 'model-field', 'schema': {'type': 'float', 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}}, 'model_name': 'Point3d', 'computed_fields': []}, 'custom_init': False, 'root_model': False, 'config': {'title': 'Point3d'}, 'ref': 'kittycad.models.point3d.Point3d:93825014233264', 'metadata': {'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.point3d.Point3d'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.point3d.Point3d'>>], 'pydantic_js_annotation_functions': [], 'pydantic.internal.needs_apply_discriminated_union': False}}], 'schema': {'cls': <class 'kittycad.models.modeling_cmd.default_camera_enable_sketch_mode'>, 'config': {'title': 'default_camera_enable_sketch_mode'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.default_camera_enable_sketch_mode'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.default_camera_enable_sketch_mode'>>]}, 'ref': 'kittycad.models.modeling_cmd.default_camera_enable_sketch_mode:93825018950784', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'animated': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'bool'}, 'type': 'model-field'}, 'distance_to_plane': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}, 'origin': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'schema_ref': 'kittycad.models.point3d.Point3d:93825014233264', 'type': 'definition-ref'}, 'type': 'model-field'}, 'ortho': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'bool'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'default_camera_enable_sketch_mode', 'schema': {'expected': ['default_camera_enable_sketch_mode'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}, 'x_axis': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'schema_ref': 'kittycad.models.point3d.Point3d:93825014233264', 'type': 'definition-ref'}, 'type': 'model-field'}, 'y_axis': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'schema_ref': 'kittycad.models.point3d.Point3d:93825014233264', 'type': 'definition-ref'}, 'type': 'model-field'}}, 'model_name': 'default_camera_enable_sketch_mode', 'type': 'model-fields'}, 'type': 'model'}, 'type': 'definitions'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556ecf480,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "ortho": SerField {                         key_py: Py(                             0x00007ffffddd9730,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Bool(                                 BoolSerializer,                             ),                         ),                         required: true,                     },                     "distance_to_plane": SerField {                         key_py: Py(                             0x00007fffe1192b20,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Float(                                 FloatSerializer {                                     inf_nan_mode: Null,                                 },                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe1197db0,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "default_camera_enable_sketch_mode",                                             },                                             expected_py: None,                                             name: "literal['default_camera_enable_sketch_mode']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                     "x_axis": SerField {                         key_py: Py(                             0x00007fffe1357070,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Recursive(                                 DefinitionRefSerializer {                                     definition: "kittycad.models.point3d.Point3d:93825014233264",                                 },                             ),                         ),                         required: true,                     },                     "y_axis": SerField {                         key_py: Py(                             0x00007fffe1108a30,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Recursive(                                 DefinitionRefSerializer {                                     definition: "kittycad.models.point3d.Point3d:93825014233264",                                 },                             ),                         ),                         required: true,                     },                     "animated": SerField {                         key_py: Py(                             0x00007fffe22e4470,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Bool(                                 BoolSerializer,                             ),                         ),                         required: true,                     },                     "origin": SerField {                         key_py: Py(                             0x00007fffff8f5730,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Recursive(                                 DefinitionRefSerializer {                                     definition: "kittycad.models.point3d.Point3d:93825014233264",                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 7,             },         ),         has_extra: false,         root_model: false,         name: "default_camera_enable_sketch_mode",     }, ), definitions=[Model(ModelSerializer { class: Py(0x555556a4f8b0), serializer: Fields(GeneralFieldsSerializer { fields: {"x": SerField { key_py: Py(0x7fffff8fe870), alias: None, alias_py: None, serializer: Some(Float(FloatSerializer { inf_nan_mode: Null })), required: true }, "z": SerField { key_py: Py(0x7fffff72a770), alias: None, alias_py: None, serializer: Some(Float(FloatSerializer { inf_nan_mode: Null })), required: true }, "y": SerField { key_py: Py(0x7fffff72a730), alias: None, alias_py: None, serializer: Some(Float(FloatSerializer { inf_nan_mode: Null })), required: true }}, computed_fields: Some(ComputedFields([])), mode: SimpleDict, extra_serializer: None, filter: SchemaFilter { include: None, exclude: None }, required_fields: 3 }), has_extra: false, root_model: false, name: "Point3d" })])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="default_camera_enable_sketch_mode", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "animated",                         lookup_key: Simple {                             key: "animated",                             py_key: Py(                                 0x00007fffe22e4470,                             ),                             path: LookupPath(                                 [                                     S(                                         "animated",                                         Py(                                             0x00007fffe22e4470,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe22e4470,                         ),                         validator: Bool(                             BoolValidator {                                 strict: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "distance_to_plane",                         lookup_key: Simple {                             key: "distance_to_plane",                             py_key: Py(                                 0x00007fffe1192b20,                             ),                             path: LookupPath(                                 [                                     S(                                         "distance_to_plane",                                         Py(                                             0x00007fffe1192b20,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe1192b20,                         ),                         validator: Float(                             FloatValidator {                                 strict: false,                                 allow_inf_nan: true,                             },                         ),                         frozen: false,                     },                     Field {                         name: "origin",                         lookup_key: Simple {                             key: "origin",                             py_key: Py(                                 0x00007fffff8f5730,                             ),                             path: LookupPath(                                 [                                     S(                                         "origin",                                         Py(                                             0x00007fffff8f5730,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8f5730,                         ),                         validator: DefinitionRef(                             DefinitionRefValidator {                                 definition: "kittycad.models.point3d.Point3d:93825014233264",                             },                         ),                         frozen: false,                     },                     Field {                         name: "ortho",                         lookup_key: Simple {                             key: "ortho",                             py_key: Py(                                 0x00007ffffddd9730,                             ),                             path: LookupPath(                                 [                                     S(                                         "ortho",                                         Py(                                             0x00007ffffddd9730,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007ffffddd9730,                         ),                         validator: Bool(                             BoolValidator {                                 strict: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe1197db0,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "default_camera_enable_sketch_mode": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe1197db0,                                                 ),                                             ],                                         },                                         expected_repr: "'default_camera_enable_sketch_mode'",                                         name: "literal['default_camera_enable_sketch_mode']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['default_camera_enable_sketch_mode']]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "x_axis",                         lookup_key: Simple {                             key: "x_axis",                             py_key: Py(                                 0x00007fffe1357070,                             ),                             path: LookupPath(                                 [                                     S(                                         "x_axis",                                         Py(                                             0x00007fffe1357070,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe1357070,                         ),                         validator: DefinitionRef(                             DefinitionRefValidator {                                 definition: "kittycad.models.point3d.Point3d:93825014233264",                             },                         ),                         frozen: false,                     },                     Field {                         name: "y_axis",                         lookup_key: Simple {                             key: "y_axis",                             py_key: Py(                                 0x00007fffe1108a30,                             ),                             path: LookupPath(                                 [                                     S(                                         "y_axis",                                         Py(                                             0x00007fffe1108a30,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe1108a30,                         ),                         validator: DefinitionRef(                             DefinitionRefValidator {                                 definition: "kittycad.models.point3d.Point3d:93825014233264",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "default_camera_enable_sketch_mode",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556ecf480,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "default_camera_enable_sketch_mode",     }, ), definitions=[Model(ModelValidator { revalidate: Never, validator: ModelFields(ModelFieldsValidator { fields: [Field { name: "x", lookup_key: Simple { key: "x", py_key: Py(0x7fffff8fe870), path: LookupPath([S("x", Py(0x7fffff8fe870))]) }, name_py: Py(0x7fffff8fe870), validator: Float(FloatValidator { strict: false, allow_inf_nan: true }), frozen: false }, Field { name: "y", lookup_key: Simple { key: "y", py_key: Py(0x7fffff72a730), path: LookupPath([S("y", Py(0x7fffff72a730))]) }, name_py: Py(0x7fffff72a730), validator: Float(FloatValidator { strict: false, allow_inf_nan: true }), frozen: false }, Field { name: "z", lookup_key: Simple { key: "z", py_key: Py(0x7fffff72a770), path: LookupPath([S("z", Py(0x7fffff72a770))]) }, name_py: Py(0x7fffff72a770), validator: Float(FloatValidator { strict: false, allow_inf_nan: true }), frozen: false }], model_name: "Point3d", extra_behavior: Ignore, extras_validator: None, strict: false, from_attributes: false, loc_by_alias: true }), class: Py(0x555556a4f8b0), post_init: None, frozen: false, custom_init: false, root_model: false, name: "Point3d" })])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, animated: bool, distance_to_plane: float, origin: kittycad.models.point3d.Point3d, ortho: bool, type: Literal['default_camera_enable_sketch_mode'] = 'default_camera_enable_sketch_mode', x_axis: kittycad.models.point3d.Point3d, y_axis: kittycad.models.point3d.Point3d) -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

animated: bool[source]
classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

distance_to_plane: float[source]
classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'animated': FieldInfo(annotation=bool, required=True), 'distance_to_plane': FieldInfo(annotation=float, required=True), 'origin': FieldInfo(annotation=Point3d, required=True), 'ortho': FieldInfo(annotation=bool, required=True), 'type': FieldInfo(annotation=Literal['default_camera_enable_sketch_mode'], required=False, default='default_camera_enable_sketch_mode'), 'x_axis': FieldInfo(annotation=Point3d, required=True), 'y_axis': FieldInfo(annotation=Point3d, required=True)}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

origin: Point3d[source]
ortho: bool[source]
classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['default_camera_enable_sketch_mode'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

x_axis: Point3d[source]
y_axis: Point3d[source]
class kittycad.models.modeling_cmd.default_camera_focus_on(**data)[source][source]

Focus default camera on object.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'type': typing.Literal['default_camera_focus_on'], 'uuid': <class 'str'>}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'type': FieldInfo(annotation=Literal['default_camera_focus_on'], required=False, default='default_camera_focus_on'), 'uuid': FieldInfo(annotation=str, required=True)}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.default_camera_focus_on'>, 'config': {'title': 'default_camera_focus_on'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.default_camera_focus_on'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.default_camera_focus_on'>>]}, 'ref': 'kittycad.models.modeling_cmd.default_camera_focus_on:93825018999520', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'default_camera_focus_on', 'schema': {'expected': ['default_camera_focus_on'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}, 'uuid': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'model-field'}}, 'model_name': 'default_camera_focus_on', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556edb2e0,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "uuid": SerField {                         key_py: Py(                             0x00007fffff0cf370,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Str(                                 StrSerializer,                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe10ce530,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "default_camera_focus_on",                                             },                                             expected_py: None,                                             name: "literal['default_camera_focus_on']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 2,             },         ),         has_extra: false,         root_model: false,         name: "default_camera_focus_on",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="default_camera_focus_on", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe10ce530,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "default_camera_focus_on": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe10ce530,                                                 ),                                             ],                                         },                                         expected_repr: "'default_camera_focus_on'",                                         name: "literal['default_camera_focus_on']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['default_camera_focus_on']]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "uuid",                         lookup_key: Simple {                             key: "uuid",                             py_key: Py(                                 0x00007fffff0cf370,                             ),                             path: LookupPath(                                 [                                     S(                                         "uuid",                                         Py(                                             0x00007fffff0cf370,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff0cf370,                         ),                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                 ],                 model_name: "default_camera_focus_on",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556edb2e0,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "default_camera_focus_on",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, type: Literal['default_camera_focus_on'] = 'default_camera_focus_on', uuid: str) -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'type': FieldInfo(annotation=Literal['default_camera_focus_on'], required=False, default='default_camera_focus_on'), 'uuid': FieldInfo(annotation=str, required=True)}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['default_camera_focus_on'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

uuid: str[source]
classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.default_camera_look_at(**data)[source][source]

Change what the default camera is looking at.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'center': <class 'kittycad.models.point3d.Point3d'>, 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'type': typing.Literal['default_camera_look_at'], 'up': <class 'kittycad.models.point3d.Point3d'>, 'vantage': <class 'kittycad.models.point3d.Point3d'>}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'center': FieldInfo(annotation=Point3d, required=True), 'type': FieldInfo(annotation=Literal['default_camera_look_at'], required=False, default='default_camera_look_at'), 'up': FieldInfo(annotation=Point3d, required=True), 'vantage': FieldInfo(annotation=Point3d, required=True)}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'definitions': [{'type': 'model', 'cls': <class 'kittycad.models.point3d.Point3d'>, 'schema': {'type': 'model-fields', 'fields': {'x': {'type': 'model-field', 'schema': {'type': 'float', 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'y': {'type': 'model-field', 'schema': {'type': 'float', 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'z': {'type': 'model-field', 'schema': {'type': 'float', 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}}, 'model_name': 'Point3d', 'computed_fields': []}, 'custom_init': False, 'root_model': False, 'config': {'title': 'Point3d'}, 'ref': 'kittycad.models.point3d.Point3d:93825014233264', 'metadata': {'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.point3d.Point3d'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.point3d.Point3d'>>], 'pydantic_js_annotation_functions': [], 'pydantic.internal.needs_apply_discriminated_union': False}}], 'schema': {'cls': <class 'kittycad.models.modeling_cmd.default_camera_look_at'>, 'config': {'title': 'default_camera_look_at'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.default_camera_look_at'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.default_camera_look_at'>>]}, 'ref': 'kittycad.models.modeling_cmd.default_camera_look_at:93825018904000', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'center': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'schema_ref': 'kittycad.models.point3d.Point3d:93825014233264', 'type': 'definition-ref'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'default_camera_look_at', 'schema': {'expected': ['default_camera_look_at'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}, 'up': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'schema_ref': 'kittycad.models.point3d.Point3d:93825014233264', 'type': 'definition-ref'}, 'type': 'model-field'}, 'vantage': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'schema_ref': 'kittycad.models.point3d.Point3d:93825014233264', 'type': 'definition-ref'}, 'type': 'model-field'}}, 'model_name': 'default_camera_look_at', 'type': 'model-fields'}, 'type': 'model'}, 'type': 'definitions'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556ec3dc0,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe11a75d0,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "default_camera_look_at",                                             },                                             expected_py: None,                                             name: "literal['default_camera_look_at']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                     "up": SerField {                         key_py: Py(                             0x00007ffffdc55170,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Recursive(                                 DefinitionRefSerializer {                                     definition: "kittycad.models.point3d.Point3d:93825014233264",                                 },                             ),                         ),                         required: true,                     },                     "center": SerField {                         key_py: Py(                             0x00007fffff920830,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Recursive(                                 DefinitionRefSerializer {                                     definition: "kittycad.models.point3d.Point3d:93825014233264",                                 },                             ),                         ),                         required: true,                     },                     "vantage": SerField {                         key_py: Py(                             0x00007fffe1126830,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Recursive(                                 DefinitionRefSerializer {                                     definition: "kittycad.models.point3d.Point3d:93825014233264",                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 4,             },         ),         has_extra: false,         root_model: false,         name: "default_camera_look_at",     }, ), definitions=[Model(ModelSerializer { class: Py(0x555556a4f8b0), serializer: Fields(GeneralFieldsSerializer { fields: {"x": SerField { key_py: Py(0x7fffff8fe870), alias: None, alias_py: None, serializer: Some(Float(FloatSerializer { inf_nan_mode: Null })), required: true }, "z": SerField { key_py: Py(0x7fffff72a770), alias: None, alias_py: None, serializer: Some(Float(FloatSerializer { inf_nan_mode: Null })), required: true }, "y": SerField { key_py: Py(0x7fffff72a730), alias: None, alias_py: None, serializer: Some(Float(FloatSerializer { inf_nan_mode: Null })), required: true }}, computed_fields: Some(ComputedFields([])), mode: SimpleDict, extra_serializer: None, filter: SchemaFilter { include: None, exclude: None }, required_fields: 3 }), has_extra: false, root_model: false, name: "Point3d" })])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="default_camera_look_at", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "center",                         lookup_key: Simple {                             key: "center",                             py_key: Py(                                 0x00007fffff920830,                             ),                             path: LookupPath(                                 [                                     S(                                         "center",                                         Py(                                             0x00007fffff920830,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff920830,                         ),                         validator: DefinitionRef(                             DefinitionRefValidator {                                 definition: "kittycad.models.point3d.Point3d:93825014233264",                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe11a75d0,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "default_camera_look_at": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe11a75d0,                                                 ),                                             ],                                         },                                         expected_repr: "'default_camera_look_at'",                                         name: "literal['default_camera_look_at']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['default_camera_look_at']]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "up",                         lookup_key: Simple {                             key: "up",                             py_key: Py(                                 0x00007ffffdc55170,                             ),                             path: LookupPath(                                 [                                     S(                                         "up",                                         Py(                                             0x00007ffffdc55170,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007ffffdc55170,                         ),                         validator: DefinitionRef(                             DefinitionRefValidator {                                 definition: "kittycad.models.point3d.Point3d:93825014233264",                             },                         ),                         frozen: false,                     },                     Field {                         name: "vantage",                         lookup_key: Simple {                             key: "vantage",                             py_key: Py(                                 0x00007fffe1126830,                             ),                             path: LookupPath(                                 [                                     S(                                         "vantage",                                         Py(                                             0x00007fffe1126830,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe1126830,                         ),                         validator: DefinitionRef(                             DefinitionRefValidator {                                 definition: "kittycad.models.point3d.Point3d:93825014233264",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "default_camera_look_at",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556ec3dc0,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "default_camera_look_at",     }, ), definitions=[Model(ModelValidator { revalidate: Never, validator: ModelFields(ModelFieldsValidator { fields: [Field { name: "x", lookup_key: Simple { key: "x", py_key: Py(0x7fffff8fe870), path: LookupPath([S("x", Py(0x7fffff8fe870))]) }, name_py: Py(0x7fffff8fe870), validator: Float(FloatValidator { strict: false, allow_inf_nan: true }), frozen: false }, Field { name: "y", lookup_key: Simple { key: "y", py_key: Py(0x7fffff72a730), path: LookupPath([S("y", Py(0x7fffff72a730))]) }, name_py: Py(0x7fffff72a730), validator: Float(FloatValidator { strict: false, allow_inf_nan: true }), frozen: false }, Field { name: "z", lookup_key: Simple { key: "z", py_key: Py(0x7fffff72a770), path: LookupPath([S("z", Py(0x7fffff72a770))]) }, name_py: Py(0x7fffff72a770), validator: Float(FloatValidator { strict: false, allow_inf_nan: true }), frozen: false }], model_name: "Point3d", extra_behavior: Ignore, extras_validator: None, strict: false, from_attributes: false, loc_by_alias: true }), class: Py(0x555556a4f8b0), post_init: None, frozen: false, custom_init: false, root_model: false, name: "Point3d" })])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, center: kittycad.models.point3d.Point3d, type: Literal['default_camera_look_at'] = 'default_camera_look_at', up: kittycad.models.point3d.Point3d, vantage: kittycad.models.point3d.Point3d) -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

center: Point3d[source]
classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'center': FieldInfo(annotation=Point3d, required=True), 'type': FieldInfo(annotation=Literal['default_camera_look_at'], required=False, default='default_camera_look_at'), 'up': FieldInfo(annotation=Point3d, required=True), 'vantage': FieldInfo(annotation=Point3d, required=True)}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['default_camera_look_at'][source]
up: Point3d[source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

vantage: Point3d[source]
class kittycad.models.modeling_cmd.default_camera_zoom(**data)[source][source]

Adjust zoom of the default camera.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'magnitude': <class 'float'>, 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'type': typing.Literal['default_camera_zoom']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'magnitude': FieldInfo(annotation=float, required=True), 'type': FieldInfo(annotation=Literal['default_camera_zoom'], required=False, default='default_camera_zoom')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.default_camera_zoom'>, 'config': {'title': 'default_camera_zoom'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.default_camera_zoom'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.default_camera_zoom'>>]}, 'ref': 'kittycad.models.modeling_cmd.default_camera_zoom:93825015381488', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'magnitude': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'default_camera_zoom', 'schema': {'expected': ['default_camera_zoom'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'default_camera_zoom', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556b67df0,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "magnitude": SerField {                         key_py: Py(                             0x00007ffffdbcf9b0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Float(                                 FloatSerializer {                                     inf_nan_mode: Null,                                 },                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe11a7b20,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "default_camera_zoom",                                             },                                             expected_py: None,                                             name: "literal['default_camera_zoom']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 2,             },         ),         has_extra: false,         root_model: false,         name: "default_camera_zoom",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="default_camera_zoom", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "magnitude",                         lookup_key: Simple {                             key: "magnitude",                             py_key: Py(                                 0x00007ffffdbcf9b0,                             ),                             path: LookupPath(                                 [                                     S(                                         "magnitude",                                         Py(                                             0x00007ffffdbcf9b0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007ffffdbcf9b0,                         ),                         validator: Float(                             FloatValidator {                                 strict: false,                                 allow_inf_nan: true,                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe11a7b20,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "default_camera_zoom": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe11a7b20,                                                 ),                                             ],                                         },                                         expected_repr: "'default_camera_zoom'",                                         name: "literal['default_camera_zoom']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['default_camera_zoom']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "default_camera_zoom",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556b67df0,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "default_camera_zoom",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, magnitude: float, type: Literal['default_camera_zoom'] = 'default_camera_zoom') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

magnitude: float[source]
property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'magnitude': FieldInfo(annotation=float, required=True), 'type': FieldInfo(annotation=Literal['default_camera_zoom'], required=False, default='default_camera_zoom')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['default_camera_zoom'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.density(**data)[source][source]

Get the density of entities in the scene or the default scene.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'entity_ids': typing.List[str], 'material_mass': <class 'float'>, 'material_mass_unit': <enum 'UnitMass'>, 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'output_unit': <enum 'UnitDensity'>, 'source_unit': <enum 'UnitLength'>, 'type': typing.Literal['density']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'entity_ids': FieldInfo(annotation=List[str], required=True), 'material_mass': FieldInfo(annotation=float, required=True), 'material_mass_unit': FieldInfo(annotation=UnitMass, required=True), 'output_unit': FieldInfo(annotation=UnitDensity, required=True), 'source_unit': FieldInfo(annotation=UnitLength, required=True), 'type': FieldInfo(annotation=Literal['density'], required=False, default='density')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.density'>, 'config': {'title': 'density'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.density'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.density'>>]}, 'ref': 'kittycad.models.modeling_cmd.density:93825020103728', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'entity_ids': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'items_schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'strict': False, 'type': 'list'}, 'type': 'model-field'}, 'material_mass': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}, 'material_mass_unit': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'lax_schema': {'steps': [{'type': 'str'}, {'type': 'function-plain', 'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}}], 'type': 'chain'}, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_functions': [<function get_enum_core_schema.<locals>.get_json_schema>]}, 'ref': 'kittycad.models.unit_mass.UnitMass:93825015376752', 'strict_schema': {'json_schema': {'function': {'function': <function get_enum_core_schema.<locals>.to_enum>, 'type': 'no-info'}, 'schema': {'type': 'str'}, 'type': 'function-after'}, 'python_schema': {'cls': <enum 'UnitMass'>, 'type': 'is-instance'}, 'type': 'json-or-python'}, 'type': 'lax-or-strict'}, 'type': 'model-field'}, 'output_unit': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'lax_schema': {'steps': [{'type': 'str'}, {'type': 'function-plain', 'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}}], 'type': 'chain'}, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_functions': [<function get_enum_core_schema.<locals>.get_json_schema>]}, 'ref': 'kittycad.models.unit_density.UnitDensity:93825015375808', 'strict_schema': {'json_schema': {'function': {'function': <function get_enum_core_schema.<locals>.to_enum>, 'type': 'no-info'}, 'schema': {'type': 'str'}, 'type': 'function-after'}, 'python_schema': {'cls': <enum 'UnitDensity'>, 'type': 'is-instance'}, 'type': 'json-or-python'}, 'type': 'lax-or-strict'}, 'type': 'model-field'}, 'source_unit': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'lax_schema': {'steps': [{'type': 'str'}, {'type': 'function-plain', 'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}}], 'type': 'chain'}, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_functions': [<function get_enum_core_schema.<locals>.get_json_schema>]}, 'ref': 'kittycad.models.unit_length.UnitLength:93825014613552', 'strict_schema': {'json_schema': {'function': {'function': <function get_enum_core_schema.<locals>.to_enum>, 'type': 'no-info'}, 'schema': {'type': 'str'}, 'type': 'function-after'}, 'python_schema': {'cls': <enum 'UnitLength'>, 'type': 'is-instance'}, 'type': 'json-or-python'}, 'type': 'lax-or-strict'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'density', 'schema': {'expected': ['density'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'density', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_control_points': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_end_points': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_fade': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_set_opacity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'get_entity_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'handle_mouse_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'handle_mouse_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'handle_mouse_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entities': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'import_files': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_axes_gizmo': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_plane': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_click': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'new_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_bring_to_front': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_visible': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_curve_uuids_for_vertices': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_info': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_vertex_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'plane_intersect_and_project': <pydantic._internal._model_construction._PydanticWeakRef object>, 'plane_set_color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'reconfigure_stream': <pydantic._internal._model_construction._PydanticWeakRef object>, 'remove_scene_objects': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'send_object': <pydantic._internal._model_construction._PydanticWeakRef object>, 'set_tool': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_disable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_enable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid2d_add_hole': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_edge_faces': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_opposite_edges': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_next_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_opposite_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_prev_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'take_snapshot': <pydantic._internal._model_construction._PydanticWeakRef object>, 'update_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556fe8c30,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "material_mass": SerField {                         key_py: Py(                             0x00007fffe14f0d30,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Float(                                 FloatSerializer {                                     inf_nan_mode: Null,                                 },                             ),                         ),                         required: true,                     },                     "entity_ids": SerField {                         key_py: Py(                             0x00007fffe118cc70,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             List(                                 ListSerializer {                                     item_serializer: Str(                                         StrSerializer,                                     ),                                     filter: SchemaFilter {                                         include: None,                                         exclude: None,                                     },                                     name: "list[str]",                                 },                             ),                         ),                         required: true,                     },                     "output_unit": SerField {                         key_py: Py(                             0x00007fffe14f4170,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             JsonOrPython(                                 JsonOrPythonSerializer {                                     json: Str(                                         StrSerializer,                                     ),                                     python: Any(                                         AnySerializer,                                     ),                                     name: "json-or-python[json=str, python=any]",                                 },                             ),                         ),                         required: true,                     },                     "source_unit": SerField {                         key_py: Py(                             0x00007fffe10dd370,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             JsonOrPython(                                 JsonOrPythonSerializer {                                     json: Str(                                         StrSerializer,                                     ),                                     python: Any(                                         AnySerializer,                                     ),                                     name: "json-or-python[json=str, python=any]",                                 },                             ),                         ),                         required: true,                     },                     "material_mass_unit": SerField {                         key_py: Py(                             0x00007fffe14cde40,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             JsonOrPython(                                 JsonOrPythonSerializer {                                     json: Str(                                         StrSerializer,                                     ),                                     python: Any(                                         AnySerializer,                                     ),                                     name: "json-or-python[json=str, python=any]",                                 },                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007ffffd5e7cf0,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "density",                                             },                                             expected_py: None,                                             name: "literal['density']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 6,             },         ),         has_extra: false,         root_model: false,         name: "density",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="density", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "entity_ids",                         lookup_key: Simple {                             key: "entity_ids",                             py_key: Py(                                 0x00007fffe118cc70,                             ),                             path: LookupPath(                                 [                                     S(                                         "entity_ids",                                         Py(                                             0x00007fffe118cc70,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe118cc70,                         ),                         validator: List(                             ListValidator {                                 strict: false,                                 item_validator: Some(                                     Str(                                         StrValidator {                                             strict: false,                                             coerce_numbers_to_str: false,                                         },                                     ),                                 ),                                 min_length: None,                                 max_length: None,                                 name: OnceLock(                                     <uninit>,                                 ),                             },                         ),                         frozen: false,                     },                     Field {                         name: "material_mass",                         lookup_key: Simple {                             key: "material_mass",                             py_key: Py(                                 0x00007fffe14f0d30,                             ),                             path: LookupPath(                                 [                                     S(                                         "material_mass",                                         Py(                                             0x00007fffe14f0d30,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe14f0d30,                         ),                         validator: Float(                             FloatValidator {                                 strict: false,                                 allow_inf_nan: true,                             },                         ),                         frozen: false,                     },                     Field {                         name: "material_mass_unit",                         lookup_key: Simple {                             key: "material_mass_unit",                             py_key: Py(                                 0x00007fffe14cde40,                             ),                             path: LookupPath(                                 [                                     S(                                         "material_mass_unit",                                         Py(                                             0x00007fffe14cde40,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe14cde40,                         ),                         validator: LaxOrStrict(                             LaxOrStrictValidator {                                 strict: false,                                 lax_validator: Chain(                                     ChainValidator {                                         steps: [                                             Str(                                                 StrValidator {                                                     strict: false,                                                     coerce_numbers_to_str: false,                                                 },                                             ),                                             FunctionPlain(                                                 FunctionPlainValidator {                                                     func: Py(                                                         0x00007fffe0ea0af0,                                                     ),                                                     config: Py(                                                         0x00007fffe0e59580,                                                     ),                                                     name: "function-plain[to_enum()]",                                                     field_name: None,                                                     info_arg: false,                                                 },                                             ),                                         ],                                         name: "chain[str,function-plain[to_enum()]]",                                     },                                 ),                                 strict_validator: JsonOrPython(                                     JsonOrPython {                                         json: FunctionAfter(                                             FunctionAfterValidator {                                                 validator: Str(                                                     StrValidator {                                                         strict: false,                                                         coerce_numbers_to_str: false,                                                     },                                                 ),                                                 func: Py(                                                     0x00007fffe0ea0af0,                                                 ),                                                 config: Py(                                                     0x00007fffe0e59580,                                                 ),                                                 name: "function-after[to_enum(), str]",                                                 field_name: None,                                                 info_arg: false,                                             },                                         ),                                         python: IsInstance(                                             IsInstanceValidator {                                                 class: Py(                                                     0x0000555556b66b70,                                                 ),                                                 class_repr: "UnitMass",                                                 name: "is-instance[UnitMass]",                                             },                                         ),                                         name: "json-or-python[json=function-after[to_enum(), str],python=is-instance[UnitMass]]",                                     },                                 ),                                 name: "lax-or-strict[lax=chain[str,function-plain[to_enum()]],strict=json-or-python[json=function-after[to_enum(), str],python=is-instance[UnitMass]]]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "output_unit",                         lookup_key: Simple {                             key: "output_unit",                             py_key: Py(                                 0x00007fffe14f4170,                             ),                             path: LookupPath(                                 [                                     S(                                         "output_unit",                                         Py(                                             0x00007fffe14f4170,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe14f4170,                         ),                         validator: LaxOrStrict(                             LaxOrStrictValidator {                                 strict: false,                                 lax_validator: Chain(                                     ChainValidator {                                         steps: [                                             Str(                                                 StrValidator {                                                     strict: false,                                                     coerce_numbers_to_str: false,                                                 },                                             ),                                             FunctionPlain(                                                 FunctionPlainValidator {                                                     func: Py(                                                         0x00007fffe0ea03a0,                                                     ),                                                     config: Py(                                                         0x00007fffe0e59580,                                                     ),                                                     name: "function-plain[to_enum()]",                                                     field_name: None,                                                     info_arg: false,                                                 },                                             ),                                         ],                                         name: "chain[str,function-plain[to_enum()]]",                                     },                                 ),                                 strict_validator: JsonOrPython(                                     JsonOrPython {                                         json: FunctionAfter(                                             FunctionAfterValidator {                                                 validator: Str(                                                     StrValidator {                                                         strict: false,                                                         coerce_numbers_to_str: false,                                                     },                                                 ),                                                 func: Py(                                                     0x00007fffe0ea03a0,                                                 ),                                                 config: Py(                                                     0x00007fffe0e59580,                                                 ),                                                 name: "function-after[to_enum(), str]",                                                 field_name: None,                                                 info_arg: false,                                             },                                         ),                                         python: IsInstance(                                             IsInstanceValidator {                                                 class: Py(                                                     0x0000555556b667c0,                                                 ),                                                 class_repr: "UnitDensity",                                                 name: "is-instance[UnitDensity]",                                             },                                         ),                                         name: "json-or-python[json=function-after[to_enum(), str],python=is-instance[UnitDensity]]",                                     },                                 ),                                 name: "lax-or-strict[lax=chain[str,function-plain[to_enum()]],strict=json-or-python[json=function-after[to_enum(), str],python=is-instance[UnitDensity]]]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "source_unit",                         lookup_key: Simple {                             key: "source_unit",                             py_key: Py(                                 0x00007fffe10dd370,                             ),                             path: LookupPath(                                 [                                     S(                                         "source_unit",                                         Py(                                             0x00007fffe10dd370,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe10dd370,                         ),                         validator: LaxOrStrict(                             LaxOrStrictValidator {                                 strict: false,                                 lax_validator: Chain(                                     ChainValidator {                                         steps: [                                             Str(                                                 StrValidator {                                                     strict: false,                                                     coerce_numbers_to_str: false,                                                 },                                             ),                                             FunctionPlain(                                                 FunctionPlainValidator {                                                     func: Py(                                                         0x00007fffe0ea0dc0,                                                     ),                                                     config: Py(                                                         0x00007fffe0e59580,                                                     ),                                                     name: "function-plain[to_enum()]",                                                     field_name: None,                                                     info_arg: false,                                                 },                                             ),                                         ],                                         name: "chain[str,function-plain[to_enum()]]",                                     },                                 ),                                 strict_validator: JsonOrPython(                                     JsonOrPython {                                         json: FunctionAfter(                                             FunctionAfterValidator {                                                 validator: Str(                                                     StrValidator {                                                         strict: false,                                                         coerce_numbers_to_str: false,                                                     },                                                 ),                                                 func: Py(                                                     0x00007fffe0ea0dc0,                                                 ),                                                 config: Py(                                                     0x00007fffe0e59580,                                                 ),                                                 name: "function-after[to_enum(), str]",                                                 field_name: None,                                                 info_arg: false,                                             },                                         ),                                         python: IsInstance(                                             IsInstanceValidator {                                                 class: Py(                                                     0x0000555556aac630,                                                 ),                                                 class_repr: "UnitLength",                                                 name: "is-instance[UnitLength]",                                             },                                         ),                                         name: "json-or-python[json=function-after[to_enum(), str],python=is-instance[UnitLength]]",                                     },                                 ),                                 name: "lax-or-strict[lax=chain[str,function-plain[to_enum()]],strict=json-or-python[json=function-after[to_enum(), str],python=is-instance[UnitLength]]]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007ffffd5e7cf0,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "density": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007ffffd5e7cf0,                                                 ),                                             ],                                         },                                         expected_repr: "'density'",                                         name: "literal['density']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['density']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "density",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556fe8c30,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "density",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, entity_ids: List[str], material_mass: float, material_mass_unit: kittycad.models.unit_mass.UnitMass, output_unit: kittycad.models.unit_density.UnitDensity, source_unit: kittycad.models.unit_length.UnitLength, type: Literal['density'] = 'density') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

entity_ids: List[str][source]
classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

material_mass: float[source]
material_mass_unit: UnitMass[source]
property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'entity_ids': FieldInfo(annotation=List[str], required=True), 'material_mass': FieldInfo(annotation=float, required=True), 'material_mass_unit': FieldInfo(annotation=UnitMass, required=True), 'output_unit': FieldInfo(annotation=UnitDensity, required=True), 'source_unit': FieldInfo(annotation=UnitLength, required=True), 'type': FieldInfo(annotation=Literal['density'], required=False, default='density')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

output_unit: UnitDensity[source]
classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

source_unit: UnitLength[source]
type: Literal['density'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.edit_mode_enter(**data)[source][source]

Enter edit mode

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'target': <class 'str'>, 'type': typing.Literal['edit_mode_enter']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'target': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['edit_mode_enter'], required=False, default='edit_mode_enter')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.edit_mode_enter'>, 'config': {'title': 'edit_mode_enter'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.edit_mode_enter'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.edit_mode_enter'>>]}, 'ref': 'kittycad.models.modeling_cmd.edit_mode_enter:93825019210752', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'target': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'edit_mode_enter', 'schema': {'expected': ['edit_mode_enter'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'edit_mode_enter', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556f0ec00,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "target": SerField {                         key_py: Py(                             0x00007fffff8f95f0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Str(                                 StrSerializer,                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe11279b0,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "edit_mode_enter",                                             },                                             expected_py: None,                                             name: "literal['edit_mode_enter']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 2,             },         ),         has_extra: false,         root_model: false,         name: "edit_mode_enter",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="edit_mode_enter", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "target",                         lookup_key: Simple {                             key: "target",                             py_key: Py(                                 0x00007fffff8f95f0,                             ),                             path: LookupPath(                                 [                                     S(                                         "target",                                         Py(                                             0x00007fffff8f95f0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8f95f0,                         ),                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe11279b0,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "edit_mode_enter": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe11279b0,                                                 ),                                             ],                                         },                                         expected_repr: "'edit_mode_enter'",                                         name: "literal['edit_mode_enter']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['edit_mode_enter']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "edit_mode_enter",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556f0ec00,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "edit_mode_enter",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, target: str, type: Literal['edit_mode_enter'] = 'edit_mode_enter') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'target': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['edit_mode_enter'], required=False, default='edit_mode_enter')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

target: str[source]
type: Literal['edit_mode_enter'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.edit_mode_exit(**data)[source][source]

Exit edit mode

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'type': typing.Literal['edit_mode_exit']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'type': FieldInfo(annotation=Literal['edit_mode_exit'], required=False, default='edit_mode_exit')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.edit_mode_exit'>, 'config': {'title': 'edit_mode_exit'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.edit_mode_exit'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.edit_mode_exit'>>]}, 'ref': 'kittycad.models.modeling_cmd.edit_mode_exit:93825019221456', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'edit_mode_exit', 'schema': {'expected': ['edit_mode_exit'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'edit_mode_exit', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556f115d0,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe10ebb30,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "edit_mode_exit",                                             },                                             expected_py: None,                                             name: "literal['edit_mode_exit']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 1,             },         ),         has_extra: false,         root_model: false,         name: "edit_mode_exit",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="edit_mode_exit", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe10ebb30,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "edit_mode_exit": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe10ebb30,                                                 ),                                             ],                                         },                                         expected_repr: "'edit_mode_exit'",                                         name: "literal['edit_mode_exit']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['edit_mode_exit']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "edit_mode_exit",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556f115d0,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "edit_mode_exit",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, type: Literal['edit_mode_exit'] = 'edit_mode_exit') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'type': FieldInfo(annotation=Literal['edit_mode_exit'], required=False, default='edit_mode_exit')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['edit_mode_exit'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.entity_fade(**data)[source][source]

Fade the entity in or out.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'duration_seconds': typing.Optional[float], 'entity_id': <class 'str'>, 'fade_in': <class 'bool'>, 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'type': typing.Literal['entity_fade']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'duration_seconds': FieldInfo(annotation=Union[float, NoneType], required=False), 'entity_id': FieldInfo(annotation=str, required=True), 'fade_in': FieldInfo(annotation=bool, required=True), 'type': FieldInfo(annotation=Literal['entity_fade'], required=False, default='entity_fade')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.entity_fade'>, 'config': {'title': 'entity_fade'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.entity_fade'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.entity_fade'>>]}, 'ref': 'kittycad.models.modeling_cmd.entity_fade:93825019613056', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'duration_seconds': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': None, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'entity_id': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'model-field'}, 'fade_in': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'bool'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'entity_fade', 'schema': {'expected': ['entity_fade'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'entity_fade', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_set_opacity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'get_entity_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entities': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'new_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_bring_to_front': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_visible': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'send_object': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid2d_add_hole': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_edge_faces': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_opposite_edges': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_next_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_opposite_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_prev_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'update_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556f70f80,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "duration_seconds": SerField {                         key_py: Py(                             0x00007fffe113e710,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007ffffff85420,                                         ),                                     ),                                     serializer: Nullable(                                         NullableSerializer {                                             serializer: Float(                                                 FloatSerializer {                                                     inf_nan_mode: Null,                                                 },                                             ),                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                     "fade_in": SerField {                         key_py: Py(                             0x00007fffe114d5f0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Bool(                                 BoolSerializer,                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe10826f0,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "entity_fade",                                             },                                             expected_py: None,                                             name: "literal['entity_fade']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                     "entity_id": SerField {                         key_py: Py(                             0x00007fffe1186df0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Str(                                 StrSerializer,                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 4,             },         ),         has_extra: false,         root_model: false,         name: "entity_fade",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="entity_fade", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "duration_seconds",                         lookup_key: Simple {                             key: "duration_seconds",                             py_key: Py(                                 0x00007fffe113e710,                             ),                             path: LookupPath(                                 [                                     S(                                         "duration_seconds",                                         Py(                                             0x00007fffe113e710,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe113e710,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007ffffff85420,                                     ),                                 ),                                 on_error: Raise,                                 validator: Nullable(                                     NullableValidator {                                         validator: Float(                                             FloatValidator {                                                 strict: false,                                                 allow_inf_nan: true,                                             },                                         ),                                         name: "nullable[float]",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[nullable[float]]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "entity_id",                         lookup_key: Simple {                             key: "entity_id",                             py_key: Py(                                 0x00007fffe1186df0,                             ),                             path: LookupPath(                                 [                                     S(                                         "entity_id",                                         Py(                                             0x00007fffe1186df0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe1186df0,                         ),                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "fade_in",                         lookup_key: Simple {                             key: "fade_in",                             py_key: Py(                                 0x00007fffe114d5f0,                             ),                             path: LookupPath(                                 [                                     S(                                         "fade_in",                                         Py(                                             0x00007fffe114d5f0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe114d5f0,                         ),                         validator: Bool(                             BoolValidator {                                 strict: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe10826f0,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "entity_fade": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe10826f0,                                                 ),                                             ],                                         },                                         expected_repr: "'entity_fade'",                                         name: "literal['entity_fade']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['entity_fade']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "entity_fade",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556f70f80,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "entity_fade",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, duration_seconds: Optional[float] = None, entity_id: str, fade_in: bool, type: Literal['entity_fade'] = 'entity_fade') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

duration_seconds: Optional[float][source]
entity_id: str[source]
fade_in: bool[source]
classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'duration_seconds': FieldInfo(annotation=Union[float, NoneType], required=False), 'entity_id': FieldInfo(annotation=str, required=True), 'fade_in': FieldInfo(annotation=bool, required=True), 'type': FieldInfo(annotation=Literal['entity_fade'], required=False, default='entity_fade')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['entity_fade'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.entity_get_all_child_uuids(**data)[source][source]

What are all UUIDs of this entity’s children?

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'entity_id': <class 'str'>, 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'type': typing.Literal['entity_get_all_child_uuids']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'entity_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['entity_get_all_child_uuids'], required=False, default='entity_get_all_child_uuids')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.entity_get_all_child_uuids'>, 'config': {'title': 'entity_get_all_child_uuids'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.entity_get_all_child_uuids'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.entity_get_all_child_uuids'>>]}, 'ref': 'kittycad.models.modeling_cmd.entity_get_all_child_uuids:93825019189712', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'entity_id': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'entity_get_all_child_uuids', 'schema': {'expected': ['entity_get_all_child_uuids'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'entity_get_all_child_uuids', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556f099d0,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "entity_id": SerField {                         key_py: Py(                             0x00007fffe1186df0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Str(                                 StrSerializer,                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe1c91bc0,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "entity_get_all_child_uuids",                                             },                                             expected_py: None,                                             name: "literal['entity_get_all_child_uuids']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 2,             },         ),         has_extra: false,         root_model: false,         name: "entity_get_all_child_uuids",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="entity_get_all_child_uuids", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "entity_id",                         lookup_key: Simple {                             key: "entity_id",                             py_key: Py(                                 0x00007fffe1186df0,                             ),                             path: LookupPath(                                 [                                     S(                                         "entity_id",                                         Py(                                             0x00007fffe1186df0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe1186df0,                         ),                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe1c91bc0,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "entity_get_all_child_uuids": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe1c91bc0,                                                 ),                                             ],                                         },                                         expected_repr: "'entity_get_all_child_uuids'",                                         name: "literal['entity_get_all_child_uuids']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['entity_get_all_child_uuids']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "entity_get_all_child_uuids",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556f099d0,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "entity_get_all_child_uuids",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, entity_id: str, type: Literal['entity_get_all_child_uuids'] = 'entity_get_all_child_uuids') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

entity_id: str[source]
classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'entity_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['entity_get_all_child_uuids'], required=False, default='entity_get_all_child_uuids')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['entity_get_all_child_uuids'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.entity_get_child_uuid(**data)[source][source]

What is the UUID of this entity’s n-th child?

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'child_index': <class 'int'>, 'entity_id': <class 'str'>, 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'type': typing.Literal['entity_get_child_uuid']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'child_index': FieldInfo(annotation=int, required=True), 'entity_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['entity_get_child_uuid'], required=False, default='entity_get_child_uuid')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.entity_get_child_uuid'>, 'config': {'title': 'entity_get_child_uuid'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.entity_get_child_uuid'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.entity_get_child_uuid'>>]}, 'ref': 'kittycad.models.modeling_cmd.entity_get_child_uuid:93825019188208', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'child_index': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'int'}, 'type': 'model-field'}, 'entity_id': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'entity_get_child_uuid', 'schema': {'expected': ['entity_get_child_uuid'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'entity_get_child_uuid', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556f093f0,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "entity_id": SerField {                         key_py: Py(                             0x00007fffe1186df0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Str(                                 StrSerializer,                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe1c91c10,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "entity_get_child_uuid",                                             },                                             expected_py: None,                                             name: "literal['entity_get_child_uuid']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                     "child_index": SerField {                         key_py: Py(                             0x00007fffe10dd0b0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Int(                                 IntSerializer,                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 3,             },         ),         has_extra: false,         root_model: false,         name: "entity_get_child_uuid",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="entity_get_child_uuid", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "child_index",                         lookup_key: Simple {                             key: "child_index",                             py_key: Py(                                 0x00007fffe10dd0b0,                             ),                             path: LookupPath(                                 [                                     S(                                         "child_index",                                         Py(                                             0x00007fffe10dd0b0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe10dd0b0,                         ),                         validator: Int(                             IntValidator {                                 strict: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "entity_id",                         lookup_key: Simple {                             key: "entity_id",                             py_key: Py(                                 0x00007fffe1186df0,                             ),                             path: LookupPath(                                 [                                     S(                                         "entity_id",                                         Py(                                             0x00007fffe1186df0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe1186df0,                         ),                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe1c91c10,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "entity_get_child_uuid": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe1c91c10,                                                 ),                                             ],                                         },                                         expected_repr: "'entity_get_child_uuid'",                                         name: "literal['entity_get_child_uuid']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['entity_get_child_uuid']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "entity_get_child_uuid",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556f093f0,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "entity_get_child_uuid",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, child_index: int, entity_id: str, type: Literal['entity_get_child_uuid'] = 'entity_get_child_uuid') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

child_index: int[source]
classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

entity_id: str[source]
classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'child_index': FieldInfo(annotation=int, required=True), 'entity_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['entity_get_child_uuid'], required=False, default='entity_get_child_uuid')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['entity_get_child_uuid'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.entity_get_num_children(**data)[source][source]

How many children does the entity have?

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'entity_id': <class 'str'>, 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'type': typing.Literal['entity_get_num_children']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'entity_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['entity_get_num_children'], required=False, default='entity_get_num_children')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.entity_get_num_children'>, 'config': {'title': 'entity_get_num_children'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.entity_get_num_children'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.entity_get_num_children'>>]}, 'ref': 'kittycad.models.modeling_cmd.entity_get_num_children:93825019020240', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'entity_id': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'entity_get_num_children', 'schema': {'expected': ['entity_get_num_children'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'entity_get_num_children', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556ee03d0,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "entity_id": SerField {                         key_py: Py(                             0x00007fffe1186df0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Str(                                 StrSerializer,                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe1c91c60,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "entity_get_num_children",                                             },                                             expected_py: None,                                             name: "literal['entity_get_num_children']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 2,             },         ),         has_extra: false,         root_model: false,         name: "entity_get_num_children",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="entity_get_num_children", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "entity_id",                         lookup_key: Simple {                             key: "entity_id",                             py_key: Py(                                 0x00007fffe1186df0,                             ),                             path: LookupPath(                                 [                                     S(                                         "entity_id",                                         Py(                                             0x00007fffe1186df0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe1186df0,                         ),                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe1c91c60,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "entity_get_num_children": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe1c91c60,                                                 ),                                             ],                                         },                                         expected_repr: "'entity_get_num_children'",                                         name: "literal['entity_get_num_children']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['entity_get_num_children']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "entity_get_num_children",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556ee03d0,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "entity_get_num_children",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, entity_id: str, type: Literal['entity_get_num_children'] = 'entity_get_num_children') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

entity_id: str[source]
classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'entity_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['entity_get_num_children'], required=False, default='entity_get_num_children')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['entity_get_num_children'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.entity_get_parent_id(**data)[source][source]

What is this entity’s parent?

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'entity_id': <class 'str'>, 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'type': typing.Literal['entity_get_parent_id']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'entity_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['entity_get_parent_id'], required=False, default='entity_get_parent_id')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.entity_get_parent_id'>, 'config': {'title': 'entity_get_parent_id'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.entity_get_parent_id'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.entity_get_parent_id'>>]}, 'ref': 'kittycad.models.modeling_cmd.entity_get_parent_id:93825019009888', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'entity_id': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'entity_get_parent_id', 'schema': {'expected': ['entity_get_parent_id'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'entity_get_parent_id', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556eddb60,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "entity_id": SerField {                         key_py: Py(                             0x00007fffe1186df0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Str(                                 StrSerializer,                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe1c91cb0,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "entity_get_parent_id",                                             },                                             expected_py: None,                                             name: "literal['entity_get_parent_id']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 2,             },         ),         has_extra: false,         root_model: false,         name: "entity_get_parent_id",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="entity_get_parent_id", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "entity_id",                         lookup_key: Simple {                             key: "entity_id",                             py_key: Py(                                 0x00007fffe1186df0,                             ),                             path: LookupPath(                                 [                                     S(                                         "entity_id",                                         Py(                                             0x00007fffe1186df0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe1186df0,                         ),                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe1c91cb0,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "entity_get_parent_id": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe1c91cb0,                                                 ),                                             ],                                         },                                         expected_repr: "'entity_get_parent_id'",                                         name: "literal['entity_get_parent_id']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['entity_get_parent_id']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "entity_get_parent_id",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556eddb60,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "entity_get_parent_id",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, entity_id: str, type: Literal['entity_get_parent_id'] = 'entity_get_parent_id') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

entity_id: str[source]
classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'entity_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['entity_get_parent_id'], required=False, default='entity_get_parent_id')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['entity_get_parent_id'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.entity_set_opacity(**data)[source][source]

Set opacity of the entity.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'entity_id': <class 'str'>, 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'opacity': <class 'float'>, 'type': typing.Literal['entity_set_opacity']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'entity_id': FieldInfo(annotation=str, required=True), 'opacity': FieldInfo(annotation=float, required=True), 'type': FieldInfo(annotation=Literal['entity_set_opacity'], required=False, default='entity_set_opacity')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.entity_set_opacity'>, 'config': {'title': 'entity_set_opacity'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.entity_set_opacity'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.entity_set_opacity'>>]}, 'ref': 'kittycad.models.modeling_cmd.entity_set_opacity:93825019602688', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'entity_id': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'model-field'}, 'opacity': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'entity_set_opacity', 'schema': {'expected': ['entity_set_opacity'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'entity_set_opacity', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'get_entity_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entities': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'new_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_bring_to_front': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_visible': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'send_object': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid2d_add_hole': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_edge_faces': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_opposite_edges': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_next_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_opposite_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_prev_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'update_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556f6e700,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe113e620,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "entity_set_opacity",                                             },                                             expected_py: None,                                             name: "literal['entity_set_opacity']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                     "entity_id": SerField {                         key_py: Py(                             0x00007fffe1186df0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Str(                                 StrSerializer,                             ),                         ),                         required: true,                     },                     "opacity": SerField {                         key_py: Py(                             0x00007ffffdc806b0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Float(                                 FloatSerializer {                                     inf_nan_mode: Null,                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 3,             },         ),         has_extra: false,         root_model: false,         name: "entity_set_opacity",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="entity_set_opacity", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "entity_id",                         lookup_key: Simple {                             key: "entity_id",                             py_key: Py(                                 0x00007fffe1186df0,                             ),                             path: LookupPath(                                 [                                     S(                                         "entity_id",                                         Py(                                             0x00007fffe1186df0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe1186df0,                         ),                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "opacity",                         lookup_key: Simple {                             key: "opacity",                             py_key: Py(                                 0x00007ffffdc806b0,                             ),                             path: LookupPath(                                 [                                     S(                                         "opacity",                                         Py(                                             0x00007ffffdc806b0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007ffffdc806b0,                         ),                         validator: Float(                             FloatValidator {                                 strict: false,                                 allow_inf_nan: true,                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe113e620,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "entity_set_opacity": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe113e620,                                                 ),                                             ],                                         },                                         expected_repr: "'entity_set_opacity'",                                         name: "literal['entity_set_opacity']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['entity_set_opacity']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "entity_set_opacity",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556f6e700,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "entity_set_opacity",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, entity_id: str, opacity: float, type: Literal['entity_set_opacity'] = 'entity_set_opacity') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

entity_id: str[source]
classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'entity_id': FieldInfo(annotation=str, required=True), 'opacity': FieldInfo(annotation=float, required=True), 'type': FieldInfo(annotation=Literal['entity_set_opacity'], required=False, default='entity_set_opacity')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

opacity: float[source]
classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['entity_set_opacity'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.export(**data)[source][source]

Export the scene to a file.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'entity_ids': typing.List[str], 'format': <class 'pydantic.root_model.RootModel[Annotated[Union[kittycad.models.output_format.fbx, kittycad.models.output_format.gltf, kittycad.models.output_format.obj, kittycad.models.output_format.ply, kittycad.models.output_format.step, kittycad.models.output_format.stl], FieldInfo(annotation=NoneType, required=True, discriminator='type')]]'>, 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'source_unit': <enum 'UnitLength'>, 'type': typing.Literal['export']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'entity_ids': FieldInfo(annotation=List[str], required=True), 'format': FieldInfo(annotation=RootModel[Annotated[Union[kittycad.models.output_format.fbx, kittycad.models.output_format.gltf, kittycad.models.output_format.obj, kittycad.models.output_format.ply, kittycad.models.output_format.step, kittycad.models.output_format.stl], FieldInfo(annotation=NoneType, required=True, discriminator='type')]], required=True), 'source_unit': FieldInfo(annotation=UnitLength, required=True), 'type': FieldInfo(annotation=Literal['export'], required=False, default='export')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'definitions': [{'type': 'model', 'cls': <class 'kittycad.models.axis_direction_pair.AxisDirectionPair'>, 'schema': {'type': 'model-fields', 'fields': {'axis': {'type': 'model-field', 'schema': {'type': 'definition-ref', 'schema_ref': 'kittycad.models.axis.Axis:93825014567168'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'direction': {'type': 'model-field', 'schema': {'type': 'definition-ref', 'schema_ref': 'kittycad.models.direction.Direction:93825014568112'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}}, 'model_name': 'AxisDirectionPair', 'computed_fields': []}, 'custom_init': False, 'root_model': False, 'config': {'title': 'AxisDirectionPair'}, 'ref': 'kittycad.models.axis_direction_pair.AxisDirectionPair:93825014569648', 'metadata': {'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.axis_direction_pair.AxisDirectionPair'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.axis_direction_pair.AxisDirectionPair'>>], 'pydantic_js_annotation_functions': [], 'pydantic.internal.needs_apply_discriminated_union': False}}, {'type': 'lax-or-strict', 'lax_schema': {'type': 'chain', 'steps': [{'type': 'str'}, {'type': 'function-plain', 'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}}]}, 'strict_schema': {'type': 'json-or-python', 'json_schema': {'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}, 'schema': {'type': 'str'}, 'type': 'function-after'}, 'python_schema': {'type': 'is-instance', 'cls': <enum 'Axis'>}}, 'ref': 'kittycad.models.axis.Axis:93825014567168', 'metadata': {'pydantic_js_functions': [<function get_enum_core_schema.<locals>.get_json_schema>], 'pydantic.internal.needs_apply_discriminated_union': False}}, {'type': 'lax-or-strict', 'lax_schema': {'type': 'chain', 'steps': [{'type': 'str'}, {'type': 'function-plain', 'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}}]}, 'strict_schema': {'type': 'json-or-python', 'json_schema': {'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}, 'schema': {'type': 'str'}, 'type': 'function-after'}, 'python_schema': {'type': 'is-instance', 'cls': <enum 'Direction'>}}, 'ref': 'kittycad.models.direction.Direction:93825014568112', 'metadata': {'pydantic_js_functions': [<function get_enum_core_schema.<locals>.get_json_schema>], 'pydantic.internal.needs_apply_discriminated_union': False}}, {'type': 'model', 'cls': <class 'kittycad.models.system.System'>, 'schema': {'type': 'model-fields', 'fields': {'forward': {'type': 'model-field', 'schema': {'type': 'definition-ref', 'schema_ref': 'kittycad.models.axis_direction_pair.AxisDirectionPair:93825014569648'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'up': {'type': 'model-field', 'schema': {'type': 'definition-ref', 'schema_ref': 'kittycad.models.axis_direction_pair.AxisDirectionPair:93825014569648'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}}, 'model_name': 'System', 'computed_fields': []}, 'custom_init': False, 'root_model': False, 'config': {'title': 'System'}, 'ref': 'kittycad.models.system.System:93825014588992', 'metadata': {'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.system.System'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.system.System'>>], 'pydantic_js_annotation_functions': [], 'pydantic.internal.needs_apply_discriminated_union': False}}, {'type': 'lax-or-strict', 'lax_schema': {'type': 'chain', 'steps': [{'type': 'str'}, {'type': 'function-plain', 'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}}]}, 'strict_schema': {'type': 'json-or-python', 'json_schema': {'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}, 'schema': {'type': 'str'}, 'type': 'function-after'}, 'python_schema': {'type': 'is-instance', 'cls': <enum 'UnitLength'>}}, 'ref': 'kittycad.models.unit_length.UnitLength:93825014613552', 'metadata': {'pydantic_js_functions': [<function get_enum_core_schema.<locals>.get_json_schema>], 'pydantic.internal.needs_apply_discriminated_union': False}}, {'type': 'model', 'cls': <class 'kittycad.models.selection.default_scene'>, 'schema': {'type': 'model-fields', 'fields': {'type': {'type': 'model-field', 'schema': {'type': 'default', 'schema': {'type': 'literal', 'expected': ['default_scene'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'default': 'default_scene'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}}, 'model_name': 'default_scene', 'computed_fields': []}, 'custom_init': False, 'root_model': False, 'config': {'title': 'default_scene'}, 'ref': 'kittycad.models.selection.default_scene:93825014224528', 'metadata': {'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.selection.default_scene'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.selection.default_scene'>>], 'pydantic_js_annotation_functions': [], 'pydantic.internal.needs_apply_discriminated_union': False}}, {'type': 'model', 'cls': <class 'kittycad.models.selection.scene_by_index'>, 'schema': {'type': 'model-fields', 'fields': {'index': {'type': 'model-field', 'schema': {'type': 'int', 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'type': {'type': 'model-field', 'schema': {'type': 'default', 'schema': {'type': 'literal', 'expected': ['scene_by_index'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'default': 'scene_by_index'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}}, 'model_name': 'scene_by_index', 'computed_fields': []}, 'custom_init': False, 'root_model': False, 'config': {'title': 'scene_by_index'}, 'ref': 'kittycad.models.selection.scene_by_index:93825014871232', 'metadata': {'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.selection.scene_by_index'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.selection.scene_by_index'>>], 'pydantic_js_annotation_functions': [], 'pydantic.internal.needs_apply_discriminated_union': False}}, {'type': 'model', 'cls': <class 'kittycad.models.selection.scene_by_name'>, 'schema': {'type': 'model-fields', 'fields': {'name': {'type': 'model-field', 'schema': {'type': 'str', 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'type': {'type': 'model-field', 'schema': {'type': 'default', 'schema': {'type': 'literal', 'expected': ['scene_by_name'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'default': 'scene_by_name'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}}, 'model_name': 'scene_by_name', 'computed_fields': []}, 'custom_init': False, 'root_model': False, 'config': {'title': 'scene_by_name'}, 'ref': 'kittycad.models.selection.scene_by_name:93825014880496', 'metadata': {'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.selection.scene_by_name'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.selection.scene_by_name'>>], 'pydantic_js_annotation_functions': [], 'pydantic.internal.needs_apply_discriminated_union': False}}, {'type': 'model', 'cls': <class 'kittycad.models.selection.mesh_by_index'>, 'schema': {'type': 'model-fields', 'fields': {'index': {'type': 'model-field', 'schema': {'type': 'int', 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'type': {'type': 'model-field', 'schema': {'type': 'default', 'schema': {'type': 'literal', 'expected': ['mesh_by_index'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'default': 'mesh_by_index'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}}, 'model_name': 'mesh_by_index', 'computed_fields': []}, 'custom_init': False, 'root_model': False, 'config': {'title': 'mesh_by_index'}, 'ref': 'kittycad.models.selection.mesh_by_index:93825014886016', 'metadata': {'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.selection.mesh_by_index'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.selection.mesh_by_index'>>], 'pydantic_js_annotation_functions': [], 'pydantic.internal.needs_apply_discriminated_union': False}}, {'type': 'model', 'cls': <class 'kittycad.models.selection.mesh_by_name'>, 'schema': {'type': 'model-fields', 'fields': {'name': {'type': 'model-field', 'schema': {'type': 'str', 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'type': {'type': 'model-field', 'schema': {'type': 'default', 'schema': {'type': 'literal', 'expected': ['mesh_by_name'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'default': 'mesh_by_name'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}}, 'model_name': 'mesh_by_name', 'computed_fields': []}, 'custom_init': False, 'root_model': False, 'config': {'title': 'mesh_by_name'}, 'ref': 'kittycad.models.selection.mesh_by_name:93825014893472', 'metadata': {'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.selection.mesh_by_name'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.selection.mesh_by_name'>>], 'pydantic_js_annotation_functions': [], 'pydantic.internal.needs_apply_discriminated_union': False}}, {'type': 'model', 'cls': <class 'pydantic.root_model.RootModel[Annotated[Union[kittycad.models.selection.default_scene, kittycad.models.selection.scene_by_index, kittycad.models.selection.scene_by_name, kittycad.models.selection.mesh_by_index, kittycad.models.selection.mesh_by_name], FieldInfo(annotation=NoneType, required=True, discriminator='type')]]'>, 'schema': {'type': 'union', 'choices': [{'type': 'definition-ref', 'schema_ref': 'kittycad.models.selection.default_scene:93825014224528'}, {'type': 'definition-ref', 'schema_ref': 'kittycad.models.selection.scene_by_index:93825014871232'}, {'type': 'definition-ref', 'schema_ref': 'kittycad.models.selection.scene_by_name:93825014880496'}, {'type': 'definition-ref', 'schema_ref': 'kittycad.models.selection.mesh_by_index:93825014886016'}, {'type': 'definition-ref', 'schema_ref': 'kittycad.models.selection.mesh_by_name:93825014893472'}], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': True, 'pydantic.internal.union_discriminator': 'type'}}, 'custom_init': False, 'root_model': True, 'config': {'title': "RootModel[Annotated[Union[kittycad.models.selection.default_scene, kittycad.models.selection.scene_by_index, kittycad.models.selection.scene_by_name, kittycad.models.selection.mesh_by_index, kittycad.models.selection.mesh_by_name], FieldInfo(annotation=NoneType, required=True, discriminator='type')]]"}, 'ref': "pydantic.root_model.RootModel:93825014829600[Annotated[Union[kittycad.models.selection.default_scene, kittycad.models.selection.scene_by_index, kittycad.models.selection.scene_by_name, kittycad.models.selection.mesh_by_index, kittycad.models.selection.mesh_by_name], FieldInfo(annotation=NoneType, required=True, discriminator='type')]:140736970863040]", 'metadata': {'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'pydantic.root_model.RootModel[Annotated[Union[kittycad.models.selection.default_scene, kittycad.models.selection.scene_by_index, kittycad.models.selection.scene_by_name, kittycad.models.selection.mesh_by_index, kittycad.models.selection.mesh_by_name], FieldInfo(annotation=NoneType, required=True, discriminator='type')]]'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'pydantic.root_model.RootModel[Annotated[Union[kittycad.models.selection.default_scene, kittycad.models.selection.scene_by_index, kittycad.models.selection.scene_by_name, kittycad.models.selection.mesh_by_index, kittycad.models.selection.mesh_by_name], FieldInfo(annotation=NoneType, required=True, discriminator='type')]]'>>], 'pydantic_js_annotation_functions': [], 'pydantic.internal.needs_apply_discriminated_union': False}}], 'schema': {'cls': <class 'kittycad.models.modeling_cmd.export'>, 'config': {'title': 'export'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.export'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.export'>>]}, 'ref': 'kittycad.models.modeling_cmd.export:93825019008384', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'entity_ids': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'items_schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'strict': False, 'type': 'list'}, 'type': 'model-field'}, 'format': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'cls': <class 'pydantic.root_model.RootModel[Annotated[Union[kittycad.models.output_format.fbx, kittycad.models.output_format.gltf, kittycad.models.output_format.obj, kittycad.models.output_format.ply, kittycad.models.output_format.step, kittycad.models.output_format.stl], FieldInfo(annotation=NoneType, required=True, discriminator='type')]]'>, 'config': {'title': "RootModel[Annotated[Union[kittycad.models.output_format.fbx, kittycad.models.output_format.gltf, kittycad.models.output_format.obj, kittycad.models.output_format.ply, kittycad.models.output_format.step, kittycad.models.output_format.stl], FieldInfo(annotation=NoneType, required=True, discriminator='type')]]"}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'pydantic.root_model.RootModel[Annotated[Union[kittycad.models.output_format.fbx, kittycad.models.output_format.gltf, kittycad.models.output_format.obj, kittycad.models.output_format.ply, kittycad.models.output_format.step, kittycad.models.output_format.stl], FieldInfo(annotation=NoneType, required=True, discriminator='type')]]'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'pydantic.root_model.RootModel[Annotated[Union[kittycad.models.output_format.fbx, kittycad.models.output_format.gltf, kittycad.models.output_format.obj, kittycad.models.output_format.ply, kittycad.models.output_format.step, kittycad.models.output_format.stl], FieldInfo(annotation=NoneType, required=True, discriminator='type')]]'>>]}, 'ref': "pydantic.root_model.RootModel:93825014829600[Annotated[Union[kittycad.models.output_format.fbx, kittycad.models.output_format.gltf, kittycad.models.output_format.obj, kittycad.models.output_format.ply, kittycad.models.output_format.step, kittycad.models.output_format.stl], FieldInfo(annotation=NoneType, required=True, discriminator='type')]:140736972011504]", 'root_model': True, 'schema': {'choices': [{'type': 'model', 'cls': <class 'kittycad.models.output_format.fbx'>, 'schema': {'type': 'model-fields', 'fields': {'storage': {'type': 'model-field', 'schema': {'type': 'lax-or-strict', 'lax_schema': {'type': 'chain', 'steps': [{'type': 'str'}, {'type': 'function-plain', 'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}}]}, 'strict_schema': {'type': 'json-or-python', 'json_schema': {'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}, 'schema': {'type': 'str'}, 'type': 'function-after'}, 'python_schema': {'type': 'is-instance', 'cls': <enum 'FbxStorage'>}}, 'ref': 'kittycad.models.fbx_storage.FbxStorage:93825014854800', 'metadata': {'pydantic_js_functions': [<function get_enum_core_schema.<locals>.get_json_schema>], 'pydantic.internal.needs_apply_discriminated_union': False}}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'type': {'type': 'model-field', 'schema': {'type': 'default', 'schema': {'type': 'literal', 'expected': ['fbx'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'default': 'fbx'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}}, 'model_name': 'fbx', 'computed_fields': []}, 'custom_init': False, 'root_model': False, 'config': {'title': 'fbx'}, 'ref': 'kittycad.models.output_format.fbx:93825014049936', 'metadata': {'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.output_format.fbx'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.output_format.fbx'>>], 'pydantic_js_annotation_functions': [], 'pydantic.internal.needs_apply_discriminated_union': False}}, {'type': 'model', 'cls': <class 'kittycad.models.output_format.gltf'>, 'schema': {'type': 'model-fields', 'fields': {'presentation': {'type': 'model-field', 'schema': {'type': 'lax-or-strict', 'lax_schema': {'type': 'chain', 'steps': [{'type': 'str'}, {'type': 'function-plain', 'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}}]}, 'strict_schema': {'type': 'json-or-python', 'json_schema': {'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}, 'schema': {'type': 'str'}, 'type': 'function-after'}, 'python_schema': {'type': 'is-instance', 'cls': <enum 'GltfPresentation'>}}, 'ref': 'kittycad.models.gltf_presentation.GltfPresentation:93825014855744', 'metadata': {'pydantic_js_functions': [<function get_enum_core_schema.<locals>.get_json_schema>], 'pydantic.internal.needs_apply_discriminated_union': False}}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'storage': {'type': 'model-field', 'schema': {'type': 'lax-or-strict', 'lax_schema': {'type': 'chain', 'steps': [{'type': 'str'}, {'type': 'function-plain', 'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}}]}, 'strict_schema': {'type': 'json-or-python', 'json_schema': {'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}, 'schema': {'type': 'str'}, 'type': 'function-after'}, 'python_schema': {'type': 'is-instance', 'cls': <enum 'GltfStorage'>}}, 'ref': 'kittycad.models.gltf_storage.GltfStorage:93825014856688', 'metadata': {'pydantic_js_functions': [<function get_enum_core_schema.<locals>.get_json_schema>], 'pydantic.internal.needs_apply_discriminated_union': False}}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'type': {'type': 'model-field', 'schema': {'type': 'default', 'schema': {'type': 'literal', 'expected': ['gltf'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'default': 'gltf'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}}, 'model_name': 'gltf', 'computed_fields': []}, 'custom_init': False, 'root_model': False, 'config': {'title': 'gltf'}, 'ref': 'kittycad.models.output_format.gltf:93825014946976', 'metadata': {'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.output_format.gltf'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.output_format.gltf'>>], 'pydantic_js_annotation_functions': [], 'pydantic.internal.needs_apply_discriminated_union': False}}, {'type': 'model', 'cls': <class 'kittycad.models.output_format.obj'>, 'schema': {'type': 'model-fields', 'fields': {'coords': {'type': 'model-field', 'schema': {'type': 'definition-ref', 'schema_ref': 'kittycad.models.system.System:93825014588992'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'type': {'type': 'model-field', 'schema': {'type': 'default', 'schema': {'type': 'literal', 'expected': ['obj'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'default': 'obj'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'units': {'type': 'model-field', 'schema': {'type': 'definition-ref', 'schema_ref': 'kittycad.models.unit_length.UnitLength:93825014613552'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}}, 'model_name': 'obj', 'computed_fields': []}, 'custom_init': False, 'root_model': False, 'config': {'title': 'obj'}, 'ref': 'kittycad.models.output_format.obj:93825014960000', 'metadata': {'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.output_format.obj'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.output_format.obj'>>], 'pydantic_js_annotation_functions': [], 'pydantic.internal.needs_apply_discriminated_union': False}}, {'type': 'model', 'cls': <class 'kittycad.models.output_format.ply'>, 'schema': {'type': 'model-fields', 'fields': {'coords': {'type': 'model-field', 'schema': {'type': 'definition-ref', 'schema_ref': 'kittycad.models.system.System:93825014588992'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'selection': {'type': 'model-field', 'schema': {'type': 'definition-ref', 'schema_ref': "pydantic.root_model.RootModel:93825014829600[Annotated[Union[kittycad.models.selection.default_scene, kittycad.models.selection.scene_by_index, kittycad.models.selection.scene_by_name, kittycad.models.selection.mesh_by_index, kittycad.models.selection.mesh_by_name], FieldInfo(annotation=NoneType, required=True, discriminator='type')]:140736970863040]"}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'storage': {'type': 'model-field', 'schema': {'type': 'lax-or-strict', 'lax_schema': {'type': 'chain', 'steps': [{'type': 'str'}, {'type': 'function-plain', 'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}}]}, 'strict_schema': {'type': 'json-or-python', 'json_schema': {'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}, 'schema': {'type': 'str'}, 'type': 'function-after'}, 'python_schema': {'type': 'is-instance', 'cls': <enum 'PlyStorage'>}}, 'ref': 'kittycad.models.ply_storage.PlyStorage:93825014857632', 'metadata': {'pydantic_js_functions': [<function get_enum_core_schema.<locals>.get_json_schema>], 'pydantic.internal.needs_apply_discriminated_union': False}}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'type': {'type': 'model-field', 'schema': {'type': 'default', 'schema': {'type': 'literal', 'expected': ['ply'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'default': 'ply'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'units': {'type': 'model-field', 'schema': {'type': 'definition-ref', 'schema_ref': 'kittycad.models.unit_length.UnitLength:93825014613552'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}}, 'model_name': 'ply', 'computed_fields': []}, 'custom_init': False, 'root_model': False, 'config': {'title': 'ply'}, 'ref': 'kittycad.models.output_format.ply:93825014985680', 'metadata': {'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.output_format.ply'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.output_format.ply'>>], 'pydantic_js_annotation_functions': [], 'pydantic.internal.needs_apply_discriminated_union': False}}, {'type': 'model', 'cls': <class 'kittycad.models.output_format.step'>, 'schema': {'type': 'model-fields', 'fields': {'coords': {'type': 'model-field', 'schema': {'type': 'definition-ref', 'schema_ref': 'kittycad.models.system.System:93825014588992'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'type': {'type': 'model-field', 'schema': {'type': 'default', 'schema': {'type': 'literal', 'expected': ['step'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'default': 'step'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}}, 'model_name': 'step', 'computed_fields': []}, 'custom_init': False, 'root_model': False, 'config': {'title': 'step'}, 'ref': 'kittycad.models.output_format.step:93825015024240', 'metadata': {'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.output_format.step'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.output_format.step'>>], 'pydantic_js_annotation_functions': [], 'pydantic.internal.needs_apply_discriminated_union': False}}, {'type': 'model', 'cls': <class 'kittycad.models.output_format.stl'>, 'schema': {'type': 'model-fields', 'fields': {'coords': {'type': 'model-field', 'schema': {'type': 'definition-ref', 'schema_ref': 'kittycad.models.system.System:93825014588992'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'selection': {'type': 'model-field', 'schema': {'type': 'definition-ref', 'schema_ref': "pydantic.root_model.RootModel:93825014829600[Annotated[Union[kittycad.models.selection.default_scene, kittycad.models.selection.scene_by_index, kittycad.models.selection.scene_by_name, kittycad.models.selection.mesh_by_index, kittycad.models.selection.mesh_by_name], FieldInfo(annotation=NoneType, required=True, discriminator='type')]:140736970863040]"}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'storage': {'type': 'model-field', 'schema': {'type': 'lax-or-strict', 'lax_schema': {'type': 'chain', 'steps': [{'type': 'str'}, {'type': 'function-plain', 'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}}]}, 'strict_schema': {'type': 'json-or-python', 'json_schema': {'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}, 'schema': {'type': 'str'}, 'type': 'function-after'}, 'python_schema': {'type': 'is-instance', 'cls': <enum 'StlStorage'>}}, 'ref': 'kittycad.models.stl_storage.StlStorage:93825014940464', 'metadata': {'pydantic_js_functions': [<function get_enum_core_schema.<locals>.get_json_schema>], 'pydantic.internal.needs_apply_discriminated_union': False}}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'type': {'type': 'model-field', 'schema': {'type': 'default', 'schema': {'type': 'literal', 'expected': ['stl'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'default': 'stl'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'units': {'type': 'model-field', 'schema': {'type': 'definition-ref', 'schema_ref': 'kittycad.models.unit_length.UnitLength:93825014613552'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}}, 'model_name': 'stl', 'computed_fields': []}, 'custom_init': False, 'root_model': False, 'config': {'title': 'stl'}, 'ref': 'kittycad.models.output_format.stl:93825015103056', 'metadata': {'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.output_format.stl'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.output_format.stl'>>], 'pydantic_js_annotation_functions': [], 'pydantic.internal.needs_apply_discriminated_union': False}}], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': True, 'pydantic.internal.union_discriminator': 'type'}, 'type': 'union'}, 'type': 'model'}, 'type': 'model-field'}, 'source_unit': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'schema_ref': 'kittycad.models.unit_length.UnitLength:93825014613552', 'type': 'definition-ref'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'export', 'schema': {'expected': ['export'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'export', 'type': 'model-fields'}, 'type': 'model'}, 'type': 'definitions'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556edd580,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "entity_ids": SerField {                         key_py: Py(                             0x00007fffe118cc70,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             List(                                 ListSerializer {                                     item_serializer: Str(                                         StrSerializer,                                     ),                                     filter: SchemaFilter {                                         include: None,                                         exclude: None,                                     },                                     name: "list[str]",                                 },                             ),                         ),                         required: true,                     },                     "format": SerField {                         key_py: Py(                             0x00007fffff932bf0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Model(                                 ModelSerializer {                                     class: Py(                                         0x0000555556b2bea0,                                     ),                                     serializer: Union(                                         UnionSerializer {                                             choices: [                                                 Model(                                                     ModelSerializer {                                                         class: Py(                                                             0x0000555556a22c90,                                                         ),                                                         serializer: Fields(                                                             GeneralFieldsSerializer {                                                                 fields: {                                                                     "type": SerField {                                                                         key_py: Py(                                                                             0x00007fffff8ebef0,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             WithDefault(                                                                                 WithDefaultSerializer {                                                                                     default: Default(                                                                                         Py(                                                                                             0x00007fffe14d8f70,                                                                                         ),                                                                                     ),                                                                                     serializer: Literal(                                                                                         LiteralSerializer {                                                                                             expected_int: {},                                                                                             expected_str: {                                                                                                 "fbx",                                                                                             },                                                                                             expected_py: None,                                                                                             name: "literal['fbx']",                                                                                         },                                                                                     ),                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                     "storage": SerField {                                                                         key_py: Py(                                                                             0x00007ffffd064cb0,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             JsonOrPython(                                                                                 JsonOrPythonSerializer {                                                                                     json: Str(                                                                                         StrSerializer,                                                                                     ),                                                                                     python: Any(                                                                                         AnySerializer,                                                                                     ),                                                                                     name: "json-or-python[json=str, python=any]",                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                 },                                                                 computed_fields: Some(                                                                     ComputedFields(                                                                         [],                                                                     ),                                                                 ),                                                                 mode: SimpleDict,                                                                 extra_serializer: None,                                                                 filter: SchemaFilter {                                                                     include: None,                                                                     exclude: None,                                                                 },                                                                 required_fields: 2,                                                             },                                                         ),                                                         has_extra: false,                                                         root_model: false,                                                         name: "fbx",                                                     },                                                 ),                                                 Model(                                                     ModelSerializer {                                                         class: Py(                                                             0x0000555556afdca0,                                                         ),                                                         serializer: Fields(                                                             GeneralFieldsSerializer {                                                                 fields: {                                                                     "presentation": SerField {                                                                         key_py: Py(                                                                             0x00007fffe14c1eb0,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             JsonOrPython(                                                                                 JsonOrPythonSerializer {                                                                                     json: Str(                                                                                         StrSerializer,                                                                                     ),                                                                                     python: Any(                                                                                         AnySerializer,                                                                                     ),                                                                                     name: "json-or-python[json=str, python=any]",                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                     "type": SerField {                                                                         key_py: Py(                                                                             0x00007fffff8ebef0,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             WithDefault(                                                                                 WithDefaultSerializer {                                                                                     default: Default(                                                                                         Py(                                                                                             0x00007fffe137ba30,                                                                                         ),                                                                                     ),                                                                                     serializer: Literal(                                                                                         LiteralSerializer {                                                                                             expected_int: {},                                                                                             expected_str: {                                                                                                 "gltf",                                                                                             },                                                                                             expected_py: None,                                                                                             name: "literal['gltf']",                                                                                         },                                                                                     ),                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                     "storage": SerField {                                                                         key_py: Py(                                                                             0x00007ffffd064cb0,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             JsonOrPython(                                                                                 JsonOrPythonSerializer {                                                                                     json: Str(                                                                                         StrSerializer,                                                                                     ),                                                                                     python: Any(                                                                                         AnySerializer,                                                                                     ),                                                                                     name: "json-or-python[json=str, python=any]",                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                 },                                                                 computed_fields: Some(                                                                     ComputedFields(                                                                         [],                                                                     ),                                                                 ),                                                                 mode: SimpleDict,                                                                 extra_serializer: None,                                                                 filter: SchemaFilter {                                                                     include: None,                                                                     exclude: None,                                                                 },                                                                 required_fields: 3,                                                             },                                                         ),                                                         has_extra: false,                                                         root_model: false,                                                         name: "gltf",                                                     },                                                 ),                                                 Model(                                                     ModelSerializer {                                                         class: Py(                                                             0x0000555556b00f80,                                                         ),                                                         serializer: Fields(                                                             GeneralFieldsSerializer {                                                                 fields: {                                                                     "type": SerField {                                                                         key_py: Py(                                                                             0x00007fffff8ebef0,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             WithDefault(                                                                                 WithDefaultSerializer {                                                                                     default: Default(                                                                                         Py(                                                                                             0x00007fffff93a970,                                                                                         ),                                                                                     ),                                                                                     serializer: Literal(                                                                                         LiteralSerializer {                                                                                             expected_int: {},                                                                                             expected_str: {                                                                                                 "obj",                                                                                             },                                                                                             expected_py: None,                                                                                             name: "literal['obj']",                                                                                         },                                                                                     ),                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                     "units": SerField {                                                                         key_py: Py(                                                                             0x00007fffff2402b0,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             Recursive(                                                                                 DefinitionRefSerializer {                                                                                     definition: "kittycad.models.unit_length.UnitLength:93825014613552",                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                     "coords": SerField {                                                                         key_py: Py(                                                                             0x00007ffffcb0d8f0,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             Recursive(                                                                                 DefinitionRefSerializer {                                                                                     definition: "kittycad.models.system.System:93825014588992",                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                 },                                                                 computed_fields: Some(                                                                     ComputedFields(                                                                         [],                                                                     ),                                                                 ),                                                                 mode: SimpleDict,                                                                 extra_serializer: None,                                                                 filter: SchemaFilter {                                                                     include: None,                                                                     exclude: None,                                                                 },                                                                 required_fields: 3,                                                             },                                                         ),                                                         has_extra: false,                                                         root_model: false,                                                         name: "obj",                                                     },                                                 ),                                                 Model(                                                     ModelSerializer {                                                         class: Py(                                                             0x0000555556b073d0,                                                         ),                                                         serializer: Fields(                                                             GeneralFieldsSerializer {                                                                 fields: {                                                                     "selection": SerField {                                                                         key_py: Py(                                                                             0x00007fffe1c7b670,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             Recursive(                                                                                 DefinitionRefSerializer {                                                                                     definition: "pydantic.root_model.RootModel:93825014829600[Annotated[Union[kittycad.models.selection.default_scene, kittycad.models.selection.scene_by_index, kittycad.models.selection.scene_by_name, kittycad.models.selection.mesh_by_index, kittycad.models.selection.mesh_by_name], FieldInfo(annotation=NoneType, required=True, discriminator='type')]:140736970863040]",                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                     "storage": SerField {                                                                         key_py: Py(                                                                             0x00007ffffd064cb0,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             JsonOrPython(                                                                                 JsonOrPythonSerializer {                                                                                     json: Str(                                                                                         StrSerializer,                                                                                     ),                                                                                     python: Any(                                                                                         AnySerializer,                                                                                     ),                                                                                     name: "json-or-python[json=str, python=any]",                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                     "units": SerField {                                                                         key_py: Py(                                                                             0x00007fffff2402b0,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             Recursive(                                                                                 DefinitionRefSerializer {                                                                                     definition: "kittycad.models.unit_length.UnitLength:93825014613552",                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                     "type": SerField {                                                                         key_py: Py(                                                                             0x00007fffff8ebef0,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             WithDefault(                                                                                 WithDefaultSerializer {                                                                                     default: Default(                                                                                         Py(                                                                                             0x00007fffe137bab0,                                                                                         ),                                                                                     ),                                                                                     serializer: Literal(                                                                                         LiteralSerializer {                                                                                             expected_int: {},                                                                                             expected_str: {                                                                                                 "ply",                                                                                             },                                                                                             expected_py: None,                                                                                             name: "literal['ply']",                                                                                         },                                                                                     ),                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                     "coords": SerField {                                                                         key_py: Py(                                                                             0x00007ffffcb0d8f0,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             Recursive(                                                                                 DefinitionRefSerializer {                                                                                     definition: "kittycad.models.system.System:93825014588992",                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                 },                                                                 computed_fields: Some(                                                                     ComputedFields(                                                                         [],                                                                     ),                                                                 ),                                                                 mode: SimpleDict,                                                                 extra_serializer: None,                                                                 filter: SchemaFilter {                                                                     include: None,                                                                     exclude: None,                                                                 },                                                                 required_fields: 5,                                                             },                                                         ),                                                         has_extra: false,                                                         root_model: false,                                                         name: "ply",                                                     },                                                 ),                                                 Model(                                                     ModelSerializer {                                                         class: Py(                                                             0x0000555556b10a70,                                                         ),                                                         serializer: Fields(                                                             GeneralFieldsSerializer {                                                                 fields: {                                                                     "type": SerField {                                                                         key_py: Py(                                                                             0x00007fffff8ebef0,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             WithDefault(                                                                                 WithDefaultSerializer {                                                                                     default: Default(                                                                                         Py(                                                                                             0x00007fffff929d30,                                                                                         ),                                                                                     ),                                                                                     serializer: Literal(                                                                                         LiteralSerializer {                                                                                             expected_int: {},                                                                                             expected_str: {                                                                                                 "step",                                                                                             },                                                                                             expected_py: None,                                                                                             name: "literal['step']",                                                                                         },                                                                                     ),                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                     "coords": SerField {                                                                         key_py: Py(                                                                             0x00007ffffcb0d8f0,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             Recursive(                                                                                 DefinitionRefSerializer {                                                                                     definition: "kittycad.models.system.System:93825014588992",                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                 },                                                                 computed_fields: Some(                                                                     ComputedFields(                                                                         [],                                                                     ),                                                                 ),                                                                 mode: SimpleDict,                                                                 extra_serializer: None,                                                                 filter: SchemaFilter {                                                                     include: None,                                                                     exclude: None,                                                                 },                                                                 required_fields: 2,                                                             },                                                         ),                                                         has_extra: false,                                                         root_model: false,                                                         name: "step",                                                     },                                                 ),                                                 Model(                                                     ModelSerializer {                                                         class: Py(                                                             0x0000555556b23e50,                                                         ),                                                         serializer: Fields(                                                             GeneralFieldsSerializer {                                                                 fields: {                                                                     "type": SerField {                                                                         key_py: Py(                                                                             0x00007fffff8ebef0,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             WithDefault(                                                                                 WithDefaultSerializer {                                                                                     default: Default(                                                                                         Py(                                                                                             0x00007fffe137bb30,                                                                                         ),                                                                                     ),                                                                                     serializer: Literal(                                                                                         LiteralSerializer {                                                                                             expected_int: {},                                                                                             expected_str: {                                                                                                 "stl",                                                                                             },                                                                                             expected_py: None,                                                                                             name: "literal['stl']",                                                                                         },                                                                                     ),                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                     "selection": SerField {                                                                         key_py: Py(                                                                             0x00007fffe1c7b670,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             Recursive(                                                                                 DefinitionRefSerializer {                                                                                     definition: "pydantic.root_model.RootModel:93825014829600[Annotated[Union[kittycad.models.selection.default_scene, kittycad.models.selection.scene_by_index, kittycad.models.selection.scene_by_name, kittycad.models.selection.mesh_by_index, kittycad.models.selection.mesh_by_name], FieldInfo(annotation=NoneType, required=True, discriminator='type')]:140736970863040]",                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                     "coords": SerField {                                                                         key_py: Py(                                                                             0x00007ffffcb0d8f0,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             Recursive(                                                                                 DefinitionRefSerializer {                                                                                     definition: "kittycad.models.system.System:93825014588992",                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                     "units": SerField {                                                                         key_py: Py(                                                                             0x00007fffff2402b0,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             Recursive(                                                                                 DefinitionRefSerializer {                                                                                     definition: "kittycad.models.unit_length.UnitLength:93825014613552",                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                     "storage": SerField {                                                                         key_py: Py(                                                                             0x00007ffffd064cb0,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             JsonOrPython(                                                                                 JsonOrPythonSerializer {                                                                                     json: Str(                                                                                         StrSerializer,                                                                                     ),                                                                                     python: Any(                                                                                         AnySerializer,                                                                                     ),                                                                                     name: "json-or-python[json=str, python=any]",                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                 },                                                                 computed_fields: Some(                                                                     ComputedFields(                                                                         [],                                                                     ),                                                                 ),                                                                 mode: SimpleDict,                                                                 extra_serializer: None,                                                                 filter: SchemaFilter {                                                                     include: None,                                                                     exclude: None,                                                                 },                                                                 required_fields: 5,                                                             },                                                         ),                                                         has_extra: false,                                                         root_model: false,                                                         name: "stl",                                                     },                                                 ),                                             ],                                             name: "Union[fbx, gltf, obj, ply, step, stl]",                                         },                                     ),                                     has_extra: false,                                     root_model: true,                                     name: "RootModel[Annotated[Union[kittycad.models.output_format.fbx, kittycad.models.output_format.gltf, kittycad.models.output_format.obj, kittycad.models.output_format.ply, kittycad.models.output_format.step, kittycad.models.output_format.stl], FieldInfo(annotation=NoneType, required=True, discriminator='type')]]",                                 },                             ),                         ),                         required: true,                     },                     "source_unit": SerField {                         key_py: Py(                             0x00007fffe10dd370,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Recursive(                                 DefinitionRefSerializer {                                     definition: "kittycad.models.unit_length.UnitLength:93825014613552",                                 },                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffff1696f0,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "export",                                             },                                             expected_py: None,                                             name: "literal['export']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 4,             },         ),         has_extra: false,         root_model: false,         name: "export",     }, ), definitions=[Model(ModelSerializer { class: Py(0x555556af2d80), serializer: Union(UnionSerializer { choices: [Recursive(DefinitionRefSerializer { definition: "kittycad.models.selection.default_scene:93825014224528" }), Recursive(DefinitionRefSerializer { definition: "kittycad.models.selection.scene_by_index:93825014871232" }), Recursive(DefinitionRefSerializer { definition: "kittycad.models.selection.scene_by_name:93825014880496" }), Recursive(DefinitionRefSerializer { definition: "kittycad.models.selection.mesh_by_index:93825014886016" }), Recursive(DefinitionRefSerializer { definition: "kittycad.models.selection.mesh_by_name:93825014893472" })], name: "Union[definition-ref, definition-ref, definition-ref, definition-ref, definition-ref]" }), has_extra: false, root_model: true, name: "RootModel[Annotated[Union[kittycad.models.selection.default_scene, kittycad.models.selection.scene_by_index, kittycad.models.selection.scene_by_name, kittycad.models.selection.mesh_by_index, kittycad.models.selection.mesh_by_name], FieldInfo(annotation=NoneType, required=True, discriminator='type')]]" }), Model(ModelSerializer { class: Py(0x555556aeb4c0), serializer: Fields(GeneralFieldsSerializer { fields: {"index": SerField { key_py: Py(0x7fffff920af0), alias: None, alias_py: None, serializer: Some(Int(IntSerializer)), required: true }, "type": SerField { key_py: Py(0x7fffff8ebef0), alias: None, alias_py: None, serializer: Some(WithDefault(WithDefaultSerializer { default: Default(Py(0x7fffe1285ef0)), serializer: Literal(LiteralSerializer { expected_int: {}, expected_str: {"scene_by_index"}, expected_py: None, name: "literal['scene_by_index']" }) })), required: true }}, computed_fields: Some(ComputedFields([])), mode: SimpleDict, extra_serializer: None, filter: SchemaFilter { include: None, exclude: None }, required_fields: 2 }), has_extra: false, root_model: false, name: "scene_by_index" }), Model(ModelSerializer { class: Py(0x555556af0ba0), serializer: Fields(GeneralFieldsSerializer { fields: {"type": SerField { key_py: Py(0x7fffff8ebef0), alias: None, alias_py: None, serializer: Some(WithDefault(WithDefaultSerializer { default: Default(Py(0x7fffe1390870)), serializer: Literal(LiteralSerializer { expected_int: {}, expected_str: {"mesh_by_name"}, expected_py: None, name: "literal['mesh_by_name']" }) })), required: true }, "name": SerField { key_py: Py(0x7fffff9521b0), alias: None, alias_py: None, serializer: Some(Str(StrSerializer)), required: true }}, computed_fields: Some(ComputedFields([])), mode: SimpleDict, extra_serializer: None, filter: SchemaFilter { include: None, exclude: None }, required_fields: 2 }), has_extra: false, root_model: false, name: "mesh_by_name" }), Model(ModelSerializer { class: Py(0x555556aa6640), serializer: Fields(GeneralFieldsSerializer { fields: {"forward": SerField { key_py: Py(0x7ffffddd9770), alias: None, alias_py: None, serializer: Some(Recursive(DefinitionRefSerializer { definition: "kittycad.models.axis_direction_pair.AxisDirectionPair:93825014569648" })), required: true }, "up": SerField { key_py: Py(0x7ffffdc55170), alias: None, alias_py: None, serializer: Some(Recursive(DefinitionRefSerializer { definition: "kittycad.models.axis_direction_pair.AxisDirectionPair:93825014569648" })), required: true }}, computed_fields: Some(ComputedFields([])), mode: SimpleDict, extra_serializer: None, filter: SchemaFilter { include: None, exclude: None }, required_fields: 2 }), has_extra: false, root_model: false, name: "System" }), JsonOrPython(JsonOrPythonSerializer { json: Str(StrSerializer), python: Any(AnySerializer), name: "json-or-python[json=str, python=any]" }), Model(ModelSerializer { class: Py(0x555556aa1ab0), serializer: Fields(GeneralFieldsSerializer { fields: {"axis": SerField { key_py: Py(0x7ffffcb74b30), alias: None, alias_py: None, serializer: Some(Recursive(DefinitionRefSerializer { definition: "kittycad.models.axis.Axis:93825014567168" })), required: true }, "direction": SerField { key_py: Py(0x7fffff77c7f0), alias: None, alias_py: None, serializer: Some(Recursive(DefinitionRefSerializer { definition: "kittycad.models.direction.Direction:93825014568112" })), required: true }}, computed_fields: Some(ComputedFields([])), mode: SimpleDict, extra_serializer: None, filter: SchemaFilter { include: None, exclude: None }, required_fields: 2 }), has_extra: false, root_model: false, name: "AxisDirectionPair" }), Model(ModelSerializer { class: Py(0x555556aed8f0), serializer: Fields(GeneralFieldsSerializer { fields: {"type": SerField { key_py: Py(0x7fffff8ebef0), alias: None, alias_py: None, serializer: Some(WithDefault(WithDefaultSerializer { default: Default(Py(0x7fffe1f77ab0)), serializer: Literal(LiteralSerializer { expected_int: {}, expected_str: {"scene_by_name"}, expected_py: None, name: "literal['scene_by_name']" }) })), required: true }, "name": SerField { key_py: Py(0x7fffff9521b0), alias: None, alias_py: None, serializer: Some(Str(StrSerializer)), required: true }}, computed_fields: Some(ComputedFields([])), mode: SimpleDict, extra_serializer: None, filter: SchemaFilter { include: None, exclude: None }, required_fields: 2 }), has_extra: false, root_model: false, name: "scene_by_name" }), Model(ModelSerializer { class: Py(0x555556aeee80), serializer: Fields(GeneralFieldsSerializer { fields: {"index": SerField { key_py: Py(0x7fffff920af0), alias: None, alias_py: None, serializer: Some(Int(IntSerializer)), required: true }, "type": SerField { key_py: Py(0x7fffff8ebef0), alias: None, alias_py: None, serializer: Some(WithDefault(WithDefaultSerializer { default: Default(Py(0x7fffe13987f0)), serializer: Literal(LiteralSerializer { expected_int: {}, expected_str: {"mesh_by_index"}, expected_py: None, name: "literal['mesh_by_index']" }) })), required: true }}, computed_fields: Some(ComputedFields([])), mode: SimpleDict, extra_serializer: None, filter: SchemaFilter { include: None, exclude: None }, required_fields: 2 }), has_extra: false, root_model: false, name: "mesh_by_index" }), Model(ModelSerializer { class: Py(0x555556a4d690), serializer: Fields(GeneralFieldsSerializer { fields: {"type": SerField { key_py: Py(0x7fffff8ebef0), alias: None, alias_py: None, serializer: Some(WithDefault(WithDefaultSerializer { default: Default(Py(0x7fffe1285fb0)), serializer: Literal(LiteralSerializer { expected_int: {}, expected_str: {"default_scene"}, expected_py: None, name: "literal['default_scene']" }) })), required: true }}, computed_fields: Some(ComputedFields([])), mode: SimpleDict, extra_serializer: None, filter: SchemaFilter { include: None, exclude: None }, required_fields: 1 }), has_extra: false, root_model: false, name: "default_scene" }), JsonOrPython(JsonOrPythonSerializer { json: Str(StrSerializer), python: Any(AnySerializer), name: "json-or-python[json=str, python=any]" }), JsonOrPython(JsonOrPythonSerializer { json: Str(StrSerializer), python: Any(AnySerializer), name: "json-or-python[json=str, python=any]" })])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="export", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "entity_ids",                         lookup_key: Simple {                             key: "entity_ids",                             py_key: Py(                                 0x00007fffe118cc70,                             ),                             path: LookupPath(                                 [                                     S(                                         "entity_ids",                                         Py(                                             0x00007fffe118cc70,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe118cc70,                         ),                         validator: List(                             ListValidator {                                 strict: false,                                 item_validator: Some(                                     Str(                                         StrValidator {                                             strict: false,                                             coerce_numbers_to_str: false,                                         },                                     ),                                 ),                                 min_length: None,                                 max_length: None,                                 name: OnceLock(                                     <uninit>,                                 ),                             },                         ),                         frozen: false,                     },                     Field {                         name: "format",                         lookup_key: Simple {                             key: "format",                             py_key: Py(                                 0x00007fffff932bf0,                             ),                             path: LookupPath(                                 [                                     S(                                         "format",                                         Py(                                             0x00007fffff932bf0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff932bf0,                         ),                         validator: Model(                             ModelValidator {                                 revalidate: Never,                                 validator: Union(                                     UnionValidator {                                         mode: Smart,                                         choices: [                                             (                                                 Model(                                                     ModelValidator {                                                         revalidate: Never,                                                         validator: ModelFields(                                                             ModelFieldsValidator {                                                                 fields: [                                                                     Field {                                                                         name: "storage",                                                                         lookup_key: Simple {                                                                             key: "storage",                                                                             py_key: Py(                                                                                 0x00007ffffd064cb0,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "storage",                                                                                         Py(                                                                                             0x00007ffffd064cb0,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007ffffd064cb0,                                                                         ),                                                                         validator: LaxOrStrict(                                                                             LaxOrStrictValidator {                                                                                 strict: false,                                                                                 lax_validator: Chain(                                                                                     ChainValidator {                                                                                         steps: [                                                                                             Str(                                                                                                 StrValidator {                                                                                                     strict: false,                                                                                                     coerce_numbers_to_str: false,                                                                                                 },                                                                                             ),                                                                                             FunctionPlain(                                                                                                 FunctionPlainValidator {                                                                                                     func: Py(                                                                                                         0x00007fffe13878b0,                                                                                                     ),                                                                                                     config: Py(                                                                                                         0x00007fffe102f880,                                                                                                     ),                                                                                                     name: "function-plain[to_enum()]",                                                                                                     field_name: None,                                                                                                     info_arg: false,                                                                                                 },                                                                                             ),                                                                                         ],                                                                                         name: "chain[str,function-plain[to_enum()]]",                                                                                     },                                                                                 ),                                                                                 strict_validator: JsonOrPython(                                                                                     JsonOrPython {                                                                                         json: FunctionAfter(                                                                                             FunctionAfterValidator {                                                                                                 validator: Str(                                                                                                     StrValidator {                                                                                                         strict: false,                                                                                                         coerce_numbers_to_str: false,                                                                                                     },                                                                                                 ),                                                                                                 func: Py(                                                                                                     0x00007fffe13878b0,                                                                                                 ),                                                                                                 config: Py(                                                                                                     0x00007fffe102f880,                                                                                                 ),                                                                                                 name: "function-after[to_enum(), str]",                                                                                                 field_name: None,                                                                                                 info_arg: false,                                                                                             },                                                                                         ),                                                                                         python: IsInstance(                                                                                             IsInstanceValidator {                                                                                                 class: Py(                                                                                                     0x0000555556ae7490,                                                                                                 ),                                                                                                 class_repr: "FbxStorage",                                                                                                 name: "is-instance[FbxStorage]",                                                                                             },                                                                                         ),                                                                                         name: "json-or-python[json=function-after[to_enum(), str],python=is-instance[FbxStorage]]",                                                                                     },                                                                                 ),                                                                                 name: "lax-or-strict[lax=chain[str,function-plain[to_enum()]],strict=json-or-python[json=function-after[to_enum(), str],python=is-instance[FbxStorage]]]",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                     Field {                                                                         name: "type",                                                                         lookup_key: Simple {                                                                             key: "type",                                                                             py_key: Py(                                                                                 0x00007fffff8ebef0,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "type",                                                                                         Py(                                                                                             0x00007fffff8ebef0,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007fffff8ebef0,                                                                         ),                                                                         validator: WithDefault(                                                                             WithDefaultValidator {                                                                                 default: Default(                                                                                     Py(                                                                                         0x00007fffe14d8f70,                                                                                     ),                                                                                 ),                                                                                 on_error: Raise,                                                                                 validator: Literal(                                                                                     LiteralValidator {                                                                                         lookup: LiteralLookup {                                                                                             expected_bool: None,                                                                                             expected_int: None,                                                                                             expected_str: Some(                                                                                                 {                                                                                                     "fbx": 0,                                                                                                 },                                                                                             ),                                                                                             expected_py: None,                                                                                             values: [                                                                                                 Py(                                                                                                     0x00007fffe14d8f70,                                                                                                 ),                                                                                             ],                                                                                         },                                                                                         expected_repr: "'fbx'",                                                                                         name: "literal['fbx']",                                                                                     },                                                                                 ),                                                                                 validate_default: false,                                                                                 copy_default: false,                                                                                 name: "default[literal['fbx']]",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                 ],                                                                 model_name: "fbx",                                                                 extra_behavior: Ignore,                                                                 extras_validator: None,                                                                 strict: false,                                                                 from_attributes: false,                                                                 loc_by_alias: true,                                                             },                                                         ),                                                         class: Py(                                                             0x0000555556a22c90,                                                         ),                                                         post_init: None,                                                         frozen: false,                                                         custom_init: false,                                                         root_model: false,                                                         name: "fbx",                                                     },                                                 ),                                                 None,                                             ),                                             (                                                 Model(                                                     ModelValidator {                                                         revalidate: Never,                                                         validator: ModelFields(                                                             ModelFieldsValidator {                                                                 fields: [                                                                     Field {                                                                         name: "presentation",                                                                         lookup_key: Simple {                                                                             key: "presentation",                                                                             py_key: Py(                                                                                 0x00007fffe14c1eb0,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "presentation",                                                                                         Py(                                                                                             0x00007fffe14c1eb0,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007fffe14c1eb0,                                                                         ),                                                                         validator: LaxOrStrict(                                                                             LaxOrStrictValidator {                                                                                 strict: false,                                                                                 lax_validator: Chain(                                                                                     ChainValidator {                                                                                         steps: [                                                                                             Str(                                                                                                 StrValidator {                                                                                                     strict: false,                                                                                                     coerce_numbers_to_str: false,                                                                                                 },                                                                                             ),                                                                                             FunctionPlain(                                                                                                 FunctionPlainValidator {                                                                                                     func: Py(                                                                                                         0x00007fffe139ea60,                                                                                                     ),                                                                                                     config: Py(                                                                                                         0x00007fffe102ec40,                                                                                                     ),                                                                                                     name: "function-plain[to_enum()]",                                                                                                     field_name: None,                                                                                                     info_arg: false,                                                                                                 },                                                                                             ),                                                                                         ],                                                                                         name: "chain[str,function-plain[to_enum()]]",                                                                                     },                                                                                 ),                                                                                 strict_validator: JsonOrPython(                                                                                     JsonOrPython {                                                                                         json: FunctionAfter(                                                                                             FunctionAfterValidator {                                                                                                 validator: Str(                                                                                                     StrValidator {                                                                                                         strict: false,                                                                                                         coerce_numbers_to_str: false,                                                                                                     },                                                                                                 ),                                                                                                 func: Py(                                                                                                     0x00007fffe139ea60,                                                                                                 ),                                                                                                 config: Py(                                                                                                     0x00007fffe102ec40,                                                                                                 ),                                                                                                 name: "function-after[to_enum(), str]",                                                                                                 field_name: None,                                                                                                 info_arg: false,                                                                                             },                                                                                         ),                                                                                         python: IsInstance(                                                                                             IsInstanceValidator {                                                                                                 class: Py(                                                                                                     0x0000555556ae7840,                                                                                                 ),                                                                                                 class_repr: "GltfPresentation",                                                                                                 name: "is-instance[GltfPresentation]",                                                                                             },                                                                                         ),                                                                                         name: "json-or-python[json=function-after[to_enum(), str],python=is-instance[GltfPresentation]]",                                                                                     },                                                                                 ),                                                                                 name: "lax-or-strict[lax=chain[str,function-plain[to_enum()]],strict=json-or-python[json=function-after[to_enum(), str],python=is-instance[GltfPresentation]]]",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                     Field {                                                                         name: "storage",                                                                         lookup_key: Simple {                                                                             key: "storage",                                                                             py_key: Py(                                                                                 0x00007ffffd064cb0,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "storage",                                                                                         Py(                                                                                             0x00007ffffd064cb0,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007ffffd064cb0,                                                                         ),                                                                         validator: LaxOrStrict(                                                                             LaxOrStrictValidator {                                                                                 strict: false,                                                                                 lax_validator: Chain(                                                                                     ChainValidator {                                                                                         steps: [                                                                                             Str(                                                                                                 StrValidator {                                                                                                     strict: false,                                                                                                     coerce_numbers_to_str: false,                                                                                                 },                                                                                             ),                                                                                             FunctionPlain(                                                                                                 FunctionPlainValidator {                                                                                                     func: Py(                                                                                                         0x00007fffe139e550,                                                                                                     ),                                                                                                     config: Py(                                                                                                         0x00007fffe102ec40,                                                                                                     ),                                                                                                     name: "function-plain[to_enum()]",                                                                                                     field_name: None,                                                                                                     info_arg: false,                                                                                                 },                                                                                             ),                                                                                         ],                                                                                         name: "chain[str,function-plain[to_enum()]]",                                                                                     },                                                                                 ),                                                                                 strict_validator: JsonOrPython(                                                                                     JsonOrPython {                                                                                         json: FunctionAfter(                                                                                             FunctionAfterValidator {                                                                                                 validator: Str(                                                                                                     StrValidator {                                                                                                         strict: false,                                                                                                         coerce_numbers_to_str: false,                                                                                                     },                                                                                                 ),                                                                                                 func: Py(                                                                                                     0x00007fffe139e550,                                                                                                 ),                                                                                                 config: Py(                                                                                                     0x00007fffe102ec40,                                                                                                 ),                                                                                                 name: "function-after[to_enum(), str]",                                                                                                 field_name: None,                                                                                                 info_arg: false,                                                                                             },                                                                                         ),                                                                                         python: IsInstance(                                                                                             IsInstanceValidator {                                                                                                 class: Py(                                                                                                     0x0000555556ae7bf0,                                                                                                 ),                                                                                                 class_repr: "GltfStorage",                                                                                                 name: "is-instance[GltfStorage]",                                                                                             },                                                                                         ),                                                                                         name: "json-or-python[json=function-after[to_enum(), str],python=is-instance[GltfStorage]]",                                                                                     },                                                                                 ),                                                                                 name: "lax-or-strict[lax=chain[str,function-plain[to_enum()]],strict=json-or-python[json=function-after[to_enum(), str],python=is-instance[GltfStorage]]]",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                     Field {                                                                         name: "type",                                                                         lookup_key: Simple {                                                                             key: "type",                                                                             py_key: Py(                                                                                 0x00007fffff8ebef0,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "type",                                                                                         Py(                                                                                             0x00007fffff8ebef0,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007fffff8ebef0,                                                                         ),                                                                         validator: WithDefault(                                                                             WithDefaultValidator {                                                                                 default: Default(                                                                                     Py(                                                                                         0x00007fffe137ba30,                                                                                     ),                                                                                 ),                                                                                 on_error: Raise,                                                                                 validator: Literal(                                                                                     LiteralValidator {                                                                                         lookup: LiteralLookup {                                                                                             expected_bool: None,                                                                                             expected_int: None,                                                                                             expected_str: Some(                                                                                                 {                                                                                                     "gltf": 0,                                                                                                 },                                                                                             ),                                                                                             expected_py: None,                                                                                             values: [                                                                                                 Py(                                                                                                     0x00007fffe137ba30,                                                                                                 ),                                                                                             ],                                                                                         },                                                                                         expected_repr: "'gltf'",                                                                                         name: "literal['gltf']",                                                                                     },                                                                                 ),                                                                                 validate_default: false,                                                                                 copy_default: false,                                                                                 name: "default[literal['gltf']]",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                 ],                                                                 model_name: "gltf",                                                                 extra_behavior: Ignore,                                                                 extras_validator: None,                                                                 strict: false,                                                                 from_attributes: false,                                                                 loc_by_alias: true,                                                             },                                                         ),                                                         class: Py(                                                             0x0000555556afdca0,                                                         ),                                                         post_init: None,                                                         frozen: false,                                                         custom_init: false,                                                         root_model: false,                                                         name: "gltf",                                                     },                                                 ),                                                 None,                                             ),                                             (                                                 Model(                                                     ModelValidator {                                                         revalidate: Never,                                                         validator: ModelFields(                                                             ModelFieldsValidator {                                                                 fields: [                                                                     Field {                                                                         name: "coords",                                                                         lookup_key: Simple {                                                                             key: "coords",                                                                             py_key: Py(                                                                                 0x00007ffffcb0d8f0,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "coords",                                                                                         Py(                                                                                             0x00007ffffcb0d8f0,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007ffffcb0d8f0,                                                                         ),                                                                         validator: DefinitionRef(                                                                             DefinitionRefValidator {                                                                                 definition: "kittycad.models.system.System:93825014588992",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                     Field {                                                                         name: "type",                                                                         lookup_key: Simple {                                                                             key: "type",                                                                             py_key: Py(                                                                                 0x00007fffff8ebef0,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "type",                                                                                         Py(                                                                                             0x00007fffff8ebef0,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007fffff8ebef0,                                                                         ),                                                                         validator: WithDefault(                                                                             WithDefaultValidator {                                                                                 default: Default(                                                                                     Py(                                                                                         0x00007fffff93a970,                                                                                     ),                                                                                 ),                                                                                 on_error: Raise,                                                                                 validator: Literal(                                                                                     LiteralValidator {                                                                                         lookup: LiteralLookup {                                                                                             expected_bool: None,                                                                                             expected_int: None,                                                                                             expected_str: Some(                                                                                                 {                                                                                                     "obj": 0,                                                                                                 },                                                                                             ),                                                                                             expected_py: None,                                                                                             values: [                                                                                                 Py(                                                                                                     0x00007fffff93a970,                                                                                                 ),                                                                                             ],                                                                                         },                                                                                         expected_repr: "'obj'",                                                                                         name: "literal['obj']",                                                                                     },                                                                                 ),                                                                                 validate_default: false,                                                                                 copy_default: false,                                                                                 name: "default[literal['obj']]",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                     Field {                                                                         name: "units",                                                                         lookup_key: Simple {                                                                             key: "units",                                                                             py_key: Py(                                                                                 0x00007fffff2402b0,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "units",                                                                                         Py(                                                                                             0x00007fffff2402b0,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007fffff2402b0,                                                                         ),                                                                         validator: DefinitionRef(                                                                             DefinitionRefValidator {                                                                                 definition: "kittycad.models.unit_length.UnitLength:93825014613552",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                 ],                                                                 model_name: "obj",                                                                 extra_behavior: Ignore,                                                                 extras_validator: None,                                                                 strict: false,                                                                 from_attributes: false,                                                                 loc_by_alias: true,                                                             },                                                         ),                                                         class: Py(                                                             0x0000555556b00f80,                                                         ),                                                         post_init: None,                                                         frozen: false,                                                         custom_init: false,                                                         root_model: false,                                                         name: "obj",                                                     },                                                 ),                                                 None,                                             ),                                             (                                                 Model(                                                     ModelValidator {                                                         revalidate: Never,                                                         validator: ModelFields(                                                             ModelFieldsValidator {                                                                 fields: [                                                                     Field {                                                                         name: "coords",                                                                         lookup_key: Simple {                                                                             key: "coords",                                                                             py_key: Py(                                                                                 0x00007ffffcb0d8f0,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "coords",                                                                                         Py(                                                                                             0x00007ffffcb0d8f0,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007ffffcb0d8f0,                                                                         ),                                                                         validator: DefinitionRef(                                                                             DefinitionRefValidator {                                                                                 definition: "kittycad.models.system.System:93825014588992",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                     Field {                                                                         name: "selection",                                                                         lookup_key: Simple {                                                                             key: "selection",                                                                             py_key: Py(                                                                                 0x00007fffe1c7b670,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "selection",                                                                                         Py(                                                                                             0x00007fffe1c7b670,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007fffe1c7b670,                                                                         ),                                                                         validator: DefinitionRef(                                                                             DefinitionRefValidator {                                                                                 definition: "pydantic.root_model.RootModel:93825014829600[Annotated[Union[kittycad.models.selection.default_scene, kittycad.models.selection.scene_by_index, kittycad.models.selection.scene_by_name, kittycad.models.selection.mesh_by_index, kittycad.models.selection.mesh_by_name], FieldInfo(annotation=NoneType, required=True, discriminator='type')]:140736970863040]",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                     Field {                                                                         name: "storage",                                                                         lookup_key: Simple {                                                                             key: "storage",                                                                             py_key: Py(                                                                                 0x00007ffffd064cb0,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "storage",                                                                                         Py(                                                                                             0x00007ffffd064cb0,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007ffffd064cb0,                                                                         ),                                                                         validator: LaxOrStrict(                                                                             LaxOrStrictValidator {                                                                                 strict: false,                                                                                 lax_validator: Chain(                                                                                     ChainValidator {                                                                                         steps: [                                                                                             Str(                                                                                                 StrValidator {                                                                                                     strict: false,                                                                                                     coerce_numbers_to_str: false,                                                                                                 },                                                                                             ),                                                                                             FunctionPlain(                                                                                                 FunctionPlainValidator {                                                                                                     func: Py(                                                                                                         0x00007fffe143e790,                                                                                                     ),                                                                                                     config: Py(                                                                                                         0x00007fffe0fc6280,                                                                                                     ),                                                                                                     name: "function-plain[to_enum()]",                                                                                                     field_name: None,                                                                                                     info_arg: false,                                                                                                 },                                                                                             ),                                                                                         ],                                                                                         name: "chain[str,function-plain[to_enum()]]",                                                                                     },                                                                                 ),                                                                                 strict_validator: JsonOrPython(                                                                                     JsonOrPython {                                                                                         json: FunctionAfter(                                                                                             FunctionAfterValidator {                                                                                                 validator: Str(                                                                                                     StrValidator {                                                                                                         strict: false,                                                                                                         coerce_numbers_to_str: false,                                                                                                     },                                                                                                 ),                                                                                                 func: Py(                                                                                                     0x00007fffe143e790,                                                                                                 ),                                                                                                 config: Py(                                                                                                     0x00007fffe0fc6280,                                                                                                 ),                                                                                                 name: "function-after[to_enum(), str]",                                                                                                 field_name: None,                                                                                                 info_arg: false,                                                                                             },                                                                                         ),                                                                                         python: IsInstance(                                                                                             IsInstanceValidator {                                                                                                 class: Py(                                                                                                     0x0000555556ae7fa0,                                                                                                 ),                                                                                                 class_repr: "PlyStorage",                                                                                                 name: "is-instance[PlyStorage]",                                                                                             },                                                                                         ),                                                                                         name: "json-or-python[json=function-after[to_enum(), str],python=is-instance[PlyStorage]]",                                                                                     },                                                                                 ),                                                                                 name: "lax-or-strict[lax=chain[str,function-plain[to_enum()]],strict=json-or-python[json=function-after[to_enum(), str],python=is-instance[PlyStorage]]]",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                     Field {                                                                         name: "type",                                                                         lookup_key: Simple {                                                                             key: "type",                                                                             py_key: Py(                                                                                 0x00007fffff8ebef0,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "type",                                                                                         Py(                                                                                             0x00007fffff8ebef0,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007fffff8ebef0,                                                                         ),                                                                         validator: WithDefault(                                                                             WithDefaultValidator {                                                                                 default: Default(                                                                                     Py(                                                                                         0x00007fffe137bab0,                                                                                     ),                                                                                 ),                                                                                 on_error: Raise,                                                                                 validator: Literal(                                                                                     LiteralValidator {                                                                                         lookup: LiteralLookup {                                                                                             expected_bool: None,                                                                                             expected_int: None,                                                                                             expected_str: Some(                                                                                                 {                                                                                                     "ply": 0,                                                                                                 },                                                                                             ),                                                                                             expected_py: None,                                                                                             values: [                                                                                                 Py(                                                                                                     0x00007fffe137bab0,                                                                                                 ),                                                                                             ],                                                                                         },                                                                                         expected_repr: "'ply'",                                                                                         name: "literal['ply']",                                                                                     },                                                                                 ),                                                                                 validate_default: false,                                                                                 copy_default: false,                                                                                 name: "default[literal['ply']]",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                     Field {                                                                         name: "units",                                                                         lookup_key: Simple {                                                                             key: "units",                                                                             py_key: Py(                                                                                 0x00007fffff2402b0,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "units",                                                                                         Py(                                                                                             0x00007fffff2402b0,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007fffff2402b0,                                                                         ),                                                                         validator: DefinitionRef(                                                                             DefinitionRefValidator {                                                                                 definition: "kittycad.models.unit_length.UnitLength:93825014613552",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                 ],                                                                 model_name: "ply",                                                                 extra_behavior: Ignore,                                                                 extras_validator: None,                                                                 strict: false,                                                                 from_attributes: false,                                                                 loc_by_alias: true,                                                             },                                                         ),                                                         class: Py(                                                             0x0000555556b073d0,                                                         ),                                                         post_init: None,                                                         frozen: false,                                                         custom_init: false,                                                         root_model: false,                                                         name: "ply",                                                     },                                                 ),                                                 None,                                             ),                                             (                                                 Model(                                                     ModelValidator {                                                         revalidate: Never,                                                         validator: ModelFields(                                                             ModelFieldsValidator {                                                                 fields: [                                                                     Field {                                                                         name: "coords",                                                                         lookup_key: Simple {                                                                             key: "coords",                                                                             py_key: Py(                                                                                 0x00007ffffcb0d8f0,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "coords",                                                                                         Py(                                                                                             0x00007ffffcb0d8f0,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007ffffcb0d8f0,                                                                         ),                                                                         validator: DefinitionRef(                                                                             DefinitionRefValidator {                                                                                 definition: "kittycad.models.system.System:93825014588992",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                     Field {                                                                         name: "type",                                                                         lookup_key: Simple {                                                                             key: "type",                                                                             py_key: Py(                                                                                 0x00007fffff8ebef0,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "type",                                                                                         Py(                                                                                             0x00007fffff8ebef0,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007fffff8ebef0,                                                                         ),                                                                         validator: WithDefault(                                                                             WithDefaultValidator {                                                                                 default: Default(                                                                                     Py(                                                                                         0x00007fffff929d30,                                                                                     ),                                                                                 ),                                                                                 on_error: Raise,                                                                                 validator: Literal(                                                                                     LiteralValidator {                                                                                         lookup: LiteralLookup {                                                                                             expected_bool: None,                                                                                             expected_int: None,                                                                                             expected_str: Some(                                                                                                 {                                                                                                     "step": 0,                                                                                                 },                                                                                             ),                                                                                             expected_py: None,                                                                                             values: [                                                                                                 Py(                                                                                                     0x00007fffff929d30,                                                                                                 ),                                                                                             ],                                                                                         },                                                                                         expected_repr: "'step'",                                                                                         name: "literal['step']",                                                                                     },                                                                                 ),                                                                                 validate_default: false,                                                                                 copy_default: false,                                                                                 name: "default[literal['step']]",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                 ],                                                                 model_name: "step",                                                                 extra_behavior: Ignore,                                                                 extras_validator: None,                                                                 strict: false,                                                                 from_attributes: false,                                                                 loc_by_alias: true,                                                             },                                                         ),                                                         class: Py(                                                             0x0000555556b10a70,                                                         ),                                                         post_init: None,                                                         frozen: false,                                                         custom_init: false,                                                         root_model: false,                                                         name: "step",                                                     },                                                 ),                                                 None,                                             ),                                             (                                                 Model(                                                     ModelValidator {                                                         revalidate: Never,                                                         validator: ModelFields(                                                             ModelFieldsValidator {                                                                 fields: [                                                                     Field {                                                                         name: "coords",                                                                         lookup_key: Simple {                                                                             key: "coords",                                                                             py_key: Py(                                                                                 0x00007ffffcb0d8f0,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "coords",                                                                                         Py(                                                                                             0x00007ffffcb0d8f0,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007ffffcb0d8f0,                                                                         ),                                                                         validator: DefinitionRef(                                                                             DefinitionRefValidator {                                                                                 definition: "kittycad.models.system.System:93825014588992",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                     Field {                                                                         name: "selection",                                                                         lookup_key: Simple {                                                                             key: "selection",                                                                             py_key: Py(                                                                                 0x00007fffe1c7b670,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "selection",                                                                                         Py(                                                                                             0x00007fffe1c7b670,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007fffe1c7b670,                                                                         ),                                                                         validator: DefinitionRef(                                                                             DefinitionRefValidator {                                                                                 definition: "pydantic.root_model.RootModel:93825014829600[Annotated[Union[kittycad.models.selection.default_scene, kittycad.models.selection.scene_by_index, kittycad.models.selection.scene_by_name, kittycad.models.selection.mesh_by_index, kittycad.models.selection.mesh_by_name], FieldInfo(annotation=NoneType, required=True, discriminator='type')]:140736970863040]",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                     Field {                                                                         name: "storage",                                                                         lookup_key: Simple {                                                                             key: "storage",                                                                             py_key: Py(                                                                                 0x00007ffffd064cb0,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "storage",                                                                                         Py(                                                                                             0x00007ffffd064cb0,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007ffffd064cb0,                                                                         ),                                                                         validator: LaxOrStrict(                                                                             LaxOrStrictValidator {                                                                                 strict: false,                                                                                 lax_validator: Chain(                                                                                     ChainValidator {                                                                                         steps: [                                                                                             Str(                                                                                                 StrValidator {                                                                                                     strict: false,                                                                                                     coerce_numbers_to_str: false,                                                                                                 },                                                                                             ),                                                                                             FunctionPlain(                                                                                                 FunctionPlainValidator {                                                                                                     func: Py(                                                                                                         0x00007fffe1459310,                                                                                                     ),                                                                                                     config: Py(                                                                                                         0x00007fffe0fc6d80,                                                                                                     ),                                                                                                     name: "function-plain[to_enum()]",                                                                                                     field_name: None,                                                                                                     info_arg: false,                                                                                                 },                                                                                             ),                                                                                         ],                                                                                         name: "chain[str,function-plain[to_enum()]]",                                                                                     },                                                                                 ),                                                                                 strict_validator: JsonOrPython(                                                                                     JsonOrPython {                                                                                         json: FunctionAfter(                                                                                             FunctionAfterValidator {                                                                                                 validator: Str(                                                                                                     StrValidator {                                                                                                         strict: false,                                                                                                         coerce_numbers_to_str: false,                                                                                                     },                                                                                                 ),                                                                                                 func: Py(                                                                                                     0x00007fffe1459310,                                                                                                 ),                                                                                                 config: Py(                                                                                                     0x00007fffe0fc6d80,                                                                                                 ),                                                                                                 name: "function-after[to_enum(), str]",                                                                                                 field_name: None,                                                                                                 info_arg: false,                                                                                             },                                                                                         ),                                                                                         python: IsInstance(                                                                                             IsInstanceValidator {                                                                                                 class: Py(                                                                                                     0x0000555556afc330,                                                                                                 ),                                                                                                 class_repr: "StlStorage",                                                                                                 name: "is-instance[StlStorage]",                                                                                             },                                                                                         ),                                                                                         name: "json-or-python[json=function-after[to_enum(), str],python=is-instance[StlStorage]]",                                                                                     },                                                                                 ),                                                                                 name: "lax-or-strict[lax=chain[str,function-plain[to_enum()]],strict=json-or-python[json=function-after[to_enum(), str],python=is-instance[StlStorage]]]",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                     Field {                                                                         name: "type",                                                                         lookup_key: Simple {                                                                             key: "type",                                                                             py_key: Py(                                                                                 0x00007fffff8ebef0,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "type",                                                                                         Py(                                                                                             0x00007fffff8ebef0,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007fffff8ebef0,                                                                         ),                                                                         validator: WithDefault(                                                                             WithDefaultValidator {                                                                                 default: Default(                                                                                     Py(                                                                                         0x00007fffe137bb30,                                                                                     ),                                                                                 ),                                                                                 on_error: Raise,                                                                                 validator: Literal(                                                                                     LiteralValidator {                                                                                         lookup: LiteralLookup {                                                                                             expected_bool: None,                                                                                             expected_int: None,                                                                                             expected_str: Some(                                                                                                 {                                                                                                     "stl": 0,                                                                                                 },                                                                                             ),                                                                                             expected_py: None,                                                                                             values: [                                                                                                 Py(                                                                                                     0x00007fffe137bb30,                                                                                                 ),                                                                                             ],                                                                                         },                                                                                         expected_repr: "'stl'",                                                                                         name: "literal['stl']",                                                                                     },                                                                                 ),                                                                                 validate_default: false,                                                                                 copy_default: false,                                                                                 name: "default[literal['stl']]",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                     Field {                                                                         name: "units",                                                                         lookup_key: Simple {                                                                             key: "units",                                                                             py_key: Py(                                                                                 0x00007fffff2402b0,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "units",                                                                                         Py(                                                                                             0x00007fffff2402b0,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007fffff2402b0,                                                                         ),                                                                         validator: DefinitionRef(                                                                             DefinitionRefValidator {                                                                                 definition: "kittycad.models.unit_length.UnitLength:93825014613552",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                 ],                                                                 model_name: "stl",                                                                 extra_behavior: Ignore,                                                                 extras_validator: None,                                                                 strict: false,                                                                 from_attributes: false,                                                                 loc_by_alias: true,                                                             },                                                         ),                                                         class: Py(                                                             0x0000555556b23e50,                                                         ),                                                         post_init: None,                                                         frozen: false,                                                         custom_init: false,                                                         root_model: false,                                                         name: "stl",                                                     },                                                 ),                                                 None,                                             ),                                         ],                                         custom_error: None,                                         strict: false,                                         name: "union[fbx,gltf,obj,ply,step,stl]",                                     },                                 ),                                 class: Py(                                     0x0000555556b2bea0,                                 ),                                 post_init: None,                                 frozen: false,                                 custom_init: false,                                 root_model: true,                                 name: "RootModel[Annotated[Union[kittycad.models.output_format.fbx, kittycad.models.output_format.gltf, kittycad.models.output_format.obj, kittycad.models.output_format.ply, kittycad.models.output_format.step, kittycad.models.output_format.stl], FieldInfo(annotation=NoneType, required=True, discriminator='type')]]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "source_unit",                         lookup_key: Simple {                             key: "source_unit",                             py_key: Py(                                 0x00007fffe10dd370,                             ),                             path: LookupPath(                                 [                                     S(                                         "source_unit",                                         Py(                                             0x00007fffe10dd370,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe10dd370,                         ),                         validator: DefinitionRef(                             DefinitionRefValidator {                                 definition: "kittycad.models.unit_length.UnitLength:93825014613552",                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffff1696f0,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "export": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffff1696f0,                                                 ),                                             ],                                         },                                         expected_repr: "'export'",                                         name: "literal['export']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['export']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "export",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556edd580,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "export",     }, ), definitions=[Model(ModelValidator { revalidate: Never, validator: ModelFields(ModelFieldsValidator { fields: [Field { name: "name", lookup_key: Simple { key: "name", py_key: Py(0x7fffff9521b0), path: LookupPath([S("name", Py(0x7fffff9521b0))]) }, name_py: Py(0x7fffff9521b0), validator: Str(StrValidator { strict: false, coerce_numbers_to_str: false }), frozen: false }, Field { name: "type", lookup_key: Simple { key: "type", py_key: Py(0x7fffff8ebef0), path: LookupPath([S("type", Py(0x7fffff8ebef0))]) }, name_py: Py(0x7fffff8ebef0), validator: WithDefault(WithDefaultValidator { default: Default(Py(0x7fffe1390870)), on_error: Raise, validator: Literal(LiteralValidator { lookup: LiteralLookup { expected_bool: None, expected_int: None, expected_str: Some({"mesh_by_name": 0}), expected_py: None, values: [Py(0x7fffe1390870)] }, expected_repr: "'mesh_by_name'", name: "literal['mesh_by_name']" }), validate_default: false, copy_default: false, name: "default[literal['mesh_by_name']]" }), frozen: false }], model_name: "mesh_by_name", extra_behavior: Ignore, extras_validator: None, strict: false, from_attributes: false, loc_by_alias: true }), class: Py(0x555556af0ba0), post_init: None, frozen: false, custom_init: false, root_model: false, name: "mesh_by_name" }), Model(ModelValidator { revalidate: Never, validator: ModelFields(ModelFieldsValidator { fields: [Field { name: "type", lookup_key: Simple { key: "type", py_key: Py(0x7fffff8ebef0), path: LookupPath([S("type", Py(0x7fffff8ebef0))]) }, name_py: Py(0x7fffff8ebef0), validator: WithDefault(WithDefaultValidator { default: Default(Py(0x7fffe1285fb0)), on_error: Raise, validator: Literal(LiteralValidator { lookup: LiteralLookup { expected_bool: None, expected_int: None, expected_str: Some({"default_scene": 0}), expected_py: None, values: [Py(0x7fffe1285fb0)] }, expected_repr: "'default_scene'", name: "literal['default_scene']" }), validate_default: false, copy_default: false, name: "default[literal['default_scene']]" }), frozen: false }], model_name: "default_scene", extra_behavior: Ignore, extras_validator: None, strict: false, from_attributes: false, loc_by_alias: true }), class: Py(0x555556a4d690), post_init: None, frozen: false, custom_init: false, root_model: false, name: "default_scene" }), Model(ModelValidator { revalidate: Never, validator: ModelFields(ModelFieldsValidator { fields: [Field { name: "name", lookup_key: Simple { key: "name", py_key: Py(0x7fffff9521b0), path: LookupPath([S("name", Py(0x7fffff9521b0))]) }, name_py: Py(0x7fffff9521b0), validator: Str(StrValidator { strict: false, coerce_numbers_to_str: false }), frozen: false }, Field { name: "type", lookup_key: Simple { key: "type", py_key: Py(0x7fffff8ebef0), path: LookupPath([S("type", Py(0x7fffff8ebef0))]) }, name_py: Py(0x7fffff8ebef0), validator: WithDefault(WithDefaultValidator { default: Default(Py(0x7fffe1f77ab0)), on_error: Raise, validator: Literal(LiteralValidator { lookup: LiteralLookup { expected_bool: None, expected_int: None, expected_str: Some({"scene_by_name": 0}), expected_py: None, values: [Py(0x7fffe1f77ab0)] }, expected_repr: "'scene_by_name'", name: "literal['scene_by_name']" }), validate_default: false, copy_default: false, name: "default[literal['scene_by_name']]" }), frozen: false }], model_name: "scene_by_name", extra_behavior: Ignore, extras_validator: None, strict: false, from_attributes: false, loc_by_alias: true }), class: Py(0x555556aed8f0), post_init: None, frozen: false, custom_init: false, root_model: false, name: "scene_by_name" }), Model(ModelValidator { revalidate: Never, validator: ModelFields(ModelFieldsValidator { fields: [Field { name: "forward", lookup_key: Simple { key: "forward", py_key: Py(0x7ffffddd9770), path: LookupPath([S("forward", Py(0x7ffffddd9770))]) }, name_py: Py(0x7ffffddd9770), validator: DefinitionRef(DefinitionRefValidator { definition: "kittycad.models.axis_direction_pair.AxisDirectionPair:93825014569648" }), frozen: false }, Field { name: "up", lookup_key: Simple { key: "up", py_key: Py(0x7ffffdc55170), path: LookupPath([S("up", Py(0x7ffffdc55170))]) }, name_py: Py(0x7ffffdc55170), validator: DefinitionRef(DefinitionRefValidator { definition: "kittycad.models.axis_direction_pair.AxisDirectionPair:93825014569648" }), frozen: false }], model_name: "System", extra_behavior: Ignore, extras_validator: None, strict: false, from_attributes: false, loc_by_alias: true }), class: Py(0x555556aa6640), post_init: None, frozen: false, custom_init: false, root_model: false, name: "System" }), Model(ModelValidator { revalidate: Never, validator: ModelFields(ModelFieldsValidator { fields: [Field { name: "index", lookup_key: Simple { key: "index", py_key: Py(0x7fffff920af0), path: LookupPath([S("index", Py(0x7fffff920af0))]) }, name_py: Py(0x7fffff920af0), validator: Int(IntValidator { strict: false }), frozen: false }, Field { name: "type", lookup_key: Simple { key: "type", py_key: Py(0x7fffff8ebef0), path: LookupPath([S("type", Py(0x7fffff8ebef0))]) }, name_py: Py(0x7fffff8ebef0), validator: WithDefault(WithDefaultValidator { default: Default(Py(0x7fffe13987f0)), on_error: Raise, validator: Literal(LiteralValidator { lookup: LiteralLookup { expected_bool: None, expected_int: None, expected_str: Some({"mesh_by_index": 0}), expected_py: None, values: [Py(0x7fffe13987f0)] }, expected_repr: "'mesh_by_index'", name: "literal['mesh_by_index']" }), validate_default: false, copy_default: false, name: "default[literal['mesh_by_index']]" }), frozen: false }], model_name: "mesh_by_index", extra_behavior: Ignore, extras_validator: None, strict: false, from_attributes: false, loc_by_alias: true }), class: Py(0x555556aeee80), post_init: None, frozen: false, custom_init: false, root_model: false, name: "mesh_by_index" }), Model(ModelValidator { revalidate: Never, validator: ModelFields(ModelFieldsValidator { fields: [Field { name: "axis", lookup_key: Simple { key: "axis", py_key: Py(0x7ffffcb74b30), path: LookupPath([S("axis", Py(0x7ffffcb74b30))]) }, name_py: Py(0x7ffffcb74b30), validator: DefinitionRef(DefinitionRefValidator { definition: "kittycad.models.axis.Axis:93825014567168" }), frozen: false }, Field { name: "direction", lookup_key: Simple { key: "direction", py_key: Py(0x7fffff77c7f0), path: LookupPath([S("direction", Py(0x7fffff77c7f0))]) }, name_py: Py(0x7fffff77c7f0), validator: DefinitionRef(DefinitionRefValidator { definition: "kittycad.models.direction.Direction:93825014568112" }), frozen: false }], model_name: "AxisDirectionPair", extra_behavior: Ignore, extras_validator: None, strict: false, from_attributes: false, loc_by_alias: true }), class: Py(0x555556aa1ab0), post_init: None, frozen: false, custom_init: false, root_model: false, name: "AxisDirectionPair" }), LaxOrStrict(LaxOrStrictValidator { strict: false, lax_validator: Chain(ChainValidator { steps: [Str(StrValidator { strict: false, coerce_numbers_to_str: false }), FunctionPlain(FunctionPlainValidator { func: Py(0x7fffe14d0160), config: Py(0x7fffe1027580), name: "function-plain[to_enum()]", field_name: None, info_arg: false })], name: "chain[str,function-plain[to_enum()]]" }), strict_validator: JsonOrPython(JsonOrPython { json: FunctionAfter(FunctionAfterValidator { validator: Str(StrValidator { strict: false, coerce_numbers_to_str: false }), func: Py(0x7fffe14d0160), config: Py(0x7fffe1027580), name: "function-after[to_enum(), str]", field_name: None, info_arg: false }), python: IsInstance(IsInstanceValidator { class: Py(0x555556aa14b0), class_repr: "Direction", name: "is-instance[Direction]" }), name: "json-or-python[json=function-after[to_enum(), str],python=is-instance[Direction]]" }), name: "lax-or-strict[lax=chain[str,function-plain[to_enum()]],strict=json-or-python[json=function-after[to_enum(), str],python=is-instance[Direction]]]" }), Model(ModelValidator { revalidate: Never, validator: Union(UnionValidator { mode: Smart, choices: [(DefinitionRef(DefinitionRefValidator { definition: "kittycad.models.selection.default_scene:93825014224528" }), None), (DefinitionRef(DefinitionRefValidator { definition: "kittycad.models.selection.scene_by_index:93825014871232" }), None), (DefinitionRef(DefinitionRefValidator { definition: "kittycad.models.selection.scene_by_name:93825014880496" }), None), (DefinitionRef(DefinitionRefValidator { definition: "kittycad.models.selection.mesh_by_index:93825014886016" }), None), (DefinitionRef(DefinitionRefValidator { definition: "kittycad.models.selection.mesh_by_name:93825014893472" }), None)], custom_error: None, strict: false, name: "union[default_scene,scene_by_index,scene_by_name,mesh_by_index,mesh_by_name]" }), class: Py(0x555556af2d80), post_init: None, frozen: false, custom_init: false, root_model: true, name: "RootModel[Annotated[Union[kittycad.models.selection.default_scene, kittycad.models.selection.scene_by_index, kittycad.models.selection.scene_by_name, kittycad.models.selection.mesh_by_index, kittycad.models.selection.mesh_by_name], FieldInfo(annotation=NoneType, required=True, discriminator='type')]]" }), LaxOrStrict(LaxOrStrictValidator { strict: false, lax_validator: Chain(ChainValidator { steps: [Str(StrValidator { strict: false, coerce_numbers_to_str: false }), FunctionPlain(FunctionPlainValidator { func: Py(0x7fffe14d0ca0), config: Py(0x7fffe1027580), name: "function-plain[to_enum()]", field_name: None, info_arg: false })], name: "chain[str,function-plain[to_enum()]]" }), strict_validator: JsonOrPython(JsonOrPython { json: FunctionAfter(FunctionAfterValidator { validator: Str(StrValidator { strict: false, coerce_numbers_to_str: false }), func: Py(0x7fffe14d0ca0), config: Py(0x7fffe1027580), name: "function-after[to_enum(), str]", field_name: None, info_arg: false }), python: IsInstance(IsInstanceValidator { class: Py(0x555556aa1100), class_repr: "Axis", name: "is-instance[Axis]" }), name: "json-or-python[json=function-after[to_enum(), str],python=is-instance[Axis]]" }), name: "lax-or-strict[lax=chain[str,function-plain[to_enum()]],strict=json-or-python[json=function-after[to_enum(), str],python=is-instance[Axis]]]" }), LaxOrStrict(LaxOrStrictValidator { strict: false, lax_validator: Chain(ChainValidator { steps: [Str(StrValidator { strict: false, coerce_numbers_to_str: false }), FunctionPlain(FunctionPlainValidator { func: Py(0x7fffe1009430), config: Py(0x7fffe1027580), name: "function-plain[to_enum()]", field_name: None, info_arg: false })], name: "chain[str,function-plain[to_enum()]]" }), strict_validator: JsonOrPython(JsonOrPython { json: FunctionAfter(FunctionAfterValidator { validator: Str(StrValidator { strict: false, coerce_numbers_to_str: false }), func: Py(0x7fffe1009430), config: Py(0x7fffe1027580), name: "function-after[to_enum(), str]", field_name: None, info_arg: false }), python: IsInstance(IsInstanceValidator { class: Py(0x555556aac630), class_repr: "UnitLength", name: "is-instance[UnitLength]" }), name: "json-or-python[json=function-after[to_enum(), str],python=is-instance[UnitLength]]" }), name: "lax-or-strict[lax=chain[str,function-plain[to_enum()]],strict=json-or-python[json=function-after[to_enum(), str],python=is-instance[UnitLength]]]" }), Model(ModelValidator { revalidate: Never, validator: ModelFields(ModelFieldsValidator { fields: [Field { name: "index", lookup_key: Simple { key: "index", py_key: Py(0x7fffff920af0), path: LookupPath([S("index", Py(0x7fffff920af0))]) }, name_py: Py(0x7fffff920af0), validator: Int(IntValidator { strict: false }), frozen: false }, Field { name: "type", lookup_key: Simple { key: "type", py_key: Py(0x7fffff8ebef0), path: LookupPath([S("type", Py(0x7fffff8ebef0))]) }, name_py: Py(0x7fffff8ebef0), validator: WithDefault(WithDefaultValidator { default: Default(Py(0x7fffe1285ef0)), on_error: Raise, validator: Literal(LiteralValidator { lookup: LiteralLookup { expected_bool: None, expected_int: None, expected_str: Some({"scene_by_index": 0}), expected_py: None, values: [Py(0x7fffe1285ef0)] }, expected_repr: "'scene_by_index'", name: "literal['scene_by_index']" }), validate_default: false, copy_default: false, name: "default[literal['scene_by_index']]" }), frozen: false }], model_name: "scene_by_index", extra_behavior: Ignore, extras_validator: None, strict: false, from_attributes: false, loc_by_alias: true }), class: Py(0x555556aeb4c0), post_init: None, frozen: false, custom_init: false, root_model: false, name: "scene_by_index" })])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, entity_ids: List[str], format: pydantic.root_model.RootModel[Annotated[Union[kittycad.models.output_format.fbx, kittycad.models.output_format.gltf, kittycad.models.output_format.obj, kittycad.models.output_format.ply, kittycad.models.output_format.step, kittycad.models.output_format.stl], FieldInfo(annotation=NoneType, required=True, discriminator='type')]], source_unit: kittycad.models.unit_length.UnitLength, type: Literal['export'] = 'export') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

entity_ids: List[str][source]
format: stl], FieldInfo(annotation=NoneType, required=True, discriminator='type')]][source]
classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'entity_ids': FieldInfo(annotation=List[str], required=True), 'format': FieldInfo(annotation=RootModel[Annotated[Union[kittycad.models.output_format.fbx, kittycad.models.output_format.gltf, kittycad.models.output_format.obj, kittycad.models.output_format.ply, kittycad.models.output_format.step, kittycad.models.output_format.stl], FieldInfo(annotation=NoneType, required=True, discriminator='type')]], required=True), 'source_unit': FieldInfo(annotation=UnitLength, required=True), 'type': FieldInfo(annotation=Literal['export'], required=False, default='export')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

source_unit: UnitLength[source]
type: Literal['export'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.extend_path(**data)[source][source]

Extend a path by adding a new segment which starts at the path’s “pen”. If no “pen” location has been set before (via MovePen), then the pen is at the origin.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'path': <class 'kittycad.models.modeling_cmd_id.ModelingCmdId'>, 'segment': <class 'pydantic.root_model.RootModel[Annotated[Union[kittycad.models.path_segment.line, kittycad.models.path_segment.arc, kittycad.models.path_segment.bezier, kittycad.models.path_segment.tangential_arc, kittycad.models.path_segment.tangential_arc_to], FieldInfo(annotation=NoneType, required=True, discriminator='type')]]'>, 'type': typing.Literal['extend_path']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'path': FieldInfo(annotation=ModelingCmdId, required=True), 'segment': FieldInfo(annotation=RootModel[Annotated[Union[kittycad.models.path_segment.line, kittycad.models.path_segment.arc, kittycad.models.path_segment.bezier, kittycad.models.path_segment.tangential_arc, kittycad.models.path_segment.tangential_arc_to], FieldInfo(annotation=NoneType, required=True, discriminator='type')]], required=True), 'type': FieldInfo(annotation=Literal['extend_path'], required=False, default='extend_path')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'definitions': [{'type': 'model', 'cls': <class 'kittycad.models.point3d.Point3d'>, 'schema': {'type': 'model-fields', 'fields': {'x': {'type': 'model-field', 'schema': {'type': 'float', 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'y': {'type': 'model-field', 'schema': {'type': 'float', 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'z': {'type': 'model-field', 'schema': {'type': 'float', 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}}, 'model_name': 'Point3d', 'computed_fields': []}, 'custom_init': False, 'root_model': False, 'config': {'title': 'Point3d'}, 'ref': 'kittycad.models.point3d.Point3d:93825014233264', 'metadata': {'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.point3d.Point3d'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.point3d.Point3d'>>], 'pydantic_js_annotation_functions': [], 'pydantic.internal.needs_apply_discriminated_union': False}}, {'type': 'model', 'cls': <class 'kittycad.models.angle.Angle'>, 'schema': {'type': 'model-fields', 'fields': {'unit': {'type': 'model-field', 'schema': {'type': 'definition-ref', 'schema_ref': 'kittycad.models.unit_angle.UnitAngle:93825014169808'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'value': {'type': 'model-field', 'schema': {'type': 'float', 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}}, 'model_name': 'Angle', 'computed_fields': []}, 'custom_init': False, 'root_model': False, 'config': {'title': 'Angle'}, 'ref': 'kittycad.models.angle.Angle:93825014170752', 'metadata': {'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.angle.Angle'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.angle.Angle'>>], 'pydantic_js_annotation_functions': [], 'pydantic.internal.needs_apply_discriminated_union': False}}, {'type': 'lax-or-strict', 'lax_schema': {'type': 'chain', 'steps': [{'type': 'str'}, {'type': 'function-plain', 'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}}]}, 'strict_schema': {'type': 'json-or-python', 'json_schema': {'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}, 'schema': {'type': 'str'}, 'type': 'function-after'}, 'python_schema': {'type': 'is-instance', 'cls': <enum 'UnitAngle'>}}, 'ref': 'kittycad.models.unit_angle.UnitAngle:93825014169808', 'metadata': {'pydantic_js_functions': [<function get_enum_core_schema.<locals>.get_json_schema>], 'pydantic.internal.needs_apply_discriminated_union': False}}], 'schema': {'cls': <class 'kittycad.models.modeling_cmd.extend_path'>, 'config': {'title': 'extend_path'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.extend_path'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.extend_path'>>]}, 'ref': 'kittycad.models.modeling_cmd.extend_path:93825018723120', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'path': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'function': {'function': <class 'kittycad.models.modeling_cmd_id.ModelingCmdId'>, 'type': 'no-info'}, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'function-after'}, 'type': 'model-field'}, 'segment': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'cls': <class 'pydantic.root_model.RootModel[Annotated[Union[kittycad.models.path_segment.line, kittycad.models.path_segment.arc, kittycad.models.path_segment.bezier, kittycad.models.path_segment.tangential_arc, kittycad.models.path_segment.tangential_arc_to], FieldInfo(annotation=NoneType, required=True, discriminator='type')]]'>, 'config': {'title': "RootModel[Annotated[Union[kittycad.models.path_segment.line, kittycad.models.path_segment.arc, kittycad.models.path_segment.bezier, kittycad.models.path_segment.tangential_arc, kittycad.models.path_segment.tangential_arc_to], FieldInfo(annotation=NoneType, required=True, discriminator='type')]]"}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'pydantic.root_model.RootModel[Annotated[Union[kittycad.models.path_segment.line, kittycad.models.path_segment.arc, kittycad.models.path_segment.bezier, kittycad.models.path_segment.tangential_arc, kittycad.models.path_segment.tangential_arc_to], FieldInfo(annotation=NoneType, required=True, discriminator='type')]]'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'pydantic.root_model.RootModel[Annotated[Union[kittycad.models.path_segment.line, kittycad.models.path_segment.arc, kittycad.models.path_segment.bezier, kittycad.models.path_segment.tangential_arc, kittycad.models.path_segment.tangential_arc_to], FieldInfo(annotation=NoneType, required=True, discriminator='type')]]'>>]}, 'ref': "pydantic.root_model.RootModel:93825014829600[Annotated[Union[kittycad.models.path_segment.line, kittycad.models.path_segment.arc, kittycad.models.path_segment.bezier, kittycad.models.path_segment.tangential_arc, kittycad.models.path_segment.tangential_arc_to], FieldInfo(annotation=NoneType, required=True, discriminator='type')]:140736968490720]", 'root_model': True, 'schema': {'choices': [{'type': 'model', 'cls': <class 'kittycad.models.path_segment.line'>, 'schema': {'type': 'model-fields', 'fields': {'end': {'type': 'model-field', 'schema': {'type': 'definition-ref', 'schema_ref': 'kittycad.models.point3d.Point3d:93825014233264'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'relative': {'type': 'model-field', 'schema': {'type': 'bool', 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'type': {'type': 'model-field', 'schema': {'type': 'default', 'schema': {'type': 'literal', 'expected': ['line'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'default': 'line'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}}, 'model_name': 'line', 'computed_fields': []}, 'custom_init': False, 'root_model': False, 'config': {'title': 'line'}, 'ref': 'kittycad.models.path_segment.line:93825018804224', 'metadata': {'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.path_segment.line'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.path_segment.line'>>], 'pydantic_js_annotation_functions': [], 'pydantic.internal.needs_apply_discriminated_union': False}}, {'type': 'model', 'cls': <class 'kittycad.models.path_segment.arc'>, 'schema': {'type': 'model-fields', 'fields': {'angle_end': {'type': 'model-field', 'schema': {'type': 'float', 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'angle_start': {'type': 'model-field', 'schema': {'type': 'float', 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'center': {'type': 'model-field', 'schema': {'type': 'model', 'cls': <class 'kittycad.models.point2d.Point2d'>, 'schema': {'type': 'model-fields', 'fields': {'x': {'type': 'model-field', 'schema': {'type': 'float', 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'y': {'type': 'model-field', 'schema': {'type': 'float', 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}}, 'model_name': 'Point2d', 'computed_fields': []}, 'custom_init': False, 'root_model': False, 'config': {'title': 'Point2d'}, 'ref': 'kittycad.models.point2d.Point2d:93825018798944', 'metadata': {'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.point2d.Point2d'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.point2d.Point2d'>>], 'pydantic_js_annotation_functions': [], 'pydantic.internal.needs_apply_discriminated_union': False}}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'end': {'type': 'model-field', 'schema': {'type': 'default', 'schema': {'type': 'nullable', 'schema': {'type': 'definition-ref', 'schema_ref': 'kittycad.models.angle.Angle:93825014170752', 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'default': None}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'radius': {'type': 'model-field', 'schema': {'type': 'float', 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'relative': {'type': 'model-field', 'schema': {'type': 'bool', 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'start': {'type': 'model-field', 'schema': {'type': 'default', 'schema': {'type': 'nullable', 'schema': {'type': 'definition-ref', 'schema_ref': 'kittycad.models.angle.Angle:93825014170752', 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'default': None}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'type': {'type': 'model-field', 'schema': {'type': 'default', 'schema': {'type': 'literal', 'expected': ['arc'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'default': 'arc'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}}, 'model_name': 'arc', 'computed_fields': []}, 'custom_init': False, 'root_model': False, 'config': {'title': 'arc'}, 'ref': 'kittycad.models.path_segment.arc:93825018530464', 'metadata': {'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.path_segment.arc'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.path_segment.arc'>>], 'pydantic_js_annotation_functions': [], 'pydantic.internal.needs_apply_discriminated_union': False}}, {'type': 'model', 'cls': <class 'kittycad.models.path_segment.bezier'>, 'schema': {'type': 'model-fields', 'fields': {'control1': {'type': 'model-field', 'schema': {'type': 'definition-ref', 'schema_ref': 'kittycad.models.point3d.Point3d:93825014233264'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'control2': {'type': 'model-field', 'schema': {'type': 'definition-ref', 'schema_ref': 'kittycad.models.point3d.Point3d:93825014233264'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'end': {'type': 'model-field', 'schema': {'type': 'definition-ref', 'schema_ref': 'kittycad.models.point3d.Point3d:93825014233264'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'relative': {'type': 'model-field', 'schema': {'type': 'bool', 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'type': {'type': 'model-field', 'schema': {'type': 'default', 'schema': {'type': 'literal', 'expected': ['bezier'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'default': 'bezier'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}}, 'model_name': 'bezier', 'computed_fields': []}, 'custom_init': False, 'root_model': False, 'config': {'title': 'bezier'}, 'ref': 'kittycad.models.path_segment.bezier:93825018567312', 'metadata': {'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.path_segment.bezier'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.path_segment.bezier'>>], 'pydantic_js_annotation_functions': [], 'pydantic.internal.needs_apply_discriminated_union': False}}, {'type': 'model', 'cls': <class 'kittycad.models.path_segment.tangential_arc'>, 'schema': {'type': 'model-fields', 'fields': {'offset': {'type': 'model-field', 'schema': {'type': 'definition-ref', 'schema_ref': 'kittycad.models.angle.Angle:93825014170752'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'radius': {'type': 'model-field', 'schema': {'type': 'float', 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'type': {'type': 'model-field', 'schema': {'type': 'default', 'schema': {'type': 'literal', 'expected': ['tangential_arc'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'default': 'tangential_arc'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}}, 'model_name': 'tangential_arc', 'computed_fields': []}, 'custom_init': False, 'root_model': False, 'config': {'title': 'tangential_arc'}, 'ref': 'kittycad.models.path_segment.tangential_arc:93825018585872', 'metadata': {'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.path_segment.tangential_arc'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.path_segment.tangential_arc'>>], 'pydantic_js_annotation_functions': [], 'pydantic.internal.needs_apply_discriminated_union': False}}, {'type': 'model', 'cls': <class 'kittycad.models.path_segment.tangential_arc_to'>, 'schema': {'type': 'model-fields', 'fields': {'angle_snap_increment': {'type': 'model-field', 'schema': {'type': 'default', 'schema': {'type': 'nullable', 'schema': {'type': 'definition-ref', 'schema_ref': 'kittycad.models.angle.Angle:93825014170752'}, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'default': None}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'to': {'type': 'model-field', 'schema': {'type': 'definition-ref', 'schema_ref': 'kittycad.models.point3d.Point3d:93825014233264'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'type': {'type': 'model-field', 'schema': {'type': 'default', 'schema': {'type': 'literal', 'expected': ['tangential_arc_to'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'default': 'tangential_arc_to'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}}, 'model_name': 'tangential_arc_to', 'computed_fields': []}, 'custom_init': False, 'root_model': False, 'config': {'title': 'tangential_arc_to'}, 'ref': 'kittycad.models.path_segment.tangential_arc_to:93825018605968', 'metadata': {'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.path_segment.tangential_arc_to'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.path_segment.tangential_arc_to'>>], 'pydantic_js_annotation_functions': [], 'pydantic.internal.needs_apply_discriminated_union': False}}], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': True, 'pydantic.internal.union_discriminator': 'type'}, 'type': 'union'}, 'type': 'model'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'extend_path', 'schema': {'expected': ['extend_path'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'extend_path', 'type': 'model-fields'}, 'type': 'model'}, 'type': 'definitions'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556e97b30,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "path": SerField {                         key_py: Py(                             0x00007fffff952230,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Str(                                 StrSerializer,                             ),                         ),                         required: true,                     },                     "segment": SerField {                         key_py: Py(                             0x00007ffffd3db5b0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Model(                                 ModelSerializer {                                     class: Py(                                         0x0000555556e7bbd0,                                     ),                                     serializer: Union(                                         UnionSerializer {                                             choices: [                                                 Model(                                                     ModelSerializer {                                                         class: Py(                                                             0x0000555556eab800,                                                         ),                                                         serializer: Fields(                                                             GeneralFieldsSerializer {                                                                 fields: {                                                                     "type": SerField {                                                                         key_py: Py(                                                                             0x00007fffff8ebef0,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             WithDefault(                                                                                 WithDefaultSerializer {                                                                                     default: Default(                                                                                         Py(                                                                                             0x00007fffff8676f0,                                                                                         ),                                                                                     ),                                                                                     serializer: Literal(                                                                                         LiteralSerializer {                                                                                             expected_int: {},                                                                                             expected_str: {                                                                                                 "line",                                                                                             },                                                                                             expected_py: None,                                                                                             name: "literal['line']",                                                                                         },                                                                                     ),                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                     "relative": SerField {                                                                         key_py: Py(                                                                             0x00007fffff8d1630,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             Bool(                                                                                 BoolSerializer,                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                     "end": SerField {                                                                         key_py: Py(                                                                             0x00007fffff952eb0,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             Recursive(                                                                                 DefinitionRefSerializer {                                                                                     definition: "kittycad.models.point3d.Point3d:93825014233264",                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                 },                                                                 computed_fields: Some(                                                                     ComputedFields(                                                                         [],                                                                     ),                                                                 ),                                                                 mode: SimpleDict,                                                                 extra_serializer: None,                                                                 filter: SchemaFilter {                                                                     include: None,                                                                     exclude: None,                                                                 },                                                                 required_fields: 3,                                                             },                                                         ),                                                         has_extra: false,                                                         root_model: false,                                                         name: "line",                                                     },                                                 ),                                                 Model(                                                     ModelSerializer {                                                         class: Py(                                                             0x0000555556e68aa0,                                                         ),                                                         serializer: Fields(                                                             GeneralFieldsSerializer {                                                                 fields: {                                                                     "angle_start": SerField {                                                                         key_py: Py(                                                                             0x00007fffe10f9070,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             Float(                                                                                 FloatSerializer {                                                                                     inf_nan_mode: Null,                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                     "radius": SerField {                                                                         key_py: Py(                                                                             0x00007fffe2ef5530,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             Float(                                                                                 FloatSerializer {                                                                                     inf_nan_mode: Null,                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                     "center": SerField {                                                                         key_py: Py(                                                                             0x00007fffff920830,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             Model(                                                                                 ModelSerializer {                                                                                     class: Py(                                                                                         0x0000555556eaa360,                                                                                     ),                                                                                     serializer: Fields(                                                                                         GeneralFieldsSerializer {                                                                                             fields: {                                                                                                 "x": SerField {                                                                                                     key_py: Py(                                                                                                         0x00007fffff8fe870,                                                                                                     ),                                                                                                     alias: None,                                                                                                     alias_py: None,                                                                                                     serializer: Some(                                                                                                         Float(                                                                                                             FloatSerializer {                                                                                                                 inf_nan_mode: Null,                                                                                                             },                                                                                                         ),                                                                                                     ),                                                                                                     required: true,                                                                                                 },                                                                                                 "y": SerField {                                                                                                     key_py: Py(                                                                                                         0x00007fffff72a730,                                                                                                     ),                                                                                                     alias: None,                                                                                                     alias_py: None,                                                                                                     serializer: Some(                                                                                                         Float(                                                                                                             FloatSerializer {                                                                                                                 inf_nan_mode: Null,                                                                                                             },                                                                                                         ),                                                                                                     ),                                                                                                     required: true,                                                                                                 },                                                                                             },                                                                                             computed_fields: Some(                                                                                                 ComputedFields(                                                                                                     [],                                                                                                 ),                                                                                             ),                                                                                             mode: SimpleDict,                                                                                             extra_serializer: None,                                                                                             filter: SchemaFilter {                                                                                                 include: None,                                                                                                 exclude: None,                                                                                             },                                                                                             required_fields: 2,                                                                                         },                                                                                     ),                                                                                     has_extra: false,                                                                                     root_model: false,                                                                                     name: "Point2d",                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                     "relative": SerField {                                                                         key_py: Py(                                                                             0x00007fffff8d1630,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             Bool(                                                                                 BoolSerializer,                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                     "start": SerField {                                                                         key_py: Py(                                                                             0x00007fffff929c30,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             WithDefault(                                                                                 WithDefaultSerializer {                                                                                     default: Default(                                                                                         Py(                                                                                             0x00007ffffff85420,                                                                                         ),                                                                                     ),                                                                                     serializer: Nullable(                                                                                         NullableSerializer {                                                                                             serializer: Recursive(                                                                                                 DefinitionRefSerializer {                                                                                                     definition: "kittycad.models.angle.Angle:93825014170752",                                                                                                 },                                                                                             ),                                                                                         },                                                                                     ),                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                     "type": SerField {                                                                         key_py: Py(                                                                             0x00007fffff8ebef0,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             WithDefault(                                                                                 WithDefaultSerializer {                                                                                     default: Default(                                                                                         Py(                                                                                             0x00007ffffd7d36b0,                                                                                         ),                                                                                     ),                                                                                     serializer: Literal(                                                                                         LiteralSerializer {                                                                                             expected_int: {},                                                                                             expected_str: {                                                                                                 "arc",                                                                                             },                                                                                             expected_py: None,                                                                                             name: "literal['arc']",                                                                                         },                                                                                     ),                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                     "angle_end": SerField {                                                                         key_py: Py(                                                                             0x00007fffe10f9030,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             Float(                                                                                 FloatSerializer {                                                                                     inf_nan_mode: Null,                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                     "end": SerField {                                                                         key_py: Py(                                                                             0x00007fffff952eb0,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             WithDefault(                                                                                 WithDefaultSerializer {                                                                                     default: Default(                                                                                         Py(                                                                                             0x00007ffffff85420,                                                                                         ),                                                                                     ),                                                                                     serializer: Nullable(                                                                                         NullableSerializer {                                                                                             serializer: Recursive(                                                                                                 DefinitionRefSerializer {                                                                                                     definition: "kittycad.models.angle.Angle:93825014170752",                                                                                                 },                                                                                             ),                                                                                         },                                                                                     ),                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                 },                                                                 computed_fields: Some(                                                                     ComputedFields(                                                                         [],                                                                     ),                                                                 ),                                                                 mode: SimpleDict,                                                                 extra_serializer: None,                                                                 filter: SchemaFilter {                                                                     include: None,                                                                     exclude: None,                                                                 },                                                                 required_fields: 8,                                                             },                                                         ),                                                         has_extra: false,                                                         root_model: false,                                                         name: "arc",                                                     },                                                 ),                                                 Model(                                                     ModelSerializer {                                                         class: Py(                                                             0x0000555556e71a90,                                                         ),                                                         serializer: Fields(                                                             GeneralFieldsSerializer {                                                                 fields: {                                                                     "control2": SerField {                                                                         key_py: Py(                                                                             0x00007fffe10a22b0,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             Recursive(                                                                                 DefinitionRefSerializer {                                                                                     definition: "kittycad.models.point3d.Point3d:93825014233264",                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                     "end": SerField {                                                                         key_py: Py(                                                                             0x00007fffff952eb0,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             Recursive(                                                                                 DefinitionRefSerializer {                                                                                     definition: "kittycad.models.point3d.Point3d:93825014233264",                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                     "control1": SerField {                                                                         key_py: Py(                                                                             0x00007fffe1457a30,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             Recursive(                                                                                 DefinitionRefSerializer {                                                                                     definition: "kittycad.models.point3d.Point3d:93825014233264",                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                     "relative": SerField {                                                                         key_py: Py(                                                                             0x00007fffff8d1630,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             Bool(                                                                                 BoolSerializer,                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                     "type": SerField {                                                                         key_py: Py(                                                                             0x00007fffff8ebef0,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             WithDefault(                                                                                 WithDefaultSerializer {                                                                                     default: Default(                                                                                         Py(                                                                                             0x00007ffffdb79ef0,                                                                                         ),                                                                                     ),                                                                                     serializer: Literal(                                                                                         LiteralSerializer {                                                                                             expected_int: {},                                                                                             expected_str: {                                                                                                 "bezier",                                                                                             },                                                                                             expected_py: None,                                                                                             name: "literal['bezier']",                                                                                         },                                                                                     ),                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                 },                                                                 computed_fields: Some(                                                                     ComputedFields(                                                                         [],                                                                     ),                                                                 ),                                                                 mode: SimpleDict,                                                                 extra_serializer: None,                                                                 filter: SchemaFilter {                                                                     include: None,                                                                     exclude: None,                                                                 },                                                                 required_fields: 5,                                                             },                                                         ),                                                         has_extra: false,                                                         root_model: false,                                                         name: "bezier",                                                     },                                                 ),                                                 Model(                                                     ModelSerializer {                                                         class: Py(                                                             0x0000555556e76310,                                                         ),                                                         serializer: Fields(                                                             GeneralFieldsSerializer {                                                                 fields: {                                                                     "type": SerField {                                                                         key_py: Py(                                                                             0x00007fffff8ebef0,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             WithDefault(                                                                                 WithDefaultSerializer {                                                                                     default: Default(                                                                                         Py(                                                                                             0x00007fffe10a25b0,                                                                                         ),                                                                                     ),                                                                                     serializer: Literal(                                                                                         LiteralSerializer {                                                                                             expected_int: {},                                                                                             expected_str: {                                                                                                 "tangential_arc",                                                                                             },                                                                                             expected_py: None,                                                                                             name: "literal['tangential_arc']",                                                                                         },                                                                                     ),                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                     "radius": SerField {                                                                         key_py: Py(                                                                             0x00007fffe2ef5530,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             Float(                                                                                 FloatSerializer {                                                                                     inf_nan_mode: Null,                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                     "offset": SerField {                                                                         key_py: Py(                                                                             0x00007fffff952930,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             Recursive(                                                                                 DefinitionRefSerializer {                                                                                     definition: "kittycad.models.angle.Angle:93825014170752",                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                 },                                                                 computed_fields: Some(                                                                     ComputedFields(                                                                         [],                                                                     ),                                                                 ),                                                                 mode: SimpleDict,                                                                 extra_serializer: None,                                                                 filter: SchemaFilter {                                                                     include: None,                                                                     exclude: None,                                                                 },                                                                 required_fields: 3,                                                             },                                                         ),                                                         has_extra: false,                                                         root_model: false,                                                         name: "tangential_arc",                                                     },                                                 ),                                                 Model(                                                     ModelSerializer {                                                         class: Py(                                                             0x0000555556e7b190,                                                         ),                                                         serializer: Fields(                                                             GeneralFieldsSerializer {                                                                 fields: {                                                                     "angle_snap_increment": SerField {                                                                         key_py: Py(                                                                             0x00007fffe10a3490,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             WithDefault(                                                                                 WithDefaultSerializer {                                                                                     default: Default(                                                                                         Py(                                                                                             0x00007ffffff85420,                                                                                         ),                                                                                     ),                                                                                     serializer: Nullable(                                                                                         NullableSerializer {                                                                                             serializer: Recursive(                                                                                                 DefinitionRefSerializer {                                                                                                     definition: "kittycad.models.angle.Angle:93825014170752",                                                                                                 },                                                                                             ),                                                                                         },                                                                                     ),                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                     "to": SerField {                                                                         key_py: Py(                                                                             0x00007fffff70e470,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             Recursive(                                                                                 DefinitionRefSerializer {                                                                                     definition: "kittycad.models.point3d.Point3d:93825014233264",                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                     "type": SerField {                                                                         key_py: Py(                                                                             0x00007fffff8ebef0,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             WithDefault(                                                                                 WithDefaultSerializer {                                                                                     default: Default(                                                                                         Py(                                                                                             0x00007fffe10a33f0,                                                                                         ),                                                                                     ),                                                                                     serializer: Literal(                                                                                         LiteralSerializer {                                                                                             expected_int: {},                                                                                             expected_str: {                                                                                                 "tangential_arc_to",                                                                                             },                                                                                             expected_py: None,                                                                                             name: "literal['tangential_arc_to']",                                                                                         },                                                                                     ),                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                 },                                                                 computed_fields: Some(                                                                     ComputedFields(                                                                         [],                                                                     ),                                                                 ),                                                                 mode: SimpleDict,                                                                 extra_serializer: None,                                                                 filter: SchemaFilter {                                                                     include: None,                                                                     exclude: None,                                                                 },                                                                 required_fields: 3,                                                             },                                                         ),                                                         has_extra: false,                                                         root_model: false,                                                         name: "tangential_arc_to",                                                     },                                                 ),                                             ],                                             name: "Union[line, arc, bezier, tangential_arc, tangential_arc_to]",                                         },                                     ),                                     has_extra: false,                                     root_model: true,                                     name: "RootModel[Annotated[Union[kittycad.models.path_segment.line, kittycad.models.path_segment.arc, kittycad.models.path_segment.bezier, kittycad.models.path_segment.tangential_arc, kittycad.models.path_segment.tangential_arc_to], FieldInfo(annotation=NoneType, required=True, discriminator='type')]]",                                 },                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe1de3fb0,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "extend_path",                                             },                                             expected_py: None,                                             name: "literal['extend_path']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 3,             },         ),         has_extra: false,         root_model: false,         name: "extend_path",     }, ), definitions=[JsonOrPython(JsonOrPythonSerializer { json: Str(StrSerializer), python: Any(AnySerializer), name: "json-or-python[json=str, python=any]" }), Model(ModelSerializer { class: Py(0x555556a40480), serializer: Fields(GeneralFieldsSerializer { fields: {"value": SerField { key_py: Py(0x7fffff94de30), alias: None, alias_py: None, serializer: Some(Float(FloatSerializer { inf_nan_mode: Null })), required: true }, "unit": SerField { key_py: Py(0x7ffffe916ab0), alias: None, alias_py: None, serializer: Some(Recursive(DefinitionRefSerializer { definition: "kittycad.models.unit_angle.UnitAngle:93825014169808" })), required: true }}, computed_fields: Some(ComputedFields([])), mode: SimpleDict, extra_serializer: None, filter: SchemaFilter { include: None, exclude: None }, required_fields: 2 }), has_extra: false, root_model: false, name: "Angle" }), Model(ModelSerializer { class: Py(0x555556a4f8b0), serializer: Fields(GeneralFieldsSerializer { fields: {"x": SerField { key_py: Py(0x7fffff8fe870), alias: None, alias_py: None, serializer: Some(Float(FloatSerializer { inf_nan_mode: Null })), required: true }, "y": SerField { key_py: Py(0x7fffff72a730), alias: None, alias_py: None, serializer: Some(Float(FloatSerializer { inf_nan_mode: Null })), required: true }, "z": SerField { key_py: Py(0x7fffff72a770), alias: None, alias_py: None, serializer: Some(Float(FloatSerializer { inf_nan_mode: Null })), required: true }}, computed_fields: Some(ComputedFields([])), mode: SimpleDict, extra_serializer: None, filter: SchemaFilter { include: None, exclude: None }, required_fields: 3 }), has_extra: false, root_model: false, name: "Point3d" })])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="extend_path", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "path",                         lookup_key: Simple {                             key: "path",                             py_key: Py(                                 0x00007fffff952230,                             ),                             path: LookupPath(                                 [                                     S(                                         "path",                                         Py(                                             0x00007fffff952230,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff952230,                         ),                         validator: FunctionAfter(                             FunctionAfterValidator {                                 validator: Str(                                     StrValidator {                                         strict: false,                                         coerce_numbers_to_str: false,                                     },                                 ),                                 func: Py(                                     0x0000555556ea9850,                                 ),                                 config: Py(                                     0x00007fffe10671c0,                                 ),                                 name: "function-after[ModelingCmdId(), str]",                                 field_name: None,                                 info_arg: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "segment",                         lookup_key: Simple {                             key: "segment",                             py_key: Py(                                 0x00007ffffd3db5b0,                             ),                             path: LookupPath(                                 [                                     S(                                         "segment",                                         Py(                                             0x00007ffffd3db5b0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007ffffd3db5b0,                         ),                         validator: Model(                             ModelValidator {                                 revalidate: Never,                                 validator: Union(                                     UnionValidator {                                         mode: Smart,                                         choices: [                                             (                                                 Model(                                                     ModelValidator {                                                         revalidate: Never,                                                         validator: ModelFields(                                                             ModelFieldsValidator {                                                                 fields: [                                                                     Field {                                                                         name: "end",                                                                         lookup_key: Simple {                                                                             key: "end",                                                                             py_key: Py(                                                                                 0x00007fffff952eb0,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "end",                                                                                         Py(                                                                                             0x00007fffff952eb0,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007fffff952eb0,                                                                         ),                                                                         validator: DefinitionRef(                                                                             DefinitionRefValidator {                                                                                 definition: "kittycad.models.point3d.Point3d:93825014233264",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                     Field {                                                                         name: "relative",                                                                         lookup_key: Simple {                                                                             key: "relative",                                                                             py_key: Py(                                                                                 0x00007fffff8d1630,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "relative",                                                                                         Py(                                                                                             0x00007fffff8d1630,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007fffff8d1630,                                                                         ),                                                                         validator: Bool(                                                                             BoolValidator {                                                                                 strict: false,                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                     Field {                                                                         name: "type",                                                                         lookup_key: Simple {                                                                             key: "type",                                                                             py_key: Py(                                                                                 0x00007fffff8ebef0,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "type",                                                                                         Py(                                                                                             0x00007fffff8ebef0,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007fffff8ebef0,                                                                         ),                                                                         validator: WithDefault(                                                                             WithDefaultValidator {                                                                                 default: Default(                                                                                     Py(                                                                                         0x00007fffff8676f0,                                                                                     ),                                                                                 ),                                                                                 on_error: Raise,                                                                                 validator: Literal(                                                                                     LiteralValidator {                                                                                         lookup: LiteralLookup {                                                                                             expected_bool: None,                                                                                             expected_int: None,                                                                                             expected_str: Some(                                                                                                 {                                                                                                     "line": 0,                                                                                                 },                                                                                             ),                                                                                             expected_py: None,                                                                                             values: [                                                                                                 Py(                                                                                                     0x00007fffff8676f0,                                                                                                 ),                                                                                             ],                                                                                         },                                                                                         expected_repr: "'line'",                                                                                         name: "literal['line']",                                                                                     },                                                                                 ),                                                                                 validate_default: false,                                                                                 copy_default: false,                                                                                 name: "default[literal['line']]",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                 ],                                                                 model_name: "line",                                                                 extra_behavior: Ignore,                                                                 extras_validator: None,                                                                 strict: false,                                                                 from_attributes: false,                                                                 loc_by_alias: true,                                                             },                                                         ),                                                         class: Py(                                                             0x0000555556eab800,                                                         ),                                                         post_init: None,                                                         frozen: false,                                                         custom_init: false,                                                         root_model: false,                                                         name: "line",                                                     },                                                 ),                                                 None,                                             ),                                             (                                                 Model(                                                     ModelValidator {                                                         revalidate: Never,                                                         validator: ModelFields(                                                             ModelFieldsValidator {                                                                 fields: [                                                                     Field {                                                                         name: "angle_end",                                                                         lookup_key: Simple {                                                                             key: "angle_end",                                                                             py_key: Py(                                                                                 0x00007fffe10f9030,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "angle_end",                                                                                         Py(                                                                                             0x00007fffe10f9030,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007fffe10f9030,                                                                         ),                                                                         validator: Float(                                                                             FloatValidator {                                                                                 strict: false,                                                                                 allow_inf_nan: true,                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                     Field {                                                                         name: "angle_start",                                                                         lookup_key: Simple {                                                                             key: "angle_start",                                                                             py_key: Py(                                                                                 0x00007fffe10f9070,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "angle_start",                                                                                         Py(                                                                                             0x00007fffe10f9070,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007fffe10f9070,                                                                         ),                                                                         validator: Float(                                                                             FloatValidator {                                                                                 strict: false,                                                                                 allow_inf_nan: true,                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                     Field {                                                                         name: "center",                                                                         lookup_key: Simple {                                                                             key: "center",                                                                             py_key: Py(                                                                                 0x00007fffff920830,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "center",                                                                                         Py(                                                                                             0x00007fffff920830,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007fffff920830,                                                                         ),                                                                         validator: Model(                                                                             ModelValidator {                                                                                 revalidate: Never,                                                                                 validator: ModelFields(                                                                                     ModelFieldsValidator {                                                                                         fields: [                                                                                             Field {                                                                                                 name: "x",                                                                                                 lookup_key: Simple {                                                                                                     key: "x",                                                                                                     py_key: Py(                                                                                                         0x00007fffff8fe870,                                                                                                     ),                                                                                                     path: LookupPath(                                                                                                         [                                                                                                             S(                                                                                                                 "x",                                                                                                                 Py(                                                                                                                     0x00007fffff8fe870,                                                                                                                 ),                                                                                                             ),                                                                                                         ],                                                                                                     ),                                                                                                 },                                                                                                 name_py: Py(                                                                                                     0x00007fffff8fe870,                                                                                                 ),                                                                                                 validator: Float(                                                                                                     FloatValidator {                                                                                                         strict: false,                                                                                                         allow_inf_nan: true,                                                                                                     },                                                                                                 ),                                                                                                 frozen: false,                                                                                             },                                                                                             Field {                                                                                                 name: "y",                                                                                                 lookup_key: Simple {                                                                                                     key: "y",                                                                                                     py_key: Py(                                                                                                         0x00007fffff72a730,                                                                                                     ),                                                                                                     path: LookupPath(                                                                                                         [                                                                                                             S(                                                                                                                 "y",                                                                                                                 Py(                                                                                                                     0x00007fffff72a730,                                                                                                                 ),                                                                                                             ),                                                                                                         ],                                                                                                     ),                                                                                                 },                                                                                                 name_py: Py(                                                                                                     0x00007fffff72a730,                                                                                                 ),                                                                                                 validator: Float(                                                                                                     FloatValidator {                                                                                                         strict: false,                                                                                                         allow_inf_nan: true,                                                                                                     },                                                                                                 ),                                                                                                 frozen: false,                                                                                             },                                                                                         ],                                                                                         model_name: "Point2d",                                                                                         extra_behavior: Ignore,                                                                                         extras_validator: None,                                                                                         strict: false,                                                                                         from_attributes: false,                                                                                         loc_by_alias: true,                                                                                     },                                                                                 ),                                                                                 class: Py(                                                                                     0x0000555556eaa360,                                                                                 ),                                                                                 post_init: None,                                                                                 frozen: false,                                                                                 custom_init: false,                                                                                 root_model: false,                                                                                 name: "Point2d",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                     Field {                                                                         name: "end",                                                                         lookup_key: Simple {                                                                             key: "end",                                                                             py_key: Py(                                                                                 0x00007fffff952eb0,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "end",                                                                                         Py(                                                                                             0x00007fffff952eb0,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007fffff952eb0,                                                                         ),                                                                         validator: WithDefault(                                                                             WithDefaultValidator {                                                                                 default: Default(                                                                                     Py(                                                                                         0x00007ffffff85420,                                                                                     ),                                                                                 ),                                                                                 on_error: Raise,                                                                                 validator: Nullable(                                                                                     NullableValidator {                                                                                         validator: DefinitionRef(                                                                                             DefinitionRefValidator {                                                                                                 definition: "kittycad.models.angle.Angle:93825014170752",                                                                                             },                                                                                         ),                                                                                         name: "nullable[Angle]",                                                                                     },                                                                                 ),                                                                                 validate_default: false,                                                                                 copy_default: false,                                                                                 name: "default[nullable[Angle]]",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                     Field {                                                                         name: "radius",                                                                         lookup_key: Simple {                                                                             key: "radius",                                                                             py_key: Py(                                                                                 0x00007fffe2ef5530,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "radius",                                                                                         Py(                                                                                             0x00007fffe2ef5530,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007fffe2ef5530,                                                                         ),                                                                         validator: Float(                                                                             FloatValidator {                                                                                 strict: false,                                                                                 allow_inf_nan: true,                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                     Field {                                                                         name: "relative",                                                                         lookup_key: Simple {                                                                             key: "relative",                                                                             py_key: Py(                                                                                 0x00007fffff8d1630,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "relative",                                                                                         Py(                                                                                             0x00007fffff8d1630,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007fffff8d1630,                                                                         ),                                                                         validator: Bool(                                                                             BoolValidator {                                                                                 strict: false,                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                     Field {                                                                         name: "start",                                                                         lookup_key: Simple {                                                                             key: "start",                                                                             py_key: Py(                                                                                 0x00007fffff929c30,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "start",                                                                                         Py(                                                                                             0x00007fffff929c30,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007fffff929c30,                                                                         ),                                                                         validator: WithDefault(                                                                             WithDefaultValidator {                                                                                 default: Default(                                                                                     Py(                                                                                         0x00007ffffff85420,                                                                                     ),                                                                                 ),                                                                                 on_error: Raise,                                                                                 validator: Nullable(                                                                                     NullableValidator {                                                                                         validator: DefinitionRef(                                                                                             DefinitionRefValidator {                                                                                                 definition: "kittycad.models.angle.Angle:93825014170752",                                                                                             },                                                                                         ),                                                                                         name: "nullable[Angle]",                                                                                     },                                                                                 ),                                                                                 validate_default: false,                                                                                 copy_default: false,                                                                                 name: "default[nullable[Angle]]",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                     Field {                                                                         name: "type",                                                                         lookup_key: Simple {                                                                             key: "type",                                                                             py_key: Py(                                                                                 0x00007fffff8ebef0,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "type",                                                                                         Py(                                                                                             0x00007fffff8ebef0,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007fffff8ebef0,                                                                         ),                                                                         validator: WithDefault(                                                                             WithDefaultValidator {                                                                                 default: Default(                                                                                     Py(                                                                                         0x00007ffffd7d36b0,                                                                                     ),                                                                                 ),                                                                                 on_error: Raise,                                                                                 validator: Literal(                                                                                     LiteralValidator {                                                                                         lookup: LiteralLookup {                                                                                             expected_bool: None,                                                                                             expected_int: None,                                                                                             expected_str: Some(                                                                                                 {                                                                                                     "arc": 0,                                                                                                 },                                                                                             ),                                                                                             expected_py: None,                                                                                             values: [                                                                                                 Py(                                                                                                     0x00007ffffd7d36b0,                                                                                                 ),                                                                                             ],                                                                                         },                                                                                         expected_repr: "'arc'",                                                                                         name: "literal['arc']",                                                                                     },                                                                                 ),                                                                                 validate_default: false,                                                                                 copy_default: false,                                                                                 name: "default[literal['arc']]",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                 ],                                                                 model_name: "arc",                                                                 extra_behavior: Ignore,                                                                 extras_validator: None,                                                                 strict: false,                                                                 from_attributes: false,                                                                 loc_by_alias: true,                                                             },                                                         ),                                                         class: Py(                                                             0x0000555556e68aa0,                                                         ),                                                         post_init: None,                                                         frozen: false,                                                         custom_init: false,                                                         root_model: false,                                                         name: "arc",                                                     },                                                 ),                                                 None,                                             ),                                             (                                                 Model(                                                     ModelValidator {                                                         revalidate: Never,                                                         validator: ModelFields(                                                             ModelFieldsValidator {                                                                 fields: [                                                                     Field {                                                                         name: "control1",                                                                         lookup_key: Simple {                                                                             key: "control1",                                                                             py_key: Py(                                                                                 0x00007fffe1457a30,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "control1",                                                                                         Py(                                                                                             0x00007fffe1457a30,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007fffe1457a30,                                                                         ),                                                                         validator: DefinitionRef(                                                                             DefinitionRefValidator {                                                                                 definition: "kittycad.models.point3d.Point3d:93825014233264",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                     Field {                                                                         name: "control2",                                                                         lookup_key: Simple {                                                                             key: "control2",                                                                             py_key: Py(                                                                                 0x00007fffe10a22b0,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "control2",                                                                                         Py(                                                                                             0x00007fffe10a22b0,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007fffe10a22b0,                                                                         ),                                                                         validator: DefinitionRef(                                                                             DefinitionRefValidator {                                                                                 definition: "kittycad.models.point3d.Point3d:93825014233264",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                     Field {                                                                         name: "end",                                                                         lookup_key: Simple {                                                                             key: "end",                                                                             py_key: Py(                                                                                 0x00007fffff952eb0,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "end",                                                                                         Py(                                                                                             0x00007fffff952eb0,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007fffff952eb0,                                                                         ),                                                                         validator: DefinitionRef(                                                                             DefinitionRefValidator {                                                                                 definition: "kittycad.models.point3d.Point3d:93825014233264",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                     Field {                                                                         name: "relative",                                                                         lookup_key: Simple {                                                                             key: "relative",                                                                             py_key: Py(                                                                                 0x00007fffff8d1630,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "relative",                                                                                         Py(                                                                                             0x00007fffff8d1630,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007fffff8d1630,                                                                         ),                                                                         validator: Bool(                                                                             BoolValidator {                                                                                 strict: false,                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                     Field {                                                                         name: "type",                                                                         lookup_key: Simple {                                                                             key: "type",                                                                             py_key: Py(                                                                                 0x00007fffff8ebef0,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "type",                                                                                         Py(                                                                                             0x00007fffff8ebef0,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007fffff8ebef0,                                                                         ),                                                                         validator: WithDefault(                                                                             WithDefaultValidator {                                                                                 default: Default(                                                                                     Py(                                                                                         0x00007ffffdb79ef0,                                                                                     ),                                                                                 ),                                                                                 on_error: Raise,                                                                                 validator: Literal(                                                                                     LiteralValidator {                                                                                         lookup: LiteralLookup {                                                                                             expected_bool: None,                                                                                             expected_int: None,                                                                                             expected_str: Some(                                                                                                 {                                                                                                     "bezier": 0,                                                                                                 },                                                                                             ),                                                                                             expected_py: None,                                                                                             values: [                                                                                                 Py(                                                                                                     0x00007ffffdb79ef0,                                                                                                 ),                                                                                             ],                                                                                         },                                                                                         expected_repr: "'bezier'",                                                                                         name: "literal['bezier']",                                                                                     },                                                                                 ),                                                                                 validate_default: false,                                                                                 copy_default: false,                                                                                 name: "default[literal['bezier']]",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                 ],                                                                 model_name: "bezier",                                                                 extra_behavior: Ignore,                                                                 extras_validator: None,                                                                 strict: false,                                                                 from_attributes: false,                                                                 loc_by_alias: true,                                                             },                                                         ),                                                         class: Py(                                                             0x0000555556e71a90,                                                         ),                                                         post_init: None,                                                         frozen: false,                                                         custom_init: false,                                                         root_model: false,                                                         name: "bezier",                                                     },                                                 ),                                                 None,                                             ),                                             (                                                 Model(                                                     ModelValidator {                                                         revalidate: Never,                                                         validator: ModelFields(                                                             ModelFieldsValidator {                                                                 fields: [                                                                     Field {                                                                         name: "offset",                                                                         lookup_key: Simple {                                                                             key: "offset",                                                                             py_key: Py(                                                                                 0x00007fffff952930,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "offset",                                                                                         Py(                                                                                             0x00007fffff952930,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007fffff952930,                                                                         ),                                                                         validator: DefinitionRef(                                                                             DefinitionRefValidator {                                                                                 definition: "kittycad.models.angle.Angle:93825014170752",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                     Field {                                                                         name: "radius",                                                                         lookup_key: Simple {                                                                             key: "radius",                                                                             py_key: Py(                                                                                 0x00007fffe2ef5530,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "radius",                                                                                         Py(                                                                                             0x00007fffe2ef5530,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007fffe2ef5530,                                                                         ),                                                                         validator: Float(                                                                             FloatValidator {                                                                                 strict: false,                                                                                 allow_inf_nan: true,                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                     Field {                                                                         name: "type",                                                                         lookup_key: Simple {                                                                             key: "type",                                                                             py_key: Py(                                                                                 0x00007fffff8ebef0,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "type",                                                                                         Py(                                                                                             0x00007fffff8ebef0,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007fffff8ebef0,                                                                         ),                                                                         validator: WithDefault(                                                                             WithDefaultValidator {                                                                                 default: Default(                                                                                     Py(                                                                                         0x00007fffe10a25b0,                                                                                     ),                                                                                 ),                                                                                 on_error: Raise,                                                                                 validator: Literal(                                                                                     LiteralValidator {                                                                                         lookup: LiteralLookup {                                                                                             expected_bool: None,                                                                                             expected_int: None,                                                                                             expected_str: Some(                                                                                                 {                                                                                                     "tangential_arc": 0,                                                                                                 },                                                                                             ),                                                                                             expected_py: None,                                                                                             values: [                                                                                                 Py(                                                                                                     0x00007fffe10a25b0,                                                                                                 ),                                                                                             ],                                                                                         },                                                                                         expected_repr: "'tangential_arc'",                                                                                         name: "literal['tangential_arc']",                                                                                     },                                                                                 ),                                                                                 validate_default: false,                                                                                 copy_default: false,                                                                                 name: "default[literal['tangential_arc']]",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                 ],                                                                 model_name: "tangential_arc",                                                                 extra_behavior: Ignore,                                                                 extras_validator: None,                                                                 strict: false,                                                                 from_attributes: false,                                                                 loc_by_alias: true,                                                             },                                                         ),                                                         class: Py(                                                             0x0000555556e76310,                                                         ),                                                         post_init: None,                                                         frozen: false,                                                         custom_init: false,                                                         root_model: false,                                                         name: "tangential_arc",                                                     },                                                 ),                                                 None,                                             ),                                             (                                                 Model(                                                     ModelValidator {                                                         revalidate: Never,                                                         validator: ModelFields(                                                             ModelFieldsValidator {                                                                 fields: [                                                                     Field {                                                                         name: "angle_snap_increment",                                                                         lookup_key: Simple {                                                                             key: "angle_snap_increment",                                                                             py_key: Py(                                                                                 0x00007fffe10a3490,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "angle_snap_increment",                                                                                         Py(                                                                                             0x00007fffe10a3490,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007fffe10a3490,                                                                         ),                                                                         validator: WithDefault(                                                                             WithDefaultValidator {                                                                                 default: Default(                                                                                     Py(                                                                                         0x00007ffffff85420,                                                                                     ),                                                                                 ),                                                                                 on_error: Raise,                                                                                 validator: Nullable(                                                                                     NullableValidator {                                                                                         validator: DefinitionRef(                                                                                             DefinitionRefValidator {                                                                                                 definition: "kittycad.models.angle.Angle:93825014170752",                                                                                             },                                                                                         ),                                                                                         name: "nullable[Angle]",                                                                                     },                                                                                 ),                                                                                 validate_default: false,                                                                                 copy_default: false,                                                                                 name: "default[nullable[Angle]]",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                     Field {                                                                         name: "to",                                                                         lookup_key: Simple {                                                                             key: "to",                                                                             py_key: Py(                                                                                 0x00007fffff70e470,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "to",                                                                                         Py(                                                                                             0x00007fffff70e470,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007fffff70e470,                                                                         ),                                                                         validator: DefinitionRef(                                                                             DefinitionRefValidator {                                                                                 definition: "kittycad.models.point3d.Point3d:93825014233264",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                     Field {                                                                         name: "type",                                                                         lookup_key: Simple {                                                                             key: "type",                                                                             py_key: Py(                                                                                 0x00007fffff8ebef0,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "type",                                                                                         Py(                                                                                             0x00007fffff8ebef0,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007fffff8ebef0,                                                                         ),                                                                         validator: WithDefault(                                                                             WithDefaultValidator {                                                                                 default: Default(                                                                                     Py(                                                                                         0x00007fffe10a33f0,                                                                                     ),                                                                                 ),                                                                                 on_error: Raise,                                                                                 validator: Literal(                                                                                     LiteralValidator {                                                                                         lookup: LiteralLookup {                                                                                             expected_bool: None,                                                                                             expected_int: None,                                                                                             expected_str: Some(                                                                                                 {                                                                                                     "tangential_arc_to": 0,                                                                                                 },                                                                                             ),                                                                                             expected_py: None,                                                                                             values: [                                                                                                 Py(                                                                                                     0x00007fffe10a33f0,                                                                                                 ),                                                                                             ],                                                                                         },                                                                                         expected_repr: "'tangential_arc_to'",                                                                                         name: "literal['tangential_arc_to']",                                                                                     },                                                                                 ),                                                                                 validate_default: false,                                                                                 copy_default: false,                                                                                 name: "default[literal['tangential_arc_to']]",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                 ],                                                                 model_name: "tangential_arc_to",                                                                 extra_behavior: Ignore,                                                                 extras_validator: None,                                                                 strict: false,                                                                 from_attributes: false,                                                                 loc_by_alias: true,                                                             },                                                         ),                                                         class: Py(                                                             0x0000555556e7b190,                                                         ),                                                         post_init: None,                                                         frozen: false,                                                         custom_init: false,                                                         root_model: false,                                                         name: "tangential_arc_to",                                                     },                                                 ),                                                 None,                                             ),                                         ],                                         custom_error: None,                                         strict: false,                                         name: "union[line,arc,bezier,tangential_arc,tangential_arc_to]",                                     },                                 ),                                 class: Py(                                     0x0000555556e7bbd0,                                 ),                                 post_init: None,                                 frozen: false,                                 custom_init: false,                                 root_model: true,                                 name: "RootModel[Annotated[Union[kittycad.models.path_segment.line, kittycad.models.path_segment.arc, kittycad.models.path_segment.bezier, kittycad.models.path_segment.tangential_arc, kittycad.models.path_segment.tangential_arc_to], FieldInfo(annotation=NoneType, required=True, discriminator='type')]]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe1de3fb0,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "extend_path": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe1de3fb0,                                                 ),                                             ],                                         },                                         expected_repr: "'extend_path'",                                         name: "literal['extend_path']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['extend_path']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "extend_path",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556e97b30,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "extend_path",     }, ), definitions=[Model(ModelValidator { revalidate: Never, validator: ModelFields(ModelFieldsValidator { fields: [Field { name: "x", lookup_key: Simple { key: "x", py_key: Py(0x7fffff8fe870), path: LookupPath([S("x", Py(0x7fffff8fe870))]) }, name_py: Py(0x7fffff8fe870), validator: Float(FloatValidator { strict: false, allow_inf_nan: true }), frozen: false }, Field { name: "y", lookup_key: Simple { key: "y", py_key: Py(0x7fffff72a730), path: LookupPath([S("y", Py(0x7fffff72a730))]) }, name_py: Py(0x7fffff72a730), validator: Float(FloatValidator { strict: false, allow_inf_nan: true }), frozen: false }, Field { name: "z", lookup_key: Simple { key: "z", py_key: Py(0x7fffff72a770), path: LookupPath([S("z", Py(0x7fffff72a770))]) }, name_py: Py(0x7fffff72a770), validator: Float(FloatValidator { strict: false, allow_inf_nan: true }), frozen: false }], model_name: "Point3d", extra_behavior: Ignore, extras_validator: None, strict: false, from_attributes: false, loc_by_alias: true }), class: Py(0x555556a4f8b0), post_init: None, frozen: false, custom_init: false, root_model: false, name: "Point3d" }), Model(ModelValidator { revalidate: Never, validator: ModelFields(ModelFieldsValidator { fields: [Field { name: "unit", lookup_key: Simple { key: "unit", py_key: Py(0x7ffffe916ab0), path: LookupPath([S("unit", Py(0x7ffffe916ab0))]) }, name_py: Py(0x7ffffe916ab0), validator: DefinitionRef(DefinitionRefValidator { definition: "kittycad.models.unit_angle.UnitAngle:93825014169808" }), frozen: false }, Field { name: "value", lookup_key: Simple { key: "value", py_key: Py(0x7fffff94de30), path: LookupPath([S("value", Py(0x7fffff94de30))]) }, name_py: Py(0x7fffff94de30), validator: Float(FloatValidator { strict: false, allow_inf_nan: true }), frozen: false }], model_name: "Angle", extra_behavior: Ignore, extras_validator: None, strict: false, from_attributes: false, loc_by_alias: true }), class: Py(0x555556a40480), post_init: None, frozen: false, custom_init: false, root_model: false, name: "Angle" }), LaxOrStrict(LaxOrStrictValidator { strict: false, lax_validator: Chain(ChainValidator { steps: [Str(StrValidator { strict: false, coerce_numbers_to_str: false }), FunctionPlain(FunctionPlainValidator { func: Py(0x7fffe12e4d30), config: Py(0x7fffe104a080), name: "function-plain[to_enum()]", field_name: None, info_arg: false })], name: "chain[str,function-plain[to_enum()]]" }), strict_validator: JsonOrPython(JsonOrPython { json: FunctionAfter(FunctionAfterValidator { validator: Str(StrValidator { strict: false, coerce_numbers_to_str: false }), func: Py(0x7fffe12e4d30), config: Py(0x7fffe104a080), name: "function-after[to_enum(), str]", field_name: None, info_arg: false }), python: IsInstance(IsInstanceValidator { class: Py(0x555556a400d0), class_repr: "UnitAngle", name: "is-instance[UnitAngle]" }), name: "json-or-python[json=function-after[to_enum(), str],python=is-instance[UnitAngle]]" }), name: "lax-or-strict[lax=chain[str,function-plain[to_enum()]],strict=json-or-python[json=function-after[to_enum(), str],python=is-instance[UnitAngle]]]" })])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, path: kittycad.models.modeling_cmd_id.ModelingCmdId, segment: pydantic.root_model.RootModel[Annotated[Union[kittycad.models.path_segment.line, kittycad.models.path_segment.arc, kittycad.models.path_segment.bezier, kittycad.models.path_segment.tangential_arc, kittycad.models.path_segment.tangential_arc_to], FieldInfo(annotation=NoneType, required=True, discriminator='type')]], type: Literal['extend_path'] = 'extend_path') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'path': FieldInfo(annotation=ModelingCmdId, required=True), 'segment': FieldInfo(annotation=RootModel[Annotated[Union[kittycad.models.path_segment.line, kittycad.models.path_segment.arc, kittycad.models.path_segment.bezier, kittycad.models.path_segment.tangential_arc, kittycad.models.path_segment.tangential_arc_to], FieldInfo(annotation=NoneType, required=True, discriminator='type')]], required=True), 'type': FieldInfo(annotation=Literal['extend_path'], required=False, default='extend_path')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

path: ModelingCmdId[source]
classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

segment: tangential_arc_to], FieldInfo(annotation=NoneType, required=True, discriminator='type')]][source]
type: Literal['extend_path'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.extrude(**data)[source][source]

Extrude a 2D solid.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'cap': <class 'bool'>, 'distance': <class 'float'>, 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'target': <class 'kittycad.models.modeling_cmd_id.ModelingCmdId'>, 'type': typing.Literal['extrude']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'cap': FieldInfo(annotation=bool, required=True), 'distance': FieldInfo(annotation=float, required=True), 'target': FieldInfo(annotation=ModelingCmdId, required=True), 'type': FieldInfo(annotation=Literal['extrude'], required=False, default='extrude')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.extrude'>, 'config': {'title': 'extrude'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.extrude'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.extrude'>>]}, 'ref': 'kittycad.models.modeling_cmd.extrude:93825018739072', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'cap': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'bool'}, 'type': 'model-field'}, 'distance': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}, 'target': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'function': {'function': <class 'kittycad.models.modeling_cmd_id.ModelingCmdId'>, 'type': 'no-info'}, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'function-after'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'extrude', 'schema': {'expected': ['extrude'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'extrude', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556e9b980,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "cap": SerField {                         key_py: Py(                             0x00007ffffdf9f6f0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Bool(                                 BoolSerializer,                             ),                         ),                         required: true,                     },                     "target": SerField {                         key_py: Py(                             0x00007fffff8f95f0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Str(                                 StrSerializer,                             ),                         ),                         required: true,                     },                     "distance": SerField {                         key_py: Py(                             0x00007ffffe7a7070,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Float(                                 FloatSerializer {                                     inf_nan_mode: Null,                                 },                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe10cf870,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "extrude",                                             },                                             expected_py: None,                                             name: "literal['extrude']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 4,             },         ),         has_extra: false,         root_model: false,         name: "extrude",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="extrude", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "cap",                         lookup_key: Simple {                             key: "cap",                             py_key: Py(                                 0x00007ffffdf9f6f0,                             ),                             path: LookupPath(                                 [                                     S(                                         "cap",                                         Py(                                             0x00007ffffdf9f6f0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007ffffdf9f6f0,                         ),                         validator: Bool(                             BoolValidator {                                 strict: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "distance",                         lookup_key: Simple {                             key: "distance",                             py_key: Py(                                 0x00007ffffe7a7070,                             ),                             path: LookupPath(                                 [                                     S(                                         "distance",                                         Py(                                             0x00007ffffe7a7070,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007ffffe7a7070,                         ),                         validator: Float(                             FloatValidator {                                 strict: false,                                 allow_inf_nan: true,                             },                         ),                         frozen: false,                     },                     Field {                         name: "target",                         lookup_key: Simple {                             key: "target",                             py_key: Py(                                 0x00007fffff8f95f0,                             ),                             path: LookupPath(                                 [                                     S(                                         "target",                                         Py(                                             0x00007fffff8f95f0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8f95f0,                         ),                         validator: FunctionAfter(                             FunctionAfterValidator {                                 validator: Str(                                     StrValidator {                                         strict: false,                                         coerce_numbers_to_str: false,                                     },                                 ),                                 func: Py(                                     0x0000555556ea9850,                                 ),                                 config: Py(                                     0x00007fffe105fa80,                                 ),                                 name: "function-after[ModelingCmdId(), str]",                                 field_name: None,                                 info_arg: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe10cf870,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "extrude": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe10cf870,                                                 ),                                             ],                                         },                                         expected_repr: "'extrude'",                                         name: "literal['extrude']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['extrude']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "extrude",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556e9b980,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "extrude",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, cap: bool, distance: float, target: kittycad.models.modeling_cmd_id.ModelingCmdId, type: Literal['extrude'] = 'extrude') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

cap: bool[source]
classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

distance: float[source]
classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'cap': FieldInfo(annotation=bool, required=True), 'distance': FieldInfo(annotation=float, required=True), 'target': FieldInfo(annotation=ModelingCmdId, required=True), 'type': FieldInfo(annotation=Literal['extrude'], required=False, default='extrude')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

target: ModelingCmdId[source]
type: Literal['extrude'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.get_entity_type(**data)[source][source]

What type of entity is this?

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'entity_id': <class 'str'>, 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'type': typing.Literal['get_entity_type']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'entity_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['get_entity_type'], required=False, default='get_entity_type')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.get_entity_type'>, 'config': {'title': 'get_entity_type'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.get_entity_type'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.get_entity_type'>>]}, 'ref': 'kittycad.models.modeling_cmd.get_entity_type:93825019501552', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'entity_id': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'get_entity_type', 'schema': {'expected': ['get_entity_type'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'get_entity_type', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entities': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'new_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_bring_to_front': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_visible': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'update_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556f55bf0,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "entity_id": SerField {                         key_py: Py(                             0x00007fffe1186df0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Str(                                 StrSerializer,                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe1c7bab0,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "get_entity_type",                                             },                                             expected_py: None,                                             name: "literal['get_entity_type']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 2,             },         ),         has_extra: false,         root_model: false,         name: "get_entity_type",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="get_entity_type", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "entity_id",                         lookup_key: Simple {                             key: "entity_id",                             py_key: Py(                                 0x00007fffe1186df0,                             ),                             path: LookupPath(                                 [                                     S(                                         "entity_id",                                         Py(                                             0x00007fffe1186df0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe1186df0,                         ),                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe1c7bab0,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "get_entity_type": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe1c7bab0,                                                 ),                                             ],                                         },                                         expected_repr: "'get_entity_type'",                                         name: "literal['get_entity_type']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['get_entity_type']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "get_entity_type",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556f55bf0,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "get_entity_type",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, entity_id: str, type: Literal['get_entity_type'] = 'get_entity_type') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

entity_id: str[source]
classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'entity_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['get_entity_type'], required=False, default='get_entity_type')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['get_entity_type'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.get_sketch_mode_plane(**data)[source][source]

Get the plane of the sketch mode. This is useful for getting the normal of the plane after a user selects a plane.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'type': typing.Literal['get_sketch_mode_plane']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'type': FieldInfo(annotation=Literal['get_sketch_mode_plane'], required=False, default='get_sketch_mode_plane')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.get_sketch_mode_plane'>, 'config': {'title': 'get_sketch_mode_plane'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.get_sketch_mode_plane'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.get_sketch_mode_plane'>>]}, 'ref': 'kittycad.models.modeling_cmd.get_sketch_mode_plane:93825020208592', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'get_sketch_mode_plane', 'schema': {'expected': ['get_sketch_mode_plane'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'get_sketch_mode_plane', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'center_of_mass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_control_points': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_end_points': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'density': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_fade': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_set_opacity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'get_entity_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'handle_mouse_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'handle_mouse_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'handle_mouse_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entities': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'import_files': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_axes_gizmo': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_plane': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_click': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'new_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_bring_to_front': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_visible': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_curve_uuids_for_vertices': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_info': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_vertex_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'plane_intersect_and_project': <pydantic._internal._model_construction._PydanticWeakRef object>, 'plane_set_color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'reconfigure_stream': <pydantic._internal._model_construction._PydanticWeakRef object>, 'remove_scene_objects': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'send_object': <pydantic._internal._model_construction._PydanticWeakRef object>, 'set_tool': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_disable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_enable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid2d_add_hole': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_edge_faces': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_opposite_edges': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_next_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_opposite_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_prev_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'surface_area': <pydantic._internal._model_construction._PydanticWeakRef object>, 'take_snapshot': <pydantic._internal._model_construction._PydanticWeakRef object>, 'update_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'volume': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x00005555570025d0,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe1c91f30,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "get_sketch_mode_plane",                                             },                                             expected_py: None,                                             name: "literal['get_sketch_mode_plane']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 1,             },         ),         has_extra: false,         root_model: false,         name: "get_sketch_mode_plane",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="get_sketch_mode_plane", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe1c91f30,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "get_sketch_mode_plane": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe1c91f30,                                                 ),                                             ],                                         },                                         expected_repr: "'get_sketch_mode_plane'",                                         name: "literal['get_sketch_mode_plane']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['get_sketch_mode_plane']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "get_sketch_mode_plane",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x00005555570025d0,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "get_sketch_mode_plane",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, type: Literal['get_sketch_mode_plane'] = 'get_sketch_mode_plane') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'type': FieldInfo(annotation=Literal['get_sketch_mode_plane'], required=False, default='get_sketch_mode_plane')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['get_sketch_mode_plane'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.handle_mouse_drag_end(**data)[source][source]

Stop dragging mouse.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'type': typing.Literal['handle_mouse_drag_end'], 'window': <class 'kittycad.models.point2d.Point2d'>}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'type': FieldInfo(annotation=Literal['handle_mouse_drag_end'], required=False, default='handle_mouse_drag_end'), 'window': FieldInfo(annotation=Point2d, required=True)}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.handle_mouse_drag_end'>, 'config': {'title': 'handle_mouse_drag_end'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.handle_mouse_drag_end'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.handle_mouse_drag_end'>>]}, 'ref': 'kittycad.models.modeling_cmd.handle_mouse_drag_end:93825019882704', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'handle_mouse_drag_end', 'schema': {'expected': ['handle_mouse_drag_end'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}, 'window': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'cls': <class 'kittycad.models.point2d.Point2d'>, 'config': {'title': 'Point2d'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.point2d.Point2d'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.point2d.Point2d'>>]}, 'ref': 'kittycad.models.point2d.Point2d:93825018798944', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'x': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}, 'y': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}}, 'model_name': 'Point2d', 'type': 'model-fields'}, 'type': 'model'}, 'type': 'model-field'}}, 'model_name': 'handle_mouse_drag_end', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_control_points': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_fade': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_set_opacity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'get_entity_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'handle_mouse_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'handle_mouse_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entities': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_axes_gizmo': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_plane': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_click': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'new_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_bring_to_front': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_visible': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_curve_uuids_for_vertices': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_info': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_vertex_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'plane_set_color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'send_object': <pydantic._internal._model_construction._PydanticWeakRef object>, 'set_tool': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_disable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_enable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid2d_add_hole': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_edge_faces': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_opposite_edges': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_next_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_opposite_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_prev_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'take_snapshot': <pydantic._internal._model_construction._PydanticWeakRef object>, 'update_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556fb2cd0,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe114b2b0,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "handle_mouse_drag_end",                                             },                                             expected_py: None,                                             name: "literal['handle_mouse_drag_end']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                     "window": SerField {                         key_py: Py(                             0x00007ffffdca04f0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Model(                                 ModelSerializer {                                     class: Py(                                         0x0000555556eaa360,                                     ),                                     serializer: Fields(                                         GeneralFieldsSerializer {                                             fields: {                                                 "x": SerField {                                                     key_py: Py(                                                         0x00007fffff8fe870,                                                     ),                                                     alias: None,                                                     alias_py: None,                                                     serializer: Some(                                                         Float(                                                             FloatSerializer {                                                                 inf_nan_mode: Null,                                                             },                                                         ),                                                     ),                                                     required: true,                                                 },                                                 "y": SerField {                                                     key_py: Py(                                                         0x00007fffff72a730,                                                     ),                                                     alias: None,                                                     alias_py: None,                                                     serializer: Some(                                                         Float(                                                             FloatSerializer {                                                                 inf_nan_mode: Null,                                                             },                                                         ),                                                     ),                                                     required: true,                                                 },                                             },                                             computed_fields: Some(                                                 ComputedFields(                                                     [],                                                 ),                                             ),                                             mode: SimpleDict,                                             extra_serializer: None,                                             filter: SchemaFilter {                                                 include: None,                                                 exclude: None,                                             },                                             required_fields: 2,                                         },                                     ),                                     has_extra: false,                                     root_model: false,                                     name: "Point2d",                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 2,             },         ),         has_extra: false,         root_model: false,         name: "handle_mouse_drag_end",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="handle_mouse_drag_end", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe114b2b0,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "handle_mouse_drag_end": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe114b2b0,                                                 ),                                             ],                                         },                                         expected_repr: "'handle_mouse_drag_end'",                                         name: "literal['handle_mouse_drag_end']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['handle_mouse_drag_end']]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "window",                         lookup_key: Simple {                             key: "window",                             py_key: Py(                                 0x00007ffffdca04f0,                             ),                             path: LookupPath(                                 [                                     S(                                         "window",                                         Py(                                             0x00007ffffdca04f0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007ffffdca04f0,                         ),                         validator: Model(                             ModelValidator {                                 revalidate: Never,                                 validator: ModelFields(                                     ModelFieldsValidator {                                         fields: [                                             Field {                                                 name: "x",                                                 lookup_key: Simple {                                                     key: "x",                                                     py_key: Py(                                                         0x00007fffff8fe870,                                                     ),                                                     path: LookupPath(                                                         [                                                             S(                                                                 "x",                                                                 Py(                                                                     0x00007fffff8fe870,                                                                 ),                                                             ),                                                         ],                                                     ),                                                 },                                                 name_py: Py(                                                     0x00007fffff8fe870,                                                 ),                                                 validator: Float(                                                     FloatValidator {                                                         strict: false,                                                         allow_inf_nan: true,                                                     },                                                 ),                                                 frozen: false,                                             },                                             Field {                                                 name: "y",                                                 lookup_key: Simple {                                                     key: "y",                                                     py_key: Py(                                                         0x00007fffff72a730,                                                     ),                                                     path: LookupPath(                                                         [                                                             S(                                                                 "y",                                                                 Py(                                                                     0x00007fffff72a730,                                                                 ),                                                             ),                                                         ],                                                     ),                                                 },                                                 name_py: Py(                                                     0x00007fffff72a730,                                                 ),                                                 validator: Float(                                                     FloatValidator {                                                         strict: false,                                                         allow_inf_nan: true,                                                     },                                                 ),                                                 frozen: false,                                             },                                         ],                                         model_name: "Point2d",                                         extra_behavior: Ignore,                                         extras_validator: None,                                         strict: false,                                         from_attributes: false,                                         loc_by_alias: true,                                     },                                 ),                                 class: Py(                                     0x0000555556eaa360,                                 ),                                 post_init: None,                                 frozen: false,                                 custom_init: false,                                 root_model: false,                                 name: "Point2d",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "handle_mouse_drag_end",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556fb2cd0,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "handle_mouse_drag_end",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, type: Literal['handle_mouse_drag_end'] = 'handle_mouse_drag_end', window: kittycad.models.point2d.Point2d) -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'type': FieldInfo(annotation=Literal['handle_mouse_drag_end'], required=False, default='handle_mouse_drag_end'), 'window': FieldInfo(annotation=Point2d, required=True)}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['handle_mouse_drag_end'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

window: Point2d[source]
class kittycad.models.modeling_cmd.handle_mouse_drag_move(**data)[source][source]

Continue dragging mouse.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'sequence': typing.Optional[int], 'type': typing.Literal['handle_mouse_drag_move'], 'window': <class 'kittycad.models.point2d.Point2d'>}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'sequence': FieldInfo(annotation=Union[int, NoneType], required=False), 'type': FieldInfo(annotation=Literal['handle_mouse_drag_move'], required=False, default='handle_mouse_drag_move'), 'window': FieldInfo(annotation=Point2d, required=True)}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.handle_mouse_drag_move'>, 'config': {'title': 'handle_mouse_drag_move'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.handle_mouse_drag_move'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.handle_mouse_drag_move'>>]}, 'ref': 'kittycad.models.modeling_cmd.handle_mouse_drag_move:93825019879248', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'sequence': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': None, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'int'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'handle_mouse_drag_move', 'schema': {'expected': ['handle_mouse_drag_move'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}, 'window': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'cls': <class 'kittycad.models.point2d.Point2d'>, 'config': {'title': 'Point2d'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.point2d.Point2d'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.point2d.Point2d'>>]}, 'ref': 'kittycad.models.point2d.Point2d:93825018798944', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'x': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}, 'y': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}}, 'model_name': 'Point2d', 'type': 'model-fields'}, 'type': 'model'}, 'type': 'model-field'}}, 'model_name': 'handle_mouse_drag_move', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_control_points': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_fade': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_set_opacity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'get_entity_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'handle_mouse_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entities': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_axes_gizmo': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_plane': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_click': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'new_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_bring_to_front': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_visible': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_curve_uuids_for_vertices': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_info': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_vertex_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'plane_set_color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'send_object': <pydantic._internal._model_construction._PydanticWeakRef object>, 'set_tool': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_disable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_enable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid2d_add_hole': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_edge_faces': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_opposite_edges': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_next_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_opposite_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_prev_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'take_snapshot': <pydantic._internal._model_construction._PydanticWeakRef object>, 'update_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556fb1f50,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "sequence": SerField {                         key_py: Py(                             0x00007fffff11ecf0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007ffffff85420,                                         ),                                     ),                                     serializer: Nullable(                                         NullableSerializer {                                             serializer: Int(                                                 IntSerializer,                                             ),                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                     "window": SerField {                         key_py: Py(                             0x00007ffffdca04f0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Model(                                 ModelSerializer {                                     class: Py(                                         0x0000555556eaa360,                                     ),                                     serializer: Fields(                                         GeneralFieldsSerializer {                                             fields: {                                                 "x": SerField {                                                     key_py: Py(                                                         0x00007fffff8fe870,                                                     ),                                                     alias: None,                                                     alias_py: None,                                                     serializer: Some(                                                         Float(                                                             FloatSerializer {                                                                 inf_nan_mode: Null,                                                             },                                                         ),                                                     ),                                                     required: true,                                                 },                                                 "y": SerField {                                                     key_py: Py(                                                         0x00007fffff72a730,                                                     ),                                                     alias: None,                                                     alias_py: None,                                                     serializer: Some(                                                         Float(                                                             FloatSerializer {                                                                 inf_nan_mode: Null,                                                             },                                                         ),                                                     ),                                                     required: true,                                                 },                                             },                                             computed_fields: Some(                                                 ComputedFields(                                                     [],                                                 ),                                             ),                                             mode: SimpleDict,                                             extra_serializer: None,                                             filter: SchemaFilter {                                                 include: None,                                                 exclude: None,                                             },                                             required_fields: 2,                                         },                                     ),                                     has_extra: false,                                     root_model: false,                                     name: "Point2d",                                 },                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe114b170,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "handle_mouse_drag_move",                                             },                                             expected_py: None,                                             name: "literal['handle_mouse_drag_move']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 3,             },         ),         has_extra: false,         root_model: false,         name: "handle_mouse_drag_move",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="handle_mouse_drag_move", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "sequence",                         lookup_key: Simple {                             key: "sequence",                             py_key: Py(                                 0x00007fffff11ecf0,                             ),                             path: LookupPath(                                 [                                     S(                                         "sequence",                                         Py(                                             0x00007fffff11ecf0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff11ecf0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007ffffff85420,                                     ),                                 ),                                 on_error: Raise,                                 validator: Nullable(                                     NullableValidator {                                         validator: Int(                                             IntValidator {                                                 strict: false,                                             },                                         ),                                         name: "nullable[int]",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[nullable[int]]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe114b170,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "handle_mouse_drag_move": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe114b170,                                                 ),                                             ],                                         },                                         expected_repr: "'handle_mouse_drag_move'",                                         name: "literal['handle_mouse_drag_move']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['handle_mouse_drag_move']]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "window",                         lookup_key: Simple {                             key: "window",                             py_key: Py(                                 0x00007ffffdca04f0,                             ),                             path: LookupPath(                                 [                                     S(                                         "window",                                         Py(                                             0x00007ffffdca04f0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007ffffdca04f0,                         ),                         validator: Model(                             ModelValidator {                                 revalidate: Never,                                 validator: ModelFields(                                     ModelFieldsValidator {                                         fields: [                                             Field {                                                 name: "x",                                                 lookup_key: Simple {                                                     key: "x",                                                     py_key: Py(                                                         0x00007fffff8fe870,                                                     ),                                                     path: LookupPath(                                                         [                                                             S(                                                                 "x",                                                                 Py(                                                                     0x00007fffff8fe870,                                                                 ),                                                             ),                                                         ],                                                     ),                                                 },                                                 name_py: Py(                                                     0x00007fffff8fe870,                                                 ),                                                 validator: Float(                                                     FloatValidator {                                                         strict: false,                                                         allow_inf_nan: true,                                                     },                                                 ),                                                 frozen: false,                                             },                                             Field {                                                 name: "y",                                                 lookup_key: Simple {                                                     key: "y",                                                     py_key: Py(                                                         0x00007fffff72a730,                                                     ),                                                     path: LookupPath(                                                         [                                                             S(                                                                 "y",                                                                 Py(                                                                     0x00007fffff72a730,                                                                 ),                                                             ),                                                         ],                                                     ),                                                 },                                                 name_py: Py(                                                     0x00007fffff72a730,                                                 ),                                                 validator: Float(                                                     FloatValidator {                                                         strict: false,                                                         allow_inf_nan: true,                                                     },                                                 ),                                                 frozen: false,                                             },                                         ],                                         model_name: "Point2d",                                         extra_behavior: Ignore,                                         extras_validator: None,                                         strict: false,                                         from_attributes: false,                                         loc_by_alias: true,                                     },                                 ),                                 class: Py(                                     0x0000555556eaa360,                                 ),                                 post_init: None,                                 frozen: false,                                 custom_init: false,                                 root_model: false,                                 name: "Point2d",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "handle_mouse_drag_move",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556fb1f50,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "handle_mouse_drag_move",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, sequence: Optional[int] = None, type: Literal['handle_mouse_drag_move'] = 'handle_mouse_drag_move', window: kittycad.models.point2d.Point2d) -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'sequence': FieldInfo(annotation=Union[int, NoneType], required=False), 'type': FieldInfo(annotation=Literal['handle_mouse_drag_move'], required=False, default='handle_mouse_drag_move'), 'window': FieldInfo(annotation=Point2d, required=True)}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

sequence: Optional[int][source]
type: Literal['handle_mouse_drag_move'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

window: Point2d[source]
class kittycad.models.modeling_cmd.handle_mouse_drag_start(**data)[source][source]

Start dragging mouse.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'type': typing.Literal['handle_mouse_drag_start'], 'window': <class 'kittycad.models.point2d.Point2d'>}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'type': FieldInfo(annotation=Literal['handle_mouse_drag_start'], required=False, default='handle_mouse_drag_start'), 'window': FieldInfo(annotation=Point2d, required=True)}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.handle_mouse_drag_start'>, 'config': {'title': 'handle_mouse_drag_start'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.handle_mouse_drag_start'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.handle_mouse_drag_start'>>]}, 'ref': 'kittycad.models.modeling_cmd.handle_mouse_drag_start:93825019877744', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'handle_mouse_drag_start', 'schema': {'expected': ['handle_mouse_drag_start'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}, 'window': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'cls': <class 'kittycad.models.point2d.Point2d'>, 'config': {'title': 'Point2d'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.point2d.Point2d'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.point2d.Point2d'>>]}, 'ref': 'kittycad.models.point2d.Point2d:93825018798944', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'x': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}, 'y': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}}, 'model_name': 'Point2d', 'type': 'model-fields'}, 'type': 'model'}, 'type': 'model-field'}}, 'model_name': 'handle_mouse_drag_start', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_control_points': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_fade': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_set_opacity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'get_entity_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entities': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_axes_gizmo': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_plane': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_click': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'new_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_bring_to_front': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_visible': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_curve_uuids_for_vertices': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_info': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_vertex_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'plane_set_color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'send_object': <pydantic._internal._model_construction._PydanticWeakRef object>, 'set_tool': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_disable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_enable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid2d_add_hole': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_edge_faces': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_opposite_edges': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_next_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_opposite_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_prev_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'take_snapshot': <pydantic._internal._model_construction._PydanticWeakRef object>, 'update_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556fb1970,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "window": SerField {                         key_py: Py(                             0x00007ffffdca04f0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Model(                                 ModelSerializer {                                     class: Py(                                         0x0000555556eaa360,                                     ),                                     serializer: Fields(                                         GeneralFieldsSerializer {                                             fields: {                                                 "x": SerField {                                                     key_py: Py(                                                         0x00007fffff8fe870,                                                     ),                                                     alias: None,                                                     alias_py: None,                                                     serializer: Some(                                                         Float(                                                             FloatSerializer {                                                                 inf_nan_mode: Null,                                                             },                                                         ),                                                     ),                                                     required: true,                                                 },                                                 "y": SerField {                                                     key_py: Py(                                                         0x00007fffff72a730,                                                     ),                                                     alias: None,                                                     alias_py: None,                                                     serializer: Some(                                                         Float(                                                             FloatSerializer {                                                                 inf_nan_mode: Null,                                                             },                                                         ),                                                     ),                                                     required: true,                                                 },                                             },                                             computed_fields: Some(                                                 ComputedFields(                                                     [],                                                 ),                                             ),                                             mode: SimpleDict,                                             extra_serializer: None,                                             filter: SchemaFilter {                                                 include: None,                                                 exclude: None,                                             },                                             required_fields: 2,                                         },                                     ),                                     has_extra: false,                                     root_model: false,                                     name: "Point2d",                                 },                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe114b0d0,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "handle_mouse_drag_start",                                             },                                             expected_py: None,                                             name: "literal['handle_mouse_drag_start']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 2,             },         ),         has_extra: false,         root_model: false,         name: "handle_mouse_drag_start",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="handle_mouse_drag_start", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe114b0d0,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "handle_mouse_drag_start": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe114b0d0,                                                 ),                                             ],                                         },                                         expected_repr: "'handle_mouse_drag_start'",                                         name: "literal['handle_mouse_drag_start']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['handle_mouse_drag_start']]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "window",                         lookup_key: Simple {                             key: "window",                             py_key: Py(                                 0x00007ffffdca04f0,                             ),                             path: LookupPath(                                 [                                     S(                                         "window",                                         Py(                                             0x00007ffffdca04f0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007ffffdca04f0,                         ),                         validator: Model(                             ModelValidator {                                 revalidate: Never,                                 validator: ModelFields(                                     ModelFieldsValidator {                                         fields: [                                             Field {                                                 name: "x",                                                 lookup_key: Simple {                                                     key: "x",                                                     py_key: Py(                                                         0x00007fffff8fe870,                                                     ),                                                     path: LookupPath(                                                         [                                                             S(                                                                 "x",                                                                 Py(                                                                     0x00007fffff8fe870,                                                                 ),                                                             ),                                                         ],                                                     ),                                                 },                                                 name_py: Py(                                                     0x00007fffff8fe870,                                                 ),                                                 validator: Float(                                                     FloatValidator {                                                         strict: false,                                                         allow_inf_nan: true,                                                     },                                                 ),                                                 frozen: false,                                             },                                             Field {                                                 name: "y",                                                 lookup_key: Simple {                                                     key: "y",                                                     py_key: Py(                                                         0x00007fffff72a730,                                                     ),                                                     path: LookupPath(                                                         [                                                             S(                                                                 "y",                                                                 Py(                                                                     0x00007fffff72a730,                                                                 ),                                                             ),                                                         ],                                                     ),                                                 },                                                 name_py: Py(                                                     0x00007fffff72a730,                                                 ),                                                 validator: Float(                                                     FloatValidator {                                                         strict: false,                                                         allow_inf_nan: true,                                                     },                                                 ),                                                 frozen: false,                                             },                                         ],                                         model_name: "Point2d",                                         extra_behavior: Ignore,                                         extras_validator: None,                                         strict: false,                                         from_attributes: false,                                         loc_by_alias: true,                                     },                                 ),                                 class: Py(                                     0x0000555556eaa360,                                 ),                                 post_init: None,                                 frozen: false,                                 custom_init: false,                                 root_model: false,                                 name: "Point2d",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "handle_mouse_drag_start",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556fb1970,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "handle_mouse_drag_start",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, type: Literal['handle_mouse_drag_start'] = 'handle_mouse_drag_start', window: kittycad.models.point2d.Point2d) -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'type': FieldInfo(annotation=Literal['handle_mouse_drag_start'], required=False, default='handle_mouse_drag_start'), 'window': FieldInfo(annotation=Point2d, required=True)}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['handle_mouse_drag_start'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

window: Point2d[source]
class kittycad.models.modeling_cmd.highlight_set_entities(**data)[source][source]

Changes the current highlighted entity to these entities.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'entities': typing.List[str], 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'type': typing.Literal['highlight_set_entities']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'entities': FieldInfo(annotation=List[str], required=True), 'type': FieldInfo(annotation=Literal['highlight_set_entities'], required=False, default='highlight_set_entities')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.highlight_set_entities'>, 'config': {'title': 'highlight_set_entities'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.highlight_set_entities'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.highlight_set_entities'>>]}, 'ref': 'kittycad.models.modeling_cmd.highlight_set_entities:93825019335696', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'entities': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'items_schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'strict': False, 'type': 'list'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'highlight_set_entities', 'schema': {'expected': ['highlight_set_entities'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'highlight_set_entities', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556f2d410,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "entities": SerField {                         key_py: Py(                             0x00007ffffe25daf0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             List(                                 ListSerializer {                                     item_serializer: Str(                                         StrSerializer,                                     ),                                     filter: SchemaFilter {                                         include: None,                                         exclude: None,                                     },                                     name: "list[str]",                                 },                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe113e2b0,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "highlight_set_entities",                                             },                                             expected_py: None,                                             name: "literal['highlight_set_entities']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 2,             },         ),         has_extra: false,         root_model: false,         name: "highlight_set_entities",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="highlight_set_entities", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "entities",                         lookup_key: Simple {                             key: "entities",                             py_key: Py(                                 0x00007ffffe25daf0,                             ),                             path: LookupPath(                                 [                                     S(                                         "entities",                                         Py(                                             0x00007ffffe25daf0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007ffffe25daf0,                         ),                         validator: List(                             ListValidator {                                 strict: false,                                 item_validator: Some(                                     Str(                                         StrValidator {                                             strict: false,                                             coerce_numbers_to_str: false,                                         },                                     ),                                 ),                                 min_length: None,                                 max_length: None,                                 name: OnceLock(                                     <uninit>,                                 ),                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe113e2b0,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "highlight_set_entities": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe113e2b0,                                                 ),                                             ],                                         },                                         expected_repr: "'highlight_set_entities'",                                         name: "literal['highlight_set_entities']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['highlight_set_entities']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "highlight_set_entities",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556f2d410,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "highlight_set_entities",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, entities: List[str], type: Literal['highlight_set_entities'] = 'highlight_set_entities') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

entities: List[str][source]
classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'entities': FieldInfo(annotation=List[str], required=True), 'type': FieldInfo(annotation=Literal['highlight_set_entities'], required=False, default='highlight_set_entities')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['highlight_set_entities'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.highlight_set_entity(**data)[source][source]

Changes the current highlighted entity to whichever one is at the given window coordinate. If there’s no entity at this location, clears the highlight.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'selected_at_window': <class 'kittycad.models.point2d.Point2d'>, 'sequence': typing.Optional[int], 'type': typing.Literal['highlight_set_entity']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'selected_at_window': FieldInfo(annotation=Point2d, required=True), 'sequence': FieldInfo(annotation=Union[int, NoneType], required=False), 'type': FieldInfo(annotation=Literal['highlight_set_entity'], required=False, default='highlight_set_entity')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.highlight_set_entity'>, 'config': {'title': 'highlight_set_entity'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.highlight_set_entity'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.highlight_set_entity'>>]}, 'ref': 'kittycad.models.modeling_cmd.highlight_set_entity:93825019326816', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'selected_at_window': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'cls': <class 'kittycad.models.point2d.Point2d'>, 'config': {'title': 'Point2d'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.point2d.Point2d'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.point2d.Point2d'>>]}, 'ref': 'kittycad.models.point2d.Point2d:93825018798944', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'x': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}, 'y': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}}, 'model_name': 'Point2d', 'type': 'model-fields'}, 'type': 'model'}, 'type': 'model-field'}, 'sequence': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': None, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'int'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'highlight_set_entity', 'schema': {'expected': ['highlight_set_entity'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'highlight_set_entity', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556f2b160,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe1c93030,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "highlight_set_entity",                                             },                                             expected_py: None,                                             name: "literal['highlight_set_entity']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                     "selected_at_window": SerField {                         key_py: Py(                             0x00007fffe113e030,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Model(                                 ModelSerializer {                                     class: Py(                                         0x0000555556eaa360,                                     ),                                     serializer: Fields(                                         GeneralFieldsSerializer {                                             fields: {                                                 "x": SerField {                                                     key_py: Py(                                                         0x00007fffff8fe870,                                                     ),                                                     alias: None,                                                     alias_py: None,                                                     serializer: Some(                                                         Float(                                                             FloatSerializer {                                                                 inf_nan_mode: Null,                                                             },                                                         ),                                                     ),                                                     required: true,                                                 },                                                 "y": SerField {                                                     key_py: Py(                                                         0x00007fffff72a730,                                                     ),                                                     alias: None,                                                     alias_py: None,                                                     serializer: Some(                                                         Float(                                                             FloatSerializer {                                                                 inf_nan_mode: Null,                                                             },                                                         ),                                                     ),                                                     required: true,                                                 },                                             },                                             computed_fields: Some(                                                 ComputedFields(                                                     [],                                                 ),                                             ),                                             mode: SimpleDict,                                             extra_serializer: None,                                             filter: SchemaFilter {                                                 include: None,                                                 exclude: None,                                             },                                             required_fields: 2,                                         },                                     ),                                     has_extra: false,                                     root_model: false,                                     name: "Point2d",                                 },                             ),                         ),                         required: true,                     },                     "sequence": SerField {                         key_py: Py(                             0x00007fffff11ecf0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007ffffff85420,                                         ),                                     ),                                     serializer: Nullable(                                         NullableSerializer {                                             serializer: Int(                                                 IntSerializer,                                             ),                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 3,             },         ),         has_extra: false,         root_model: false,         name: "highlight_set_entity",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="highlight_set_entity", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "selected_at_window",                         lookup_key: Simple {                             key: "selected_at_window",                             py_key: Py(                                 0x00007fffe113e030,                             ),                             path: LookupPath(                                 [                                     S(                                         "selected_at_window",                                         Py(                                             0x00007fffe113e030,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe113e030,                         ),                         validator: Model(                             ModelValidator {                                 revalidate: Never,                                 validator: ModelFields(                                     ModelFieldsValidator {                                         fields: [                                             Field {                                                 name: "x",                                                 lookup_key: Simple {                                                     key: "x",                                                     py_key: Py(                                                         0x00007fffff8fe870,                                                     ),                                                     path: LookupPath(                                                         [                                                             S(                                                                 "x",                                                                 Py(                                                                     0x00007fffff8fe870,                                                                 ),                                                             ),                                                         ],                                                     ),                                                 },                                                 name_py: Py(                                                     0x00007fffff8fe870,                                                 ),                                                 validator: Float(                                                     FloatValidator {                                                         strict: false,                                                         allow_inf_nan: true,                                                     },                                                 ),                                                 frozen: false,                                             },                                             Field {                                                 name: "y",                                                 lookup_key: Simple {                                                     key: "y",                                                     py_key: Py(                                                         0x00007fffff72a730,                                                     ),                                                     path: LookupPath(                                                         [                                                             S(                                                                 "y",                                                                 Py(                                                                     0x00007fffff72a730,                                                                 ),                                                             ),                                                         ],                                                     ),                                                 },                                                 name_py: Py(                                                     0x00007fffff72a730,                                                 ),                                                 validator: Float(                                                     FloatValidator {                                                         strict: false,                                                         allow_inf_nan: true,                                                     },                                                 ),                                                 frozen: false,                                             },                                         ],                                         model_name: "Point2d",                                         extra_behavior: Ignore,                                         extras_validator: None,                                         strict: false,                                         from_attributes: false,                                         loc_by_alias: true,                                     },                                 ),                                 class: Py(                                     0x0000555556eaa360,                                 ),                                 post_init: None,                                 frozen: false,                                 custom_init: false,                                 root_model: false,                                 name: "Point2d",                             },                         ),                         frozen: false,                     },                     Field {                         name: "sequence",                         lookup_key: Simple {                             key: "sequence",                             py_key: Py(                                 0x00007fffff11ecf0,                             ),                             path: LookupPath(                                 [                                     S(                                         "sequence",                                         Py(                                             0x00007fffff11ecf0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff11ecf0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007ffffff85420,                                     ),                                 ),                                 on_error: Raise,                                 validator: Nullable(                                     NullableValidator {                                         validator: Int(                                             IntValidator {                                                 strict: false,                                             },                                         ),                                         name: "nullable[int]",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[nullable[int]]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe1c93030,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "highlight_set_entity": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe1c93030,                                                 ),                                             ],                                         },                                         expected_repr: "'highlight_set_entity'",                                         name: "literal['highlight_set_entity']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['highlight_set_entity']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "highlight_set_entity",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556f2b160,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "highlight_set_entity",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, selected_at_window: kittycad.models.point2d.Point2d, sequence: Optional[int] = None, type: Literal['highlight_set_entity'] = 'highlight_set_entity') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'selected_at_window': FieldInfo(annotation=Point2d, required=True), 'sequence': FieldInfo(annotation=Union[int, NoneType], required=False), 'type': FieldInfo(annotation=Literal['highlight_set_entity'], required=False, default='highlight_set_entity')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

selected_at_window: Point2d[source]
sequence: Optional[int][source]
type: Literal['highlight_set_entity'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.import_files(**data)[source][source]

Import files to the current model.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'files': typing.List[kittycad.models.import_file.ImportFile], 'format': <class 'pydantic.root_model.RootModel[Annotated[Union[kittycad.models.input_format.fbx, kittycad.models.input_format.gltf, kittycad.models.input_format.obj, kittycad.models.input_format.ply, kittycad.models.input_format.sldprt, kittycad.models.input_format.step, kittycad.models.input_format.stl], FieldInfo(annotation=NoneType, required=True, discriminator='type')]]'>, 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'type': typing.Literal['import_files']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'files': FieldInfo(annotation=List[kittycad.models.import_file.ImportFile], required=True), 'format': FieldInfo(annotation=RootModel[Annotated[Union[kittycad.models.input_format.fbx, kittycad.models.input_format.gltf, kittycad.models.input_format.obj, kittycad.models.input_format.ply, kittycad.models.input_format.sldprt, kittycad.models.input_format.step, kittycad.models.input_format.stl], FieldInfo(annotation=NoneType, required=True, discriminator='type')]], required=True), 'type': FieldInfo(annotation=Literal['import_files'], required=False, default='import_files')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'definitions': [{'type': 'model', 'cls': <class 'kittycad.models.axis_direction_pair.AxisDirectionPair'>, 'schema': {'type': 'model-fields', 'fields': {'axis': {'type': 'model-field', 'schema': {'type': 'definition-ref', 'schema_ref': 'kittycad.models.axis.Axis:93825014567168'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'direction': {'type': 'model-field', 'schema': {'type': 'definition-ref', 'schema_ref': 'kittycad.models.direction.Direction:93825014568112'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}}, 'model_name': 'AxisDirectionPair', 'computed_fields': []}, 'custom_init': False, 'root_model': False, 'config': {'title': 'AxisDirectionPair'}, 'ref': 'kittycad.models.axis_direction_pair.AxisDirectionPair:93825014569648', 'metadata': {'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.axis_direction_pair.AxisDirectionPair'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.axis_direction_pair.AxisDirectionPair'>>], 'pydantic_js_annotation_functions': [], 'pydantic.internal.needs_apply_discriminated_union': False}}, {'type': 'lax-or-strict', 'lax_schema': {'type': 'chain', 'steps': [{'type': 'str'}, {'type': 'function-plain', 'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}}]}, 'strict_schema': {'type': 'json-or-python', 'json_schema': {'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}, 'schema': {'type': 'str'}, 'type': 'function-after'}, 'python_schema': {'type': 'is-instance', 'cls': <enum 'Axis'>}}, 'ref': 'kittycad.models.axis.Axis:93825014567168', 'metadata': {'pydantic_js_functions': [<function get_enum_core_schema.<locals>.get_json_schema>], 'pydantic.internal.needs_apply_discriminated_union': False}}, {'type': 'lax-or-strict', 'lax_schema': {'type': 'chain', 'steps': [{'type': 'str'}, {'type': 'function-plain', 'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}}]}, 'strict_schema': {'type': 'json-or-python', 'json_schema': {'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}, 'schema': {'type': 'str'}, 'type': 'function-after'}, 'python_schema': {'type': 'is-instance', 'cls': <enum 'Direction'>}}, 'ref': 'kittycad.models.direction.Direction:93825014568112', 'metadata': {'pydantic_js_functions': [<function get_enum_core_schema.<locals>.get_json_schema>], 'pydantic.internal.needs_apply_discriminated_union': False}}, {'type': 'model', 'cls': <class 'kittycad.models.system.System'>, 'schema': {'type': 'model-fields', 'fields': {'forward': {'type': 'model-field', 'schema': {'type': 'definition-ref', 'schema_ref': 'kittycad.models.axis_direction_pair.AxisDirectionPair:93825014569648'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'up': {'type': 'model-field', 'schema': {'type': 'definition-ref', 'schema_ref': 'kittycad.models.axis_direction_pair.AxisDirectionPair:93825014569648'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}}, 'model_name': 'System', 'computed_fields': []}, 'custom_init': False, 'root_model': False, 'config': {'title': 'System'}, 'ref': 'kittycad.models.system.System:93825014588992', 'metadata': {'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.system.System'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.system.System'>>], 'pydantic_js_annotation_functions': [], 'pydantic.internal.needs_apply_discriminated_union': False}}, {'type': 'lax-or-strict', 'lax_schema': {'type': 'chain', 'steps': [{'type': 'str'}, {'type': 'function-plain', 'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}}]}, 'strict_schema': {'type': 'json-or-python', 'json_schema': {'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}, 'schema': {'type': 'str'}, 'type': 'function-after'}, 'python_schema': {'type': 'is-instance', 'cls': <enum 'UnitLength'>}}, 'ref': 'kittycad.models.unit_length.UnitLength:93825014613552', 'metadata': {'pydantic_js_functions': [<function get_enum_core_schema.<locals>.get_json_schema>], 'pydantic.internal.needs_apply_discriminated_union': False}}], 'schema': {'cls': <class 'kittycad.models.modeling_cmd.import_files'>, 'config': {'title': 'import_files'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.import_files'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.import_files'>>]}, 'ref': 'kittycad.models.modeling_cmd.import_files:93825019993504', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'files': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'items_schema': {'cls': <class 'kittycad.models.import_file.ImportFile'>, 'config': {'title': 'ImportFile'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.import_file.ImportFile'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.import_file.ImportFile'>>]}, 'ref': 'kittycad.models.import_file.ImportFile:93825018071696', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'data': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'bytes'}, 'type': 'model-field'}, 'path': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'model-field'}}, 'model_name': 'ImportFile', 'type': 'model-fields'}, 'type': 'model'}, 'strict': False, 'type': 'list'}, 'type': 'model-field'}, 'format': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'cls': <class 'pydantic.root_model.RootModel[Annotated[Union[kittycad.models.input_format.fbx, kittycad.models.input_format.gltf, kittycad.models.input_format.obj, kittycad.models.input_format.ply, kittycad.models.input_format.sldprt, kittycad.models.input_format.step, kittycad.models.input_format.stl], FieldInfo(annotation=NoneType, required=True, discriminator='type')]]'>, 'config': {'title': "RootModel[Annotated[Union[kittycad.models.input_format.fbx, kittycad.models.input_format.gltf, kittycad.models.input_format.obj, kittycad.models.input_format.ply, kittycad.models.input_format.sldprt, kittycad.models.input_format.step, kittycad.models.input_format.stl], FieldInfo(annotation=NoneType, required=True, discriminator='type')]]"}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'pydantic.root_model.RootModel[Annotated[Union[kittycad.models.input_format.fbx, kittycad.models.input_format.gltf, kittycad.models.input_format.obj, kittycad.models.input_format.ply, kittycad.models.input_format.sldprt, kittycad.models.input_format.step, kittycad.models.input_format.stl], FieldInfo(annotation=NoneType, required=True, discriminator='type')]]'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'pydantic.root_model.RootModel[Annotated[Union[kittycad.models.input_format.fbx, kittycad.models.input_format.gltf, kittycad.models.input_format.obj, kittycad.models.input_format.ply, kittycad.models.input_format.sldprt, kittycad.models.input_format.step, kittycad.models.input_format.stl], FieldInfo(annotation=NoneType, required=True, discriminator='type')]]'>>]}, 'ref': "pydantic.root_model.RootModel:93825014829600[Annotated[Union[kittycad.models.input_format.fbx, kittycad.models.input_format.gltf, kittycad.models.input_format.obj, kittycad.models.input_format.ply, kittycad.models.input_format.sldprt, kittycad.models.input_format.step, kittycad.models.input_format.stl], FieldInfo(annotation=NoneType, required=True, discriminator='type')]:140736972009584]", 'root_model': True, 'schema': {'choices': [{'type': 'model', 'cls': <class 'kittycad.models.input_format.fbx'>, 'schema': {'type': 'model-fields', 'fields': {'type': {'type': 'model-field', 'schema': {'type': 'default', 'schema': {'type': 'literal', 'expected': ['fbx'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'default': 'fbx'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}}, 'model_name': 'fbx', 'computed_fields': []}, 'custom_init': False, 'root_model': False, 'config': {'title': 'fbx'}, 'ref': 'kittycad.models.input_format.fbx:93825014614496', 'metadata': {'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.input_format.fbx'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.input_format.fbx'>>], 'pydantic_js_annotation_functions': [], 'pydantic.internal.needs_apply_discriminated_union': False}}, {'type': 'model', 'cls': <class 'kittycad.models.input_format.gltf'>, 'schema': {'type': 'model-fields', 'fields': {'type': {'type': 'model-field', 'schema': {'type': 'default', 'schema': {'type': 'literal', 'expected': ['gltf'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'default': 'gltf'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}}, 'model_name': 'gltf', 'computed_fields': []}, 'custom_init': False, 'root_model': False, 'config': {'title': 'gltf'}, 'ref': 'kittycad.models.input_format.gltf:93825014623968', 'metadata': {'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.input_format.gltf'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.input_format.gltf'>>], 'pydantic_js_annotation_functions': [], 'pydantic.internal.needs_apply_discriminated_union': False}}, {'type': 'model', 'cls': <class 'kittycad.models.input_format.obj'>, 'schema': {'type': 'model-fields', 'fields': {'coords': {'type': 'model-field', 'schema': {'type': 'definition-ref', 'schema_ref': 'kittycad.models.system.System:93825014588992'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'type': {'type': 'model-field', 'schema': {'type': 'default', 'schema': {'type': 'literal', 'expected': ['obj'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'default': 'obj'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'units': {'type': 'model-field', 'schema': {'type': 'definition-ref', 'schema_ref': 'kittycad.models.unit_length.UnitLength:93825014613552'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}}, 'model_name': 'obj', 'computed_fields': []}, 'custom_init': False, 'root_model': False, 'config': {'title': 'obj'}, 'ref': 'kittycad.models.input_format.obj:93825014631616', 'metadata': {'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.input_format.obj'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.input_format.obj'>>], 'pydantic_js_annotation_functions': [], 'pydantic.internal.needs_apply_discriminated_union': False}}, {'type': 'model', 'cls': <class 'kittycad.models.input_format.ply'>, 'schema': {'type': 'model-fields', 'fields': {'coords': {'type': 'model-field', 'schema': {'type': 'definition-ref', 'schema_ref': 'kittycad.models.system.System:93825014588992'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'type': {'type': 'model-field', 'schema': {'type': 'default', 'schema': {'type': 'literal', 'expected': ['ply'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'default': 'ply'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'units': {'type': 'model-field', 'schema': {'type': 'definition-ref', 'schema_ref': 'kittycad.models.unit_length.UnitLength:93825014613552'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}}, 'model_name': 'ply', 'computed_fields': []}, 'custom_init': False, 'root_model': False, 'config': {'title': 'ply'}, 'ref': 'kittycad.models.input_format.ply:93825014670816', 'metadata': {'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.input_format.ply'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.input_format.ply'>>], 'pydantic_js_annotation_functions': [], 'pydantic.internal.needs_apply_discriminated_union': False}}, {'type': 'model', 'cls': <class 'kittycad.models.input_format.sldprt'>, 'schema': {'type': 'model-fields', 'fields': {'type': {'type': 'model-field', 'schema': {'type': 'default', 'schema': {'type': 'literal', 'expected': ['sldprt'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'default': 'sldprt'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}}, 'model_name': 'sldprt', 'computed_fields': []}, 'custom_init': False, 'root_model': False, 'config': {'title': 'sldprt'}, 'ref': 'kittycad.models.input_format.sldprt:93825014708240', 'metadata': {'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.input_format.sldprt'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.input_format.sldprt'>>], 'pydantic_js_annotation_functions': [], 'pydantic.internal.needs_apply_discriminated_union': False}}, {'type': 'model', 'cls': <class 'kittycad.models.input_format.step'>, 'schema': {'type': 'model-fields', 'fields': {'type': {'type': 'model-field', 'schema': {'type': 'default', 'schema': {'type': 'literal', 'expected': ['step'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'default': 'step'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}}, 'model_name': 'step', 'computed_fields': []}, 'custom_init': False, 'root_model': False, 'config': {'title': 'step'}, 'ref': 'kittycad.models.input_format.step:93825014715072', 'metadata': {'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.input_format.step'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.input_format.step'>>], 'pydantic_js_annotation_functions': [], 'pydantic.internal.needs_apply_discriminated_union': False}}, {'type': 'model', 'cls': <class 'kittycad.models.input_format.stl'>, 'schema': {'type': 'model-fields', 'fields': {'coords': {'type': 'model-field', 'schema': {'type': 'definition-ref', 'schema_ref': 'kittycad.models.system.System:93825014588992'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'type': {'type': 'model-field', 'schema': {'type': 'default', 'schema': {'type': 'literal', 'expected': ['stl'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'default': 'stl'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'units': {'type': 'model-field', 'schema': {'type': 'definition-ref', 'schema_ref': 'kittycad.models.unit_length.UnitLength:93825014613552'}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}}, 'model_name': 'stl', 'computed_fields': []}, 'custom_init': False, 'root_model': False, 'config': {'title': 'stl'}, 'ref': 'kittycad.models.input_format.stl:93825014722912', 'metadata': {'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.input_format.stl'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.input_format.stl'>>], 'pydantic_js_annotation_functions': [], 'pydantic.internal.needs_apply_discriminated_union': False}}], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': True, 'pydantic.internal.union_discriminator': 'type'}, 'type': 'union'}, 'type': 'model'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'import_files', 'schema': {'expected': ['import_files'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'import_files', 'type': 'model-fields'}, 'type': 'model'}, 'type': 'definitions'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_control_points': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_end_points': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_fade': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_set_opacity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'get_entity_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'handle_mouse_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'handle_mouse_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'handle_mouse_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entities': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_axes_gizmo': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_plane': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_click': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'new_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_bring_to_front': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_visible': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_curve_uuids_for_vertices': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_info': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_vertex_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'plane_intersect_and_project': <pydantic._internal._model_construction._PydanticWeakRef object>, 'plane_set_color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'reconfigure_stream': <pydantic._internal._model_construction._PydanticWeakRef object>, 'remove_scene_objects': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'send_object': <pydantic._internal._model_construction._PydanticWeakRef object>, 'set_tool': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_disable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_enable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid2d_add_hole': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_edge_faces': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_opposite_edges': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_next_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_opposite_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_prev_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'take_snapshot': <pydantic._internal._model_construction._PydanticWeakRef object>, 'update_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556fcdda0,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "files": SerField {                         key_py: Py(                             0x00007fffff8c9930,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             List(                                 ListSerializer {                                     item_serializer: Model(                                         ModelSerializer {                                             class: Py(                                                 0x0000555556df8a90,                                             ),                                             serializer: Fields(                                                 GeneralFieldsSerializer {                                                     fields: {                                                         "data": SerField {                                                             key_py: Py(                                                                 0x00007fffff90df30,                                                             ),                                                             alias: None,                                                             alias_py: None,                                                             serializer: Some(                                                                 Bytes(                                                                     BytesSerializer,                                                                 ),                                                             ),                                                             required: true,                                                         },                                                         "path": SerField {                                                             key_py: Py(                                                                 0x00007fffff952230,                                                             ),                                                             alias: None,                                                             alias_py: None,                                                             serializer: Some(                                                                 Str(                                                                     StrSerializer,                                                                 ),                                                             ),                                                             required: true,                                                         },                                                     },                                                     computed_fields: Some(                                                         ComputedFields(                                                             [],                                                         ),                                                     ),                                                     mode: SimpleDict,                                                     extra_serializer: None,                                                     filter: SchemaFilter {                                                         include: None,                                                         exclude: None,                                                     },                                                     required_fields: 2,                                                 },                                             ),                                             has_extra: false,                                             root_model: false,                                             name: "ImportFile",                                         },                                     ),                                     filter: SchemaFilter {                                         include: None,                                         exclude: None,                                     },                                     name: "list[ImportFile]",                                 },                             ),                         ),                         required: true,                     },                     "format": SerField {                         key_py: Py(                             0x00007fffff932bf0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Model(                                 ModelSerializer {                                     class: Py(                                         0x0000555556ac7ba0,                                     ),                                     serializer: Union(                                         UnionSerializer {                                             choices: [                                                 Model(                                                     ModelSerializer {                                                         class: Py(                                                             0x0000555556aac9e0,                                                         ),                                                         serializer: Fields(                                                             GeneralFieldsSerializer {                                                                 fields: {                                                                     "type": SerField {                                                                         key_py: Py(                                                                             0x00007fffff8ebef0,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             WithDefault(                                                                                 WithDefaultSerializer {                                                                                     default: Default(                                                                                         Py(                                                                                             0x00007fffe14d8f70,                                                                                         ),                                                                                     ),                                                                                     serializer: Literal(                                                                                         LiteralSerializer {                                                                                             expected_int: {},                                                                                             expected_str: {                                                                                                 "fbx",                                                                                             },                                                                                             expected_py: None,                                                                                             name: "literal['fbx']",                                                                                         },                                                                                     ),                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                 },                                                                 computed_fields: Some(                                                                     ComputedFields(                                                                         [],                                                                     ),                                                                 ),                                                                 mode: SimpleDict,                                                                 extra_serializer: None,                                                                 filter: SchemaFilter {                                                                     include: None,                                                                     exclude: None,                                                                 },                                                                 required_fields: 1,                                                             },                                                         ),                                                         has_extra: false,                                                         root_model: false,                                                         name: "fbx",                                                     },                                                 ),                                                 Model(                                                     ModelSerializer {                                                         class: Py(                                                             0x0000555556aaeee0,                                                         ),                                                         serializer: Fields(                                                             GeneralFieldsSerializer {                                                                 fields: {                                                                     "type": SerField {                                                                         key_py: Py(                                                                             0x00007fffff8ebef0,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             WithDefault(                                                                                 WithDefaultSerializer {                                                                                     default: Default(                                                                                         Py(                                                                                             0x00007fffe137ba30,                                                                                         ),                                                                                     ),                                                                                     serializer: Literal(                                                                                         LiteralSerializer {                                                                                             expected_int: {},                                                                                             expected_str: {                                                                                                 "gltf",                                                                                             },                                                                                             expected_py: None,                                                                                             name: "literal['gltf']",                                                                                         },                                                                                     ),                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                 },                                                                 computed_fields: Some(                                                                     ComputedFields(                                                                         [],                                                                     ),                                                                 ),                                                                 mode: SimpleDict,                                                                 extra_serializer: None,                                                                 filter: SchemaFilter {                                                                     include: None,                                                                     exclude: None,                                                                 },                                                                 required_fields: 1,                                                             },                                                         ),                                                         has_extra: false,                                                         root_model: false,                                                         name: "gltf",                                                     },                                                 ),                                                 Model(                                                     ModelSerializer {                                                         class: Py(                                                             0x0000555556ab0cc0,                                                         ),                                                         serializer: Fields(                                                             GeneralFieldsSerializer {                                                                 fields: {                                                                     "type": SerField {                                                                         key_py: Py(                                                                             0x00007fffff8ebef0,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             WithDefault(                                                                                 WithDefaultSerializer {                                                                                     default: Default(                                                                                         Py(                                                                                             0x00007fffff93a970,                                                                                         ),                                                                                     ),                                                                                     serializer: Literal(                                                                                         LiteralSerializer {                                                                                             expected_int: {},                                                                                             expected_str: {                                                                                                 "obj",                                                                                             },                                                                                             expected_py: None,                                                                                             name: "literal['obj']",                                                                                         },                                                                                     ),                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                     "units": SerField {                                                                         key_py: Py(                                                                             0x00007fffff2402b0,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             Recursive(                                                                                 DefinitionRefSerializer {                                                                                     definition: "kittycad.models.unit_length.UnitLength:93825014613552",                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                     "coords": SerField {                                                                         key_py: Py(                                                                             0x00007ffffcb0d8f0,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             Recursive(                                                                                 DefinitionRefSerializer {                                                                                     definition: "kittycad.models.system.System:93825014588992",                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                 },                                                                 computed_fields: Some(                                                                     ComputedFields(                                                                         [],                                                                     ),                                                                 ),                                                                 mode: SimpleDict,                                                                 extra_serializer: None,                                                                 filter: SchemaFilter {                                                                     include: None,                                                                     exclude: None,                                                                 },                                                                 required_fields: 3,                                                             },                                                         ),                                                         has_extra: false,                                                         root_model: false,                                                         name: "obj",                                                     },                                                 ),                                                 Model(                                                     ModelSerializer {                                                         class: Py(                                                             0x0000555556aba5e0,                                                         ),                                                         serializer: Fields(                                                             GeneralFieldsSerializer {                                                                 fields: {                                                                     "units": SerField {                                                                         key_py: Py(                                                                             0x00007fffff2402b0,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             Recursive(                                                                                 DefinitionRefSerializer {                                                                                     definition: "kittycad.models.unit_length.UnitLength:93825014613552",                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                     "coords": SerField {                                                                         key_py: Py(                                                                             0x00007ffffcb0d8f0,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             Recursive(                                                                                 DefinitionRefSerializer {                                                                                     definition: "kittycad.models.system.System:93825014588992",                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                     "type": SerField {                                                                         key_py: Py(                                                                             0x00007fffff8ebef0,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             WithDefault(                                                                                 WithDefaultSerializer {                                                                                     default: Default(                                                                                         Py(                                                                                             0x00007fffe137bab0,                                                                                         ),                                                                                     ),                                                                                     serializer: Literal(                                                                                         LiteralSerializer {                                                                                             expected_int: {},                                                                                             expected_str: {                                                                                                 "ply",                                                                                             },                                                                                             expected_py: None,                                                                                             name: "literal['ply']",                                                                                         },                                                                                     ),                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                 },                                                                 computed_fields: Some(                                                                     ComputedFields(                                                                         [],                                                                     ),                                                                 ),                                                                 mode: SimpleDict,                                                                 extra_serializer: None,                                                                 filter: SchemaFilter {                                                                     include: None,                                                                     exclude: None,                                                                 },                                                                 required_fields: 3,                                                             },                                                         ),                                                         has_extra: false,                                                         root_model: false,                                                         name: "ply",                                                     },                                                 ),                                                 Model(                                                     ModelSerializer {                                                         class: Py(                                                             0x0000555556ac3810,                                                         ),                                                         serializer: Fields(                                                             GeneralFieldsSerializer {                                                                 fields: {                                                                     "type": SerField {                                                                         key_py: Py(                                                                             0x00007fffff8ebef0,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             WithDefault(                                                                                 WithDefaultSerializer {                                                                                     default: Default(                                                                                         Py(                                                                                             0x00007fffe1ef6430,                                                                                         ),                                                                                     ),                                                                                     serializer: Literal(                                                                                         LiteralSerializer {                                                                                             expected_int: {},                                                                                             expected_str: {                                                                                                 "sldprt",                                                                                             },                                                                                             expected_py: None,                                                                                             name: "literal['sldprt']",                                                                                         },                                                                                     ),                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                 },                                                                 computed_fields: Some(                                                                     ComputedFields(                                                                         [],                                                                     ),                                                                 ),                                                                 mode: SimpleDict,                                                                 extra_serializer: None,                                                                 filter: SchemaFilter {                                                                     include: None,                                                                     exclude: None,                                                                 },                                                                 required_fields: 1,                                                             },                                                         ),                                                         has_extra: false,                                                         root_model: false,                                                         name: "sldprt",                                                     },                                                 ),                                                 Model(                                                     ModelSerializer {                                                         class: Py(                                                             0x0000555556ac52c0,                                                         ),                                                         serializer: Fields(                                                             GeneralFieldsSerializer {                                                                 fields: {                                                                     "type": SerField {                                                                         key_py: Py(                                                                             0x00007fffff8ebef0,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             WithDefault(                                                                                 WithDefaultSerializer {                                                                                     default: Default(                                                                                         Py(                                                                                             0x00007fffff929d30,                                                                                         ),                                                                                     ),                                                                                     serializer: Literal(                                                                                         LiteralSerializer {                                                                                             expected_int: {},                                                                                             expected_str: {                                                                                                 "step",                                                                                             },                                                                                             expected_py: None,                                                                                             name: "literal['step']",                                                                                         },                                                                                     ),                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                 },                                                                 computed_fields: Some(                                                                     ComputedFields(                                                                         [],                                                                     ),                                                                 ),                                                                 mode: SimpleDict,                                                                 extra_serializer: None,                                                                 filter: SchemaFilter {                                                                     include: None,                                                                     exclude: None,                                                                 },                                                                 required_fields: 1,                                                             },                                                         ),                                                         has_extra: false,                                                         root_model: false,                                                         name: "step",                                                     },                                                 ),                                                 Model(                                                     ModelSerializer {                                                         class: Py(                                                             0x0000555556ac7160,                                                         ),                                                         serializer: Fields(                                                             GeneralFieldsSerializer {                                                                 fields: {                                                                     "type": SerField {                                                                         key_py: Py(                                                                             0x00007fffff8ebef0,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             WithDefault(                                                                                 WithDefaultSerializer {                                                                                     default: Default(                                                                                         Py(                                                                                             0x00007fffe137bb30,                                                                                         ),                                                                                     ),                                                                                     serializer: Literal(                                                                                         LiteralSerializer {                                                                                             expected_int: {},                                                                                             expected_str: {                                                                                                 "stl",                                                                                             },                                                                                             expected_py: None,                                                                                             name: "literal['stl']",                                                                                         },                                                                                     ),                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                     "coords": SerField {                                                                         key_py: Py(                                                                             0x00007ffffcb0d8f0,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             Recursive(                                                                                 DefinitionRefSerializer {                                                                                     definition: "kittycad.models.system.System:93825014588992",                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                     "units": SerField {                                                                         key_py: Py(                                                                             0x00007fffff2402b0,                                                                         ),                                                                         alias: None,                                                                         alias_py: None,                                                                         serializer: Some(                                                                             Recursive(                                                                                 DefinitionRefSerializer {                                                                                     definition: "kittycad.models.unit_length.UnitLength:93825014613552",                                                                                 },                                                                             ),                                                                         ),                                                                         required: true,                                                                     },                                                                 },                                                                 computed_fields: Some(                                                                     ComputedFields(                                                                         [],                                                                     ),                                                                 ),                                                                 mode: SimpleDict,                                                                 extra_serializer: None,                                                                 filter: SchemaFilter {                                                                     include: None,                                                                     exclude: None,                                                                 },                                                                 required_fields: 3,                                                             },                                                         ),                                                         has_extra: false,                                                         root_model: false,                                                         name: "stl",                                                     },                                                 ),                                             ],                                             name: "Union[fbx, gltf, obj, ply, sldprt, step, stl]",                                         },                                     ),                                     has_extra: false,                                     root_model: true,                                     name: "RootModel[Annotated[Union[kittycad.models.input_format.fbx, kittycad.models.input_format.gltf, kittycad.models.input_format.obj, kittycad.models.input_format.ply, kittycad.models.input_format.sldprt, kittycad.models.input_format.step, kittycad.models.input_format.stl], FieldInfo(annotation=NoneType, required=True, discriminator='type')]]",                                 },                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe1c7b3b0,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "import_files",                                             },                                             expected_py: None,                                             name: "literal['import_files']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 3,             },         ),         has_extra: false,         root_model: false,         name: "import_files",     }, ), definitions=[JsonOrPython(JsonOrPythonSerializer { json: Str(StrSerializer), python: Any(AnySerializer), name: "json-or-python[json=str, python=any]" }), Model(ModelSerializer { class: Py(0x555556aa1ab0), serializer: Fields(GeneralFieldsSerializer { fields: {"axis": SerField { key_py: Py(0x7ffffcb74b30), alias: None, alias_py: None, serializer: Some(Recursive(DefinitionRefSerializer { definition: "kittycad.models.axis.Axis:93825014567168" })), required: true }, "direction": SerField { key_py: Py(0x7fffff77c7f0), alias: None, alias_py: None, serializer: Some(Recursive(DefinitionRefSerializer { definition: "kittycad.models.direction.Direction:93825014568112" })), required: true }}, computed_fields: Some(ComputedFields([])), mode: SimpleDict, extra_serializer: None, filter: SchemaFilter { include: None, exclude: None }, required_fields: 2 }), has_extra: false, root_model: false, name: "AxisDirectionPair" }), JsonOrPython(JsonOrPythonSerializer { json: Str(StrSerializer), python: Any(AnySerializer), name: "json-or-python[json=str, python=any]" }), Model(ModelSerializer { class: Py(0x555556aa6640), serializer: Fields(GeneralFieldsSerializer { fields: {"up": SerField { key_py: Py(0x7ffffdc55170), alias: None, alias_py: None, serializer: Some(Recursive(DefinitionRefSerializer { definition: "kittycad.models.axis_direction_pair.AxisDirectionPair:93825014569648" })), required: true }, "forward": SerField { key_py: Py(0x7ffffddd9770), alias: None, alias_py: None, serializer: Some(Recursive(DefinitionRefSerializer { definition: "kittycad.models.axis_direction_pair.AxisDirectionPair:93825014569648" })), required: true }}, computed_fields: Some(ComputedFields([])), mode: SimpleDict, extra_serializer: None, filter: SchemaFilter { include: None, exclude: None }, required_fields: 2 }), has_extra: false, root_model: false, name: "System" }), JsonOrPython(JsonOrPythonSerializer { json: Str(StrSerializer), python: Any(AnySerializer), name: "json-or-python[json=str, python=any]" })])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="import_files", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "files",                         lookup_key: Simple {                             key: "files",                             py_key: Py(                                 0x00007fffff8c9930,                             ),                             path: LookupPath(                                 [                                     S(                                         "files",                                         Py(                                             0x00007fffff8c9930,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8c9930,                         ),                         validator: List(                             ListValidator {                                 strict: false,                                 item_validator: Some(                                     Model(                                         ModelValidator {                                             revalidate: Never,                                             validator: ModelFields(                                                 ModelFieldsValidator {                                                     fields: [                                                         Field {                                                             name: "data",                                                             lookup_key: Simple {                                                                 key: "data",                                                                 py_key: Py(                                                                     0x00007fffff90df30,                                                                 ),                                                                 path: LookupPath(                                                                     [                                                                         S(                                                                             "data",                                                                             Py(                                                                                 0x00007fffff90df30,                                                                             ),                                                                         ),                                                                     ],                                                                 ),                                                             },                                                             name_py: Py(                                                                 0x00007fffff90df30,                                                             ),                                                             validator: Bytes(                                                                 BytesValidator {                                                                     strict: false,                                                                 },                                                             ),                                                             frozen: false,                                                         },                                                         Field {                                                             name: "path",                                                             lookup_key: Simple {                                                                 key: "path",                                                                 py_key: Py(                                                                     0x00007fffff952230,                                                                 ),                                                                 path: LookupPath(                                                                     [                                                                         S(                                                                             "path",                                                                             Py(                                                                                 0x00007fffff952230,                                                                             ),                                                                         ),                                                                     ],                                                                 ),                                                             },                                                             name_py: Py(                                                                 0x00007fffff952230,                                                             ),                                                             validator: Str(                                                                 StrValidator {                                                                     strict: false,                                                                     coerce_numbers_to_str: false,                                                                 },                                                             ),                                                             frozen: false,                                                         },                                                     ],                                                     model_name: "ImportFile",                                                     extra_behavior: Ignore,                                                     extras_validator: None,                                                     strict: false,                                                     from_attributes: false,                                                     loc_by_alias: true,                                                 },                                             ),                                             class: Py(                                                 0x0000555556df8a90,                                             ),                                             post_init: None,                                             frozen: false,                                             custom_init: false,                                             root_model: false,                                             name: "ImportFile",                                         },                                     ),                                 ),                                 min_length: None,                                 max_length: None,                                 name: OnceLock(                                     <uninit>,                                 ),                             },                         ),                         frozen: false,                     },                     Field {                         name: "format",                         lookup_key: Simple {                             key: "format",                             py_key: Py(                                 0x00007fffff932bf0,                             ),                             path: LookupPath(                                 [                                     S(                                         "format",                                         Py(                                             0x00007fffff932bf0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff932bf0,                         ),                         validator: Model(                             ModelValidator {                                 revalidate: Never,                                 validator: Union(                                     UnionValidator {                                         mode: Smart,                                         choices: [                                             (                                                 Model(                                                     ModelValidator {                                                         revalidate: Never,                                                         validator: ModelFields(                                                             ModelFieldsValidator {                                                                 fields: [                                                                     Field {                                                                         name: "type",                                                                         lookup_key: Simple {                                                                             key: "type",                                                                             py_key: Py(                                                                                 0x00007fffff8ebef0,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "type",                                                                                         Py(                                                                                             0x00007fffff8ebef0,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007fffff8ebef0,                                                                         ),                                                                         validator: WithDefault(                                                                             WithDefaultValidator {                                                                                 default: Default(                                                                                     Py(                                                                                         0x00007fffe14d8f70,                                                                                     ),                                                                                 ),                                                                                 on_error: Raise,                                                                                 validator: Literal(                                                                                     LiteralValidator {                                                                                         lookup: LiteralLookup {                                                                                             expected_bool: None,                                                                                             expected_int: None,                                                                                             expected_str: Some(                                                                                                 {                                                                                                     "fbx": 0,                                                                                                 },                                                                                             ),                                                                                             expected_py: None,                                                                                             values: [                                                                                                 Py(                                                                                                     0x00007fffe14d8f70,                                                                                                 ),                                                                                             ],                                                                                         },                                                                                         expected_repr: "'fbx'",                                                                                         name: "literal['fbx']",                                                                                     },                                                                                 ),                                                                                 validate_default: false,                                                                                 copy_default: false,                                                                                 name: "default[literal['fbx']]",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                 ],                                                                 model_name: "fbx",                                                                 extra_behavior: Ignore,                                                                 extras_validator: None,                                                                 strict: false,                                                                 from_attributes: false,                                                                 loc_by_alias: true,                                                             },                                                         ),                                                         class: Py(                                                             0x0000555556aac9e0,                                                         ),                                                         post_init: None,                                                         frozen: false,                                                         custom_init: false,                                                         root_model: false,                                                         name: "fbx",                                                     },                                                 ),                                                 None,                                             ),                                             (                                                 Model(                                                     ModelValidator {                                                         revalidate: Never,                                                         validator: ModelFields(                                                             ModelFieldsValidator {                                                                 fields: [                                                                     Field {                                                                         name: "type",                                                                         lookup_key: Simple {                                                                             key: "type",                                                                             py_key: Py(                                                                                 0x00007fffff8ebef0,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "type",                                                                                         Py(                                                                                             0x00007fffff8ebef0,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007fffff8ebef0,                                                                         ),                                                                         validator: WithDefault(                                                                             WithDefaultValidator {                                                                                 default: Default(                                                                                     Py(                                                                                         0x00007fffe137ba30,                                                                                     ),                                                                                 ),                                                                                 on_error: Raise,                                                                                 validator: Literal(                                                                                     LiteralValidator {                                                                                         lookup: LiteralLookup {                                                                                             expected_bool: None,                                                                                             expected_int: None,                                                                                             expected_str: Some(                                                                                                 {                                                                                                     "gltf": 0,                                                                                                 },                                                                                             ),                                                                                             expected_py: None,                                                                                             values: [                                                                                                 Py(                                                                                                     0x00007fffe137ba30,                                                                                                 ),                                                                                             ],                                                                                         },                                                                                         expected_repr: "'gltf'",                                                                                         name: "literal['gltf']",                                                                                     },                                                                                 ),                                                                                 validate_default: false,                                                                                 copy_default: false,                                                                                 name: "default[literal['gltf']]",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                 ],                                                                 model_name: "gltf",                                                                 extra_behavior: Ignore,                                                                 extras_validator: None,                                                                 strict: false,                                                                 from_attributes: false,                                                                 loc_by_alias: true,                                                             },                                                         ),                                                         class: Py(                                                             0x0000555556aaeee0,                                                         ),                                                         post_init: None,                                                         frozen: false,                                                         custom_init: false,                                                         root_model: false,                                                         name: "gltf",                                                     },                                                 ),                                                 None,                                             ),                                             (                                                 Model(                                                     ModelValidator {                                                         revalidate: Never,                                                         validator: ModelFields(                                                             ModelFieldsValidator {                                                                 fields: [                                                                     Field {                                                                         name: "coords",                                                                         lookup_key: Simple {                                                                             key: "coords",                                                                             py_key: Py(                                                                                 0x00007ffffcb0d8f0,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "coords",                                                                                         Py(                                                                                             0x00007ffffcb0d8f0,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007ffffcb0d8f0,                                                                         ),                                                                         validator: DefinitionRef(                                                                             DefinitionRefValidator {                                                                                 definition: "kittycad.models.system.System:93825014588992",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                     Field {                                                                         name: "type",                                                                         lookup_key: Simple {                                                                             key: "type",                                                                             py_key: Py(                                                                                 0x00007fffff8ebef0,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "type",                                                                                         Py(                                                                                             0x00007fffff8ebef0,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007fffff8ebef0,                                                                         ),                                                                         validator: WithDefault(                                                                             WithDefaultValidator {                                                                                 default: Default(                                                                                     Py(                                                                                         0x00007fffff93a970,                                                                                     ),                                                                                 ),                                                                                 on_error: Raise,                                                                                 validator: Literal(                                                                                     LiteralValidator {                                                                                         lookup: LiteralLookup {                                                                                             expected_bool: None,                                                                                             expected_int: None,                                                                                             expected_str: Some(                                                                                                 {                                                                                                     "obj": 0,                                                                                                 },                                                                                             ),                                                                                             expected_py: None,                                                                                             values: [                                                                                                 Py(                                                                                                     0x00007fffff93a970,                                                                                                 ),                                                                                             ],                                                                                         },                                                                                         expected_repr: "'obj'",                                                                                         name: "literal['obj']",                                                                                     },                                                                                 ),                                                                                 validate_default: false,                                                                                 copy_default: false,                                                                                 name: "default[literal['obj']]",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                     Field {                                                                         name: "units",                                                                         lookup_key: Simple {                                                                             key: "units",                                                                             py_key: Py(                                                                                 0x00007fffff2402b0,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "units",                                                                                         Py(                                                                                             0x00007fffff2402b0,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007fffff2402b0,                                                                         ),                                                                         validator: DefinitionRef(                                                                             DefinitionRefValidator {                                                                                 definition: "kittycad.models.unit_length.UnitLength:93825014613552",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                 ],                                                                 model_name: "obj",                                                                 extra_behavior: Ignore,                                                                 extras_validator: None,                                                                 strict: false,                                                                 from_attributes: false,                                                                 loc_by_alias: true,                                                             },                                                         ),                                                         class: Py(                                                             0x0000555556ab0cc0,                                                         ),                                                         post_init: None,                                                         frozen: false,                                                         custom_init: false,                                                         root_model: false,                                                         name: "obj",                                                     },                                                 ),                                                 None,                                             ),                                             (                                                 Model(                                                     ModelValidator {                                                         revalidate: Never,                                                         validator: ModelFields(                                                             ModelFieldsValidator {                                                                 fields: [                                                                     Field {                                                                         name: "coords",                                                                         lookup_key: Simple {                                                                             key: "coords",                                                                             py_key: Py(                                                                                 0x00007ffffcb0d8f0,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "coords",                                                                                         Py(                                                                                             0x00007ffffcb0d8f0,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007ffffcb0d8f0,                                                                         ),                                                                         validator: DefinitionRef(                                                                             DefinitionRefValidator {                                                                                 definition: "kittycad.models.system.System:93825014588992",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                     Field {                                                                         name: "type",                                                                         lookup_key: Simple {                                                                             key: "type",                                                                             py_key: Py(                                                                                 0x00007fffff8ebef0,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "type",                                                                                         Py(                                                                                             0x00007fffff8ebef0,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007fffff8ebef0,                                                                         ),                                                                         validator: WithDefault(                                                                             WithDefaultValidator {                                                                                 default: Default(                                                                                     Py(                                                                                         0x00007fffe137bab0,                                                                                     ),                                                                                 ),                                                                                 on_error: Raise,                                                                                 validator: Literal(                                                                                     LiteralValidator {                                                                                         lookup: LiteralLookup {                                                                                             expected_bool: None,                                                                                             expected_int: None,                                                                                             expected_str: Some(                                                                                                 {                                                                                                     "ply": 0,                                                                                                 },                                                                                             ),                                                                                             expected_py: None,                                                                                             values: [                                                                                                 Py(                                                                                                     0x00007fffe137bab0,                                                                                                 ),                                                                                             ],                                                                                         },                                                                                         expected_repr: "'ply'",                                                                                         name: "literal['ply']",                                                                                     },                                                                                 ),                                                                                 validate_default: false,                                                                                 copy_default: false,                                                                                 name: "default[literal['ply']]",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                     Field {                                                                         name: "units",                                                                         lookup_key: Simple {                                                                             key: "units",                                                                             py_key: Py(                                                                                 0x00007fffff2402b0,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "units",                                                                                         Py(                                                                                             0x00007fffff2402b0,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007fffff2402b0,                                                                         ),                                                                         validator: DefinitionRef(                                                                             DefinitionRefValidator {                                                                                 definition: "kittycad.models.unit_length.UnitLength:93825014613552",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                 ],                                                                 model_name: "ply",                                                                 extra_behavior: Ignore,                                                                 extras_validator: None,                                                                 strict: false,                                                                 from_attributes: false,                                                                 loc_by_alias: true,                                                             },                                                         ),                                                         class: Py(                                                             0x0000555556aba5e0,                                                         ),                                                         post_init: None,                                                         frozen: false,                                                         custom_init: false,                                                         root_model: false,                                                         name: "ply",                                                     },                                                 ),                                                 None,                                             ),                                             (                                                 Model(                                                     ModelValidator {                                                         revalidate: Never,                                                         validator: ModelFields(                                                             ModelFieldsValidator {                                                                 fields: [                                                                     Field {                                                                         name: "type",                                                                         lookup_key: Simple {                                                                             key: "type",                                                                             py_key: Py(                                                                                 0x00007fffff8ebef0,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "type",                                                                                         Py(                                                                                             0x00007fffff8ebef0,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007fffff8ebef0,                                                                         ),                                                                         validator: WithDefault(                                                                             WithDefaultValidator {                                                                                 default: Default(                                                                                     Py(                                                                                         0x00007fffe1ef6430,                                                                                     ),                                                                                 ),                                                                                 on_error: Raise,                                                                                 validator: Literal(                                                                                     LiteralValidator {                                                                                         lookup: LiteralLookup {                                                                                             expected_bool: None,                                                                                             expected_int: None,                                                                                             expected_str: Some(                                                                                                 {                                                                                                     "sldprt": 0,                                                                                                 },                                                                                             ),                                                                                             expected_py: None,                                                                                             values: [                                                                                                 Py(                                                                                                     0x00007fffe1ef6430,                                                                                                 ),                                                                                             ],                                                                                         },                                                                                         expected_repr: "'sldprt'",                                                                                         name: "literal['sldprt']",                                                                                     },                                                                                 ),                                                                                 validate_default: false,                                                                                 copy_default: false,                                                                                 name: "default[literal['sldprt']]",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                 ],                                                                 model_name: "sldprt",                                                                 extra_behavior: Ignore,                                                                 extras_validator: None,                                                                 strict: false,                                                                 from_attributes: false,                                                                 loc_by_alias: true,                                                             },                                                         ),                                                         class: Py(                                                             0x0000555556ac3810,                                                         ),                                                         post_init: None,                                                         frozen: false,                                                         custom_init: false,                                                         root_model: false,                                                         name: "sldprt",                                                     },                                                 ),                                                 None,                                             ),                                             (                                                 Model(                                                     ModelValidator {                                                         revalidate: Never,                                                         validator: ModelFields(                                                             ModelFieldsValidator {                                                                 fields: [                                                                     Field {                                                                         name: "type",                                                                         lookup_key: Simple {                                                                             key: "type",                                                                             py_key: Py(                                                                                 0x00007fffff8ebef0,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "type",                                                                                         Py(                                                                                             0x00007fffff8ebef0,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007fffff8ebef0,                                                                         ),                                                                         validator: WithDefault(                                                                             WithDefaultValidator {                                                                                 default: Default(                                                                                     Py(                                                                                         0x00007fffff929d30,                                                                                     ),                                                                                 ),                                                                                 on_error: Raise,                                                                                 validator: Literal(                                                                                     LiteralValidator {                                                                                         lookup: LiteralLookup {                                                                                             expected_bool: None,                                                                                             expected_int: None,                                                                                             expected_str: Some(                                                                                                 {                                                                                                     "step": 0,                                                                                                 },                                                                                             ),                                                                                             expected_py: None,                                                                                             values: [                                                                                                 Py(                                                                                                     0x00007fffff929d30,                                                                                                 ),                                                                                             ],                                                                                         },                                                                                         expected_repr: "'step'",                                                                                         name: "literal['step']",                                                                                     },                                                                                 ),                                                                                 validate_default: false,                                                                                 copy_default: false,                                                                                 name: "default[literal['step']]",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                 ],                                                                 model_name: "step",                                                                 extra_behavior: Ignore,                                                                 extras_validator: None,                                                                 strict: false,                                                                 from_attributes: false,                                                                 loc_by_alias: true,                                                             },                                                         ),                                                         class: Py(                                                             0x0000555556ac52c0,                                                         ),                                                         post_init: None,                                                         frozen: false,                                                         custom_init: false,                                                         root_model: false,                                                         name: "step",                                                     },                                                 ),                                                 None,                                             ),                                             (                                                 Model(                                                     ModelValidator {                                                         revalidate: Never,                                                         validator: ModelFields(                                                             ModelFieldsValidator {                                                                 fields: [                                                                     Field {                                                                         name: "coords",                                                                         lookup_key: Simple {                                                                             key: "coords",                                                                             py_key: Py(                                                                                 0x00007ffffcb0d8f0,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "coords",                                                                                         Py(                                                                                             0x00007ffffcb0d8f0,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007ffffcb0d8f0,                                                                         ),                                                                         validator: DefinitionRef(                                                                             DefinitionRefValidator {                                                                                 definition: "kittycad.models.system.System:93825014588992",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                     Field {                                                                         name: "type",                                                                         lookup_key: Simple {                                                                             key: "type",                                                                             py_key: Py(                                                                                 0x00007fffff8ebef0,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "type",                                                                                         Py(                                                                                             0x00007fffff8ebef0,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007fffff8ebef0,                                                                         ),                                                                         validator: WithDefault(                                                                             WithDefaultValidator {                                                                                 default: Default(                                                                                     Py(                                                                                         0x00007fffe137bb30,                                                                                     ),                                                                                 ),                                                                                 on_error: Raise,                                                                                 validator: Literal(                                                                                     LiteralValidator {                                                                                         lookup: LiteralLookup {                                                                                             expected_bool: None,                                                                                             expected_int: None,                                                                                             expected_str: Some(                                                                                                 {                                                                                                     "stl": 0,                                                                                                 },                                                                                             ),                                                                                             expected_py: None,                                                                                             values: [                                                                                                 Py(                                                                                                     0x00007fffe137bb30,                                                                                                 ),                                                                                             ],                                                                                         },                                                                                         expected_repr: "'stl'",                                                                                         name: "literal['stl']",                                                                                     },                                                                                 ),                                                                                 validate_default: false,                                                                                 copy_default: false,                                                                                 name: "default[literal['stl']]",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                     Field {                                                                         name: "units",                                                                         lookup_key: Simple {                                                                             key: "units",                                                                             py_key: Py(                                                                                 0x00007fffff2402b0,                                                                             ),                                                                             path: LookupPath(                                                                                 [                                                                                     S(                                                                                         "units",                                                                                         Py(                                                                                             0x00007fffff2402b0,                                                                                         ),                                                                                     ),                                                                                 ],                                                                             ),                                                                         },                                                                         name_py: Py(                                                                             0x00007fffff2402b0,                                                                         ),                                                                         validator: DefinitionRef(                                                                             DefinitionRefValidator {                                                                                 definition: "kittycad.models.unit_length.UnitLength:93825014613552",                                                                             },                                                                         ),                                                                         frozen: false,                                                                     },                                                                 ],                                                                 model_name: "stl",                                                                 extra_behavior: Ignore,                                                                 extras_validator: None,                                                                 strict: false,                                                                 from_attributes: false,                                                                 loc_by_alias: true,                                                             },                                                         ),                                                         class: Py(                                                             0x0000555556ac7160,                                                         ),                                                         post_init: None,                                                         frozen: false,                                                         custom_init: false,                                                         root_model: false,                                                         name: "stl",                                                     },                                                 ),                                                 None,                                             ),                                         ],                                         custom_error: None,                                         strict: false,                                         name: "union[fbx,gltf,obj,ply,sldprt,step,stl]",                                     },                                 ),                                 class: Py(                                     0x0000555556ac7ba0,                                 ),                                 post_init: None,                                 frozen: false,                                 custom_init: false,                                 root_model: true,                                 name: "RootModel[Annotated[Union[kittycad.models.input_format.fbx, kittycad.models.input_format.gltf, kittycad.models.input_format.obj, kittycad.models.input_format.ply, kittycad.models.input_format.sldprt, kittycad.models.input_format.step, kittycad.models.input_format.stl], FieldInfo(annotation=NoneType, required=True, discriminator='type')]]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe1c7b3b0,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "import_files": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe1c7b3b0,                                                 ),                                             ],                                         },                                         expected_repr: "'import_files'",                                         name: "literal['import_files']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['import_files']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "import_files",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556fcdda0,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "import_files",     }, ), definitions=[Model(ModelValidator { revalidate: Never, validator: ModelFields(ModelFieldsValidator { fields: [Field { name: "forward", lookup_key: Simple { key: "forward", py_key: Py(0x7ffffddd9770), path: LookupPath([S("forward", Py(0x7ffffddd9770))]) }, name_py: Py(0x7ffffddd9770), validator: DefinitionRef(DefinitionRefValidator { definition: "kittycad.models.axis_direction_pair.AxisDirectionPair:93825014569648" }), frozen: false }, Field { name: "up", lookup_key: Simple { key: "up", py_key: Py(0x7ffffdc55170), path: LookupPath([S("up", Py(0x7ffffdc55170))]) }, name_py: Py(0x7ffffdc55170), validator: DefinitionRef(DefinitionRefValidator { definition: "kittycad.models.axis_direction_pair.AxisDirectionPair:93825014569648" }), frozen: false }], model_name: "System", extra_behavior: Ignore, extras_validator: None, strict: false, from_attributes: false, loc_by_alias: true }), class: Py(0x555556aa6640), post_init: None, frozen: false, custom_init: false, root_model: false, name: "System" }), LaxOrStrict(LaxOrStrictValidator { strict: false, lax_validator: Chain(ChainValidator { steps: [Str(StrValidator { strict: false, coerce_numbers_to_str: false }), FunctionPlain(FunctionPlainValidator { func: Py(0x7fffe139e4c0), config: Py(0x7fffe0eadbc0), name: "function-plain[to_enum()]", field_name: None, info_arg: false })], name: "chain[str,function-plain[to_enum()]]" }), strict_validator: JsonOrPython(JsonOrPython { json: FunctionAfter(FunctionAfterValidator { validator: Str(StrValidator { strict: false, coerce_numbers_to_str: false }), func: Py(0x7fffe139e4c0), config: Py(0x7fffe0eadbc0), name: "function-after[to_enum(), str]", field_name: None, info_arg: false }), python: IsInstance(IsInstanceValidator { class: Py(0x555556aac630), class_repr: "UnitLength", name: "is-instance[UnitLength]" }), name: "json-or-python[json=function-after[to_enum(), str],python=is-instance[UnitLength]]" }), name: "lax-or-strict[lax=chain[str,function-plain[to_enum()]],strict=json-or-python[json=function-after[to_enum(), str],python=is-instance[UnitLength]]]" }), LaxOrStrict(LaxOrStrictValidator { strict: false, lax_validator: Chain(ChainValidator { steps: [Str(StrValidator { strict: false, coerce_numbers_to_str: false }), FunctionPlain(FunctionPlainValidator { func: Py(0x7fffe14d0ca0), config: Py(0x7fffe0eadbc0), name: "function-plain[to_enum()]", field_name: None, info_arg: false })], name: "chain[str,function-plain[to_enum()]]" }), strict_validator: JsonOrPython(JsonOrPython { json: FunctionAfter(FunctionAfterValidator { validator: Str(StrValidator { strict: false, coerce_numbers_to_str: false }), func: Py(0x7fffe14d0ca0), config: Py(0x7fffe0eadbc0), name: "function-after[to_enum(), str]", field_name: None, info_arg: false }), python: IsInstance(IsInstanceValidator { class: Py(0x555556aa1100), class_repr: "Axis", name: "is-instance[Axis]" }), name: "json-or-python[json=function-after[to_enum(), str],python=is-instance[Axis]]" }), name: "lax-or-strict[lax=chain[str,function-plain[to_enum()]],strict=json-or-python[json=function-after[to_enum(), str],python=is-instance[Axis]]]" }), LaxOrStrict(LaxOrStrictValidator { strict: false, lax_validator: Chain(ChainValidator { steps: [Str(StrValidator { strict: false, coerce_numbers_to_str: false }), FunctionPlain(FunctionPlainValidator { func: Py(0x7fffe14d0160), config: Py(0x7fffe0eadbc0), name: "function-plain[to_enum()]", field_name: None, info_arg: false })], name: "chain[str,function-plain[to_enum()]]" }), strict_validator: JsonOrPython(JsonOrPython { json: FunctionAfter(FunctionAfterValidator { validator: Str(StrValidator { strict: false, coerce_numbers_to_str: false }), func: Py(0x7fffe14d0160), config: Py(0x7fffe0eadbc0), name: "function-after[to_enum(), str]", field_name: None, info_arg: false }), python: IsInstance(IsInstanceValidator { class: Py(0x555556aa14b0), class_repr: "Direction", name: "is-instance[Direction]" }), name: "json-or-python[json=function-after[to_enum(), str],python=is-instance[Direction]]" }), name: "lax-or-strict[lax=chain[str,function-plain[to_enum()]],strict=json-or-python[json=function-after[to_enum(), str],python=is-instance[Direction]]]" }), Model(ModelValidator { revalidate: Never, validator: ModelFields(ModelFieldsValidator { fields: [Field { name: "axis", lookup_key: Simple { key: "axis", py_key: Py(0x7ffffcb74b30), path: LookupPath([S("axis", Py(0x7ffffcb74b30))]) }, name_py: Py(0x7ffffcb74b30), validator: DefinitionRef(DefinitionRefValidator { definition: "kittycad.models.axis.Axis:93825014567168" }), frozen: false }, Field { name: "direction", lookup_key: Simple { key: "direction", py_key: Py(0x7fffff77c7f0), path: LookupPath([S("direction", Py(0x7fffff77c7f0))]) }, name_py: Py(0x7fffff77c7f0), validator: DefinitionRef(DefinitionRefValidator { definition: "kittycad.models.direction.Direction:93825014568112" }), frozen: false }], model_name: "AxisDirectionPair", extra_behavior: Ignore, extras_validator: None, strict: false, from_attributes: false, loc_by_alias: true }), class: Py(0x555556aa1ab0), post_init: None, frozen: false, custom_init: false, root_model: false, name: "AxisDirectionPair" })])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, files: List[kittycad.models.import_file.ImportFile], format: pydantic.root_model.RootModel[Annotated[Union[kittycad.models.input_format.fbx, kittycad.models.input_format.gltf, kittycad.models.input_format.obj, kittycad.models.input_format.ply, kittycad.models.input_format.sldprt, kittycad.models.input_format.step, kittycad.models.input_format.stl], FieldInfo(annotation=NoneType, required=True, discriminator='type')]], type: Literal['import_files'] = 'import_files') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

files: List[ImportFile][source]
format: stl], FieldInfo(annotation=NoneType, required=True, discriminator='type')]][source]
classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'files': FieldInfo(annotation=List[kittycad.models.import_file.ImportFile], required=True), 'format': FieldInfo(annotation=RootModel[Annotated[Union[kittycad.models.input_format.fbx, kittycad.models.input_format.gltf, kittycad.models.input_format.obj, kittycad.models.input_format.ply, kittycad.models.input_format.sldprt, kittycad.models.input_format.step, kittycad.models.input_format.stl], FieldInfo(annotation=NoneType, required=True, discriminator='type')]], required=True), 'type': FieldInfo(annotation=Literal['import_files'], required=False, default='import_files')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['import_files'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.make_axes_gizmo(**data)[source][source]

Add a gizmo showing the axes.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'clobber': <class 'bool'>, 'gizmo_mode': <class 'bool'>, 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'type': typing.Literal['make_axes_gizmo']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'clobber': FieldInfo(annotation=bool, required=True), 'gizmo_mode': FieldInfo(annotation=bool, required=True), 'type': FieldInfo(annotation=Literal['make_axes_gizmo'], required=False, default='make_axes_gizmo')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.make_axes_gizmo'>, 'config': {'title': 'make_axes_gizmo'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.make_axes_gizmo'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.make_axes_gizmo'>>]}, 'ref': 'kittycad.models.modeling_cmd.make_axes_gizmo:93825019792256', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'clobber': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'bool'}, 'type': 'model-field'}, 'gizmo_mode': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'bool'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'make_axes_gizmo', 'schema': {'expected': ['make_axes_gizmo'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'make_axes_gizmo', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_control_points': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_fade': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_set_opacity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'get_entity_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entities': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_plane': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_click': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'new_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_bring_to_front': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_visible': <pydantic._internal._model_construction._PydanticWeakRef object>, 'plane_set_color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'send_object': <pydantic._internal._model_construction._PydanticWeakRef object>, 'set_tool': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_disable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_enable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid2d_add_hole': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_edge_faces': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_opposite_edges': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_next_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_opposite_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_prev_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'take_snapshot': <pydantic._internal._model_construction._PydanticWeakRef object>, 'update_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556f9cb80,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "clobber": SerField {                         key_py: Py(                             0x00007fffe10db070,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Bool(                                 BoolSerializer,                             ),                         ),                         required: true,                     },                     "gizmo_mode": SerField {                         key_py: Py(                             0x00007fffe10f86f0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Bool(                                 BoolSerializer,                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe10f8f70,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "make_axes_gizmo",                                             },                                             expected_py: None,                                             name: "literal['make_axes_gizmo']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 3,             },         ),         has_extra: false,         root_model: false,         name: "make_axes_gizmo",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="make_axes_gizmo", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "clobber",                         lookup_key: Simple {                             key: "clobber",                             py_key: Py(                                 0x00007fffe10db070,                             ),                             path: LookupPath(                                 [                                     S(                                         "clobber",                                         Py(                                             0x00007fffe10db070,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe10db070,                         ),                         validator: Bool(                             BoolValidator {                                 strict: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "gizmo_mode",                         lookup_key: Simple {                             key: "gizmo_mode",                             py_key: Py(                                 0x00007fffe10f86f0,                             ),                             path: LookupPath(                                 [                                     S(                                         "gizmo_mode",                                         Py(                                             0x00007fffe10f86f0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe10f86f0,                         ),                         validator: Bool(                             BoolValidator {                                 strict: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe10f8f70,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "make_axes_gizmo": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe10f8f70,                                                 ),                                             ],                                         },                                         expected_repr: "'make_axes_gizmo'",                                         name: "literal['make_axes_gizmo']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['make_axes_gizmo']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "make_axes_gizmo",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556f9cb80,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "make_axes_gizmo",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, clobber: bool, gizmo_mode: bool, type: Literal['make_axes_gizmo'] = 'make_axes_gizmo') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

clobber: bool[source]
classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

classmethod from_orm(cls, obj)[source]
Return type:

Model

gizmo_mode: bool[source]
json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'clobber': FieldInfo(annotation=bool, required=True), 'gizmo_mode': FieldInfo(annotation=bool, required=True), 'type': FieldInfo(annotation=Literal['make_axes_gizmo'], required=False, default='make_axes_gizmo')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['make_axes_gizmo'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.make_plane(**data)[source][source]

Make a plane.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'clobber': <class 'bool'>, 'hide': typing.Optional[bool], 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'origin': <class 'kittycad.models.point3d.Point3d'>, 'size': <class 'float'>, 'type': typing.Literal['make_plane'], 'x_axis': <class 'kittycad.models.point3d.Point3d'>, 'y_axis': <class 'kittycad.models.point3d.Point3d'>}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'clobber': FieldInfo(annotation=bool, required=True), 'hide': FieldInfo(annotation=Union[bool, NoneType], required=False), 'origin': FieldInfo(annotation=Point3d, required=True), 'size': FieldInfo(annotation=float, required=True), 'type': FieldInfo(annotation=Literal['make_plane'], required=False, default='make_plane'), 'x_axis': FieldInfo(annotation=Point3d, required=True), 'y_axis': FieldInfo(annotation=Point3d, required=True)}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'definitions': [{'type': 'model', 'cls': <class 'kittycad.models.point3d.Point3d'>, 'schema': {'type': 'model-fields', 'fields': {'x': {'type': 'model-field', 'schema': {'type': 'float', 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'y': {'type': 'model-field', 'schema': {'type': 'float', 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}, 'z': {'type': 'model-field', 'schema': {'type': 'float', 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}}, 'metadata': {'pydantic_js_functions': [], 'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>]}}}, 'model_name': 'Point3d', 'computed_fields': []}, 'custom_init': False, 'root_model': False, 'config': {'title': 'Point3d'}, 'ref': 'kittycad.models.point3d.Point3d:93825014233264', 'metadata': {'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.point3d.Point3d'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.point3d.Point3d'>>], 'pydantic_js_annotation_functions': [], 'pydantic.internal.needs_apply_discriminated_union': False}}], 'schema': {'cls': <class 'kittycad.models.modeling_cmd.make_plane'>, 'config': {'title': 'make_plane'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.make_plane'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.make_plane'>>]}, 'ref': 'kittycad.models.modeling_cmd.make_plane:93825019614560', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'clobber': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'bool'}, 'type': 'model-field'}, 'hide': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': None, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'bool'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'origin': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'schema_ref': 'kittycad.models.point3d.Point3d:93825014233264', 'type': 'definition-ref'}, 'type': 'model-field'}, 'size': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'make_plane', 'schema': {'expected': ['make_plane'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}, 'x_axis': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'schema_ref': 'kittycad.models.point3d.Point3d:93825014233264', 'type': 'definition-ref'}, 'type': 'model-field'}, 'y_axis': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'schema_ref': 'kittycad.models.point3d.Point3d:93825014233264', 'type': 'definition-ref'}, 'type': 'model-field'}}, 'model_name': 'make_plane', 'type': 'model-fields'}, 'type': 'model'}, 'type': 'definitions'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_fade': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_set_opacity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'get_entity_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entities': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'new_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_bring_to_front': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_visible': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'send_object': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid2d_add_hole': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_edge_faces': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_opposite_edges': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_next_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_opposite_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_prev_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'update_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556f71560,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "clobber": SerField {                         key_py: Py(                             0x00007fffe10db070,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Bool(                                 BoolSerializer,                             ),                         ),                         required: true,                     },                     "origin": SerField {                         key_py: Py(                             0x00007fffff8f5730,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Recursive(                                 DefinitionRefSerializer {                                     definition: "kittycad.models.point3d.Point3d:93825014233264",                                 },                             ),                         ),                         required: true,                     },                     "size": SerField {                         key_py: Py(                             0x00007fffff94d770,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Float(                                 FloatSerializer {                                     inf_nan_mode: Null,                                 },                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe10f89f0,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "make_plane",                                             },                                             expected_py: None,                                             name: "literal['make_plane']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                     "hide": SerField {                         key_py: Py(                             0x00007fffff098430,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007ffffff85420,                                         ),                                     ),                                     serializer: Nullable(                                         NullableSerializer {                                             serializer: Bool(                                                 BoolSerializer,                                             ),                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                     "x_axis": SerField {                         key_py: Py(                             0x00007fffe1357070,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Recursive(                                 DefinitionRefSerializer {                                     definition: "kittycad.models.point3d.Point3d:93825014233264",                                 },                             ),                         ),                         required: true,                     },                     "y_axis": SerField {                         key_py: Py(                             0x00007fffe1108a30,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Recursive(                                 DefinitionRefSerializer {                                     definition: "kittycad.models.point3d.Point3d:93825014233264",                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 7,             },         ),         has_extra: false,         root_model: false,         name: "make_plane",     }, ), definitions=[Model(ModelSerializer { class: Py(0x555556a4f8b0), serializer: Fields(GeneralFieldsSerializer { fields: {"z": SerField { key_py: Py(0x7fffff72a770), alias: None, alias_py: None, serializer: Some(Float(FloatSerializer { inf_nan_mode: Null })), required: true }, "x": SerField { key_py: Py(0x7fffff8fe870), alias: None, alias_py: None, serializer: Some(Float(FloatSerializer { inf_nan_mode: Null })), required: true }, "y": SerField { key_py: Py(0x7fffff72a730), alias: None, alias_py: None, serializer: Some(Float(FloatSerializer { inf_nan_mode: Null })), required: true }}, computed_fields: Some(ComputedFields([])), mode: SimpleDict, extra_serializer: None, filter: SchemaFilter { include: None, exclude: None }, required_fields: 3 }), has_extra: false, root_model: false, name: "Point3d" })])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="make_plane", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "clobber",                         lookup_key: Simple {                             key: "clobber",                             py_key: Py(                                 0x00007fffe10db070,                             ),                             path: LookupPath(                                 [                                     S(                                         "clobber",                                         Py(                                             0x00007fffe10db070,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe10db070,                         ),                         validator: Bool(                             BoolValidator {                                 strict: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "hide",                         lookup_key: Simple {                             key: "hide",                             py_key: Py(                                 0x00007fffff098430,                             ),                             path: LookupPath(                                 [                                     S(                                         "hide",                                         Py(                                             0x00007fffff098430,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff098430,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007ffffff85420,                                     ),                                 ),                                 on_error: Raise,                                 validator: Nullable(                                     NullableValidator {                                         validator: Bool(                                             BoolValidator {                                                 strict: false,                                             },                                         ),                                         name: "nullable[bool]",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[nullable[bool]]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "origin",                         lookup_key: Simple {                             key: "origin",                             py_key: Py(                                 0x00007fffff8f5730,                             ),                             path: LookupPath(                                 [                                     S(                                         "origin",                                         Py(                                             0x00007fffff8f5730,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8f5730,                         ),                         validator: DefinitionRef(                             DefinitionRefValidator {                                 definition: "kittycad.models.point3d.Point3d:93825014233264",                             },                         ),                         frozen: false,                     },                     Field {                         name: "size",                         lookup_key: Simple {                             key: "size",                             py_key: Py(                                 0x00007fffff94d770,                             ),                             path: LookupPath(                                 [                                     S(                                         "size",                                         Py(                                             0x00007fffff94d770,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff94d770,                         ),                         validator: Float(                             FloatValidator {                                 strict: false,                                 allow_inf_nan: true,                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe10f89f0,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "make_plane": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe10f89f0,                                                 ),                                             ],                                         },                                         expected_repr: "'make_plane'",                                         name: "literal['make_plane']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['make_plane']]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "x_axis",                         lookup_key: Simple {                             key: "x_axis",                             py_key: Py(                                 0x00007fffe1357070,                             ),                             path: LookupPath(                                 [                                     S(                                         "x_axis",                                         Py(                                             0x00007fffe1357070,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe1357070,                         ),                         validator: DefinitionRef(                             DefinitionRefValidator {                                 definition: "kittycad.models.point3d.Point3d:93825014233264",                             },                         ),                         frozen: false,                     },                     Field {                         name: "y_axis",                         lookup_key: Simple {                             key: "y_axis",                             py_key: Py(                                 0x00007fffe1108a30,                             ),                             path: LookupPath(                                 [                                     S(                                         "y_axis",                                         Py(                                             0x00007fffe1108a30,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe1108a30,                         ),                         validator: DefinitionRef(                             DefinitionRefValidator {                                 definition: "kittycad.models.point3d.Point3d:93825014233264",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "make_plane",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556f71560,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "make_plane",     }, ), definitions=[Model(ModelValidator { revalidate: Never, validator: ModelFields(ModelFieldsValidator { fields: [Field { name: "x", lookup_key: Simple { key: "x", py_key: Py(0x7fffff8fe870), path: LookupPath([S("x", Py(0x7fffff8fe870))]) }, name_py: Py(0x7fffff8fe870), validator: Float(FloatValidator { strict: false, allow_inf_nan: true }), frozen: false }, Field { name: "y", lookup_key: Simple { key: "y", py_key: Py(0x7fffff72a730), path: LookupPath([S("y", Py(0x7fffff72a730))]) }, name_py: Py(0x7fffff72a730), validator: Float(FloatValidator { strict: false, allow_inf_nan: true }), frozen: false }, Field { name: "z", lookup_key: Simple { key: "z", py_key: Py(0x7fffff72a770), path: LookupPath([S("z", Py(0x7fffff72a770))]) }, name_py: Py(0x7fffff72a770), validator: Float(FloatValidator { strict: false, allow_inf_nan: true }), frozen: false }], model_name: "Point3d", extra_behavior: Ignore, extras_validator: None, strict: false, from_attributes: false, loc_by_alias: true }), class: Py(0x555556a4f8b0), post_init: None, frozen: false, custom_init: false, root_model: false, name: "Point3d" })])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, clobber: bool, hide: Optional[bool] = None, origin: kittycad.models.point3d.Point3d, size: float, type: Literal['make_plane'] = 'make_plane', x_axis: kittycad.models.point3d.Point3d, y_axis: kittycad.models.point3d.Point3d) -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

clobber: bool[source]
classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

classmethod from_orm(cls, obj)[source]
Return type:

Model

hide: Optional[bool][source]
json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'clobber': FieldInfo(annotation=bool, required=True), 'hide': FieldInfo(annotation=Union[bool, NoneType], required=False), 'origin': FieldInfo(annotation=Point3d, required=True), 'size': FieldInfo(annotation=float, required=True), 'type': FieldInfo(annotation=Literal['make_plane'], required=False, default='make_plane'), 'x_axis': FieldInfo(annotation=Point3d, required=True), 'y_axis': FieldInfo(annotation=Point3d, required=True)}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

origin: Point3d[source]
classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

size: float[source]
type: Literal['make_plane'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

x_axis: Point3d[source]
y_axis: Point3d[source]
class kittycad.models.modeling_cmd.mass(**data)[source][source]

Get the mass of entities in the scene or the default scene.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'entity_ids': typing.List[str], 'material_density': <class 'float'>, 'material_density_unit': <enum 'UnitDensity'>, 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'output_unit': <enum 'UnitMass'>, 'source_unit': <enum 'UnitLength'>, 'type': typing.Literal['mass']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'entity_ids': FieldInfo(annotation=List[str], required=True), 'material_density': FieldInfo(annotation=float, required=True), 'material_density_unit': FieldInfo(annotation=UnitDensity, required=True), 'output_unit': FieldInfo(annotation=UnitMass, required=True), 'source_unit': FieldInfo(annotation=UnitLength, required=True), 'type': FieldInfo(annotation=Literal['mass'], required=False, default='mass')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.mass'>, 'config': {'title': 'mass'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.mass'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.mass'>>]}, 'ref': 'kittycad.models.modeling_cmd.mass:93825020009280', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'entity_ids': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'items_schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'strict': False, 'type': 'list'}, 'type': 'model-field'}, 'material_density': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}, 'material_density_unit': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'lax_schema': {'steps': [{'type': 'str'}, {'type': 'function-plain', 'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}}], 'type': 'chain'}, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_functions': [<function get_enum_core_schema.<locals>.get_json_schema>]}, 'ref': 'kittycad.models.unit_density.UnitDensity:93825015375808', 'strict_schema': {'json_schema': {'function': {'function': <function get_enum_core_schema.<locals>.to_enum>, 'type': 'no-info'}, 'schema': {'type': 'str'}, 'type': 'function-after'}, 'python_schema': {'cls': <enum 'UnitDensity'>, 'type': 'is-instance'}, 'type': 'json-or-python'}, 'type': 'lax-or-strict'}, 'type': 'model-field'}, 'output_unit': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'lax_schema': {'steps': [{'type': 'str'}, {'type': 'function-plain', 'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}}], 'type': 'chain'}, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_functions': [<function get_enum_core_schema.<locals>.get_json_schema>]}, 'ref': 'kittycad.models.unit_mass.UnitMass:93825015376752', 'strict_schema': {'json_schema': {'function': {'function': <function get_enum_core_schema.<locals>.to_enum>, 'type': 'no-info'}, 'schema': {'type': 'str'}, 'type': 'function-after'}, 'python_schema': {'cls': <enum 'UnitMass'>, 'type': 'is-instance'}, 'type': 'json-or-python'}, 'type': 'lax-or-strict'}, 'type': 'model-field'}, 'source_unit': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'lax_schema': {'steps': [{'type': 'str'}, {'type': 'function-plain', 'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}}], 'type': 'chain'}, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_functions': [<function get_enum_core_schema.<locals>.get_json_schema>]}, 'ref': 'kittycad.models.unit_length.UnitLength:93825014613552', 'strict_schema': {'json_schema': {'function': {'function': <function get_enum_core_schema.<locals>.to_enum>, 'type': 'no-info'}, 'schema': {'type': 'str'}, 'type': 'function-after'}, 'python_schema': {'cls': <enum 'UnitLength'>, 'type': 'is-instance'}, 'type': 'json-or-python'}, 'type': 'lax-or-strict'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'mass', 'schema': {'expected': ['mass'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'mass', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_control_points': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_end_points': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_fade': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_set_opacity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'get_entity_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'handle_mouse_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'handle_mouse_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'handle_mouse_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entities': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'import_files': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_axes_gizmo': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_plane': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_click': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'new_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_bring_to_front': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_visible': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_curve_uuids_for_vertices': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_info': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_vertex_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'plane_intersect_and_project': <pydantic._internal._model_construction._PydanticWeakRef object>, 'plane_set_color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'reconfigure_stream': <pydantic._internal._model_construction._PydanticWeakRef object>, 'remove_scene_objects': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'send_object': <pydantic._internal._model_construction._PydanticWeakRef object>, 'set_tool': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_disable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_enable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid2d_add_hole': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_edge_faces': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_opposite_edges': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_next_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_opposite_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_prev_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'take_snapshot': <pydantic._internal._model_construction._PydanticWeakRef object>, 'update_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556fd1b40,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "material_density_unit": SerField {                         key_py: Py(                             0x00007fffe14cde90,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             JsonOrPython(                                 JsonOrPythonSerializer {                                     json: Str(                                         StrSerializer,                                     ),                                     python: Any(                                         AnySerializer,                                     ),                                     name: "json-or-python[json=str, python=any]",                                 },                             ),                         ),                         required: true,                     },                     "output_unit": SerField {                         key_py: Py(                             0x00007fffe14f4170,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             JsonOrPython(                                 JsonOrPythonSerializer {                                     json: Str(                                         StrSerializer,                                     ),                                     python: Any(                                         AnySerializer,                                     ),                                     name: "json-or-python[json=str, python=any]",                                 },                             ),                         ),                         required: true,                     },                     "entity_ids": SerField {                         key_py: Py(                             0x00007fffe118cc70,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             List(                                 ListSerializer {                                     item_serializer: Str(                                         StrSerializer,                                     ),                                     filter: SchemaFilter {                                         include: None,                                         exclude: None,                                     },                                     name: "list[str]",                                 },                             ),                         ),                         required: true,                     },                     "material_density": SerField {                         key_py: Py(                             0x00007fffe14cdee0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Float(                                 FloatSerializer {                                     inf_nan_mode: Null,                                 },                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe1c7b870,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "mass",                                             },                                             expected_py: None,                                             name: "literal['mass']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                     "source_unit": SerField {                         key_py: Py(                             0x00007fffe10dd370,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             JsonOrPython(                                 JsonOrPythonSerializer {                                     json: Str(                                         StrSerializer,                                     ),                                     python: Any(                                         AnySerializer,                                     ),                                     name: "json-or-python[json=str, python=any]",                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 6,             },         ),         has_extra: false,         root_model: false,         name: "mass",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="mass", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "entity_ids",                         lookup_key: Simple {                             key: "entity_ids",                             py_key: Py(                                 0x00007fffe118cc70,                             ),                             path: LookupPath(                                 [                                     S(                                         "entity_ids",                                         Py(                                             0x00007fffe118cc70,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe118cc70,                         ),                         validator: List(                             ListValidator {                                 strict: false,                                 item_validator: Some(                                     Str(                                         StrValidator {                                             strict: false,                                             coerce_numbers_to_str: false,                                         },                                     ),                                 ),                                 min_length: None,                                 max_length: None,                                 name: OnceLock(                                     <uninit>,                                 ),                             },                         ),                         frozen: false,                     },                     Field {                         name: "material_density",                         lookup_key: Simple {                             key: "material_density",                             py_key: Py(                                 0x00007fffe14cdee0,                             ),                             path: LookupPath(                                 [                                     S(                                         "material_density",                                         Py(                                             0x00007fffe14cdee0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe14cdee0,                         ),                         validator: Float(                             FloatValidator {                                 strict: false,                                 allow_inf_nan: true,                             },                         ),                         frozen: false,                     },                     Field {                         name: "material_density_unit",                         lookup_key: Simple {                             key: "material_density_unit",                             py_key: Py(                                 0x00007fffe14cde90,                             ),                             path: LookupPath(                                 [                                     S(                                         "material_density_unit",                                         Py(                                             0x00007fffe14cde90,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe14cde90,                         ),                         validator: LaxOrStrict(                             LaxOrStrictValidator {                                 strict: false,                                 lax_validator: Chain(                                     ChainValidator {                                         steps: [                                             Str(                                                 StrValidator {                                                     strict: false,                                                     coerce_numbers_to_str: false,                                                 },                                             ),                                             FunctionPlain(                                                 FunctionPlainValidator {                                                     func: Py(                                                         0x00007fffe0ee0a60,                                                     ),                                                     config: Py(                                                         0x00007fffe0e4d500,                                                     ),                                                     name: "function-plain[to_enum()]",                                                     field_name: None,                                                     info_arg: false,                                                 },                                             ),                                         ],                                         name: "chain[str,function-plain[to_enum()]]",                                     },                                 ),                                 strict_validator: JsonOrPython(                                     JsonOrPython {                                         json: FunctionAfter(                                             FunctionAfterValidator {                                                 validator: Str(                                                     StrValidator {                                                         strict: false,                                                         coerce_numbers_to_str: false,                                                     },                                                 ),                                                 func: Py(                                                     0x00007fffe0ee0a60,                                                 ),                                                 config: Py(                                                     0x00007fffe0e4d500,                                                 ),                                                 name: "function-after[to_enum(), str]",                                                 field_name: None,                                                 info_arg: false,                                             },                                         ),                                         python: IsInstance(                                             IsInstanceValidator {                                                 class: Py(                                                     0x0000555556b667c0,                                                 ),                                                 class_repr: "UnitDensity",                                                 name: "is-instance[UnitDensity]",                                             },                                         ),                                         name: "json-or-python[json=function-after[to_enum(), str],python=is-instance[UnitDensity]]",                                     },                                 ),                                 name: "lax-or-strict[lax=chain[str,function-plain[to_enum()]],strict=json-or-python[json=function-after[to_enum(), str],python=is-instance[UnitDensity]]]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "output_unit",                         lookup_key: Simple {                             key: "output_unit",                             py_key: Py(                                 0x00007fffe14f4170,                             ),                             path: LookupPath(                                 [                                     S(                                         "output_unit",                                         Py(                                             0x00007fffe14f4170,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe14f4170,                         ),                         validator: LaxOrStrict(                             LaxOrStrictValidator {                                 strict: false,                                 lax_validator: Chain(                                     ChainValidator {                                         steps: [                                             Str(                                                 StrValidator {                                                     strict: false,                                                     coerce_numbers_to_str: false,                                                 },                                             ),                                             FunctionPlain(                                                 FunctionPlainValidator {                                                     func: Py(                                                         0x00007fffe0ea04c0,                                                     ),                                                     config: Py(                                                         0x00007fffe0e4d500,                                                     ),                                                     name: "function-plain[to_enum()]",                                                     field_name: None,                                                     info_arg: false,                                                 },                                             ),                                         ],                                         name: "chain[str,function-plain[to_enum()]]",                                     },                                 ),                                 strict_validator: JsonOrPython(                                     JsonOrPython {                                         json: FunctionAfter(                                             FunctionAfterValidator {                                                 validator: Str(                                                     StrValidator {                                                         strict: false,                                                         coerce_numbers_to_str: false,                                                     },                                                 ),                                                 func: Py(                                                     0x00007fffe0ea04c0,                                                 ),                                                 config: Py(                                                     0x00007fffe0e4d500,                                                 ),                                                 name: "function-after[to_enum(), str]",                                                 field_name: None,                                                 info_arg: false,                                             },                                         ),                                         python: IsInstance(                                             IsInstanceValidator {                                                 class: Py(                                                     0x0000555556b66b70,                                                 ),                                                 class_repr: "UnitMass",                                                 name: "is-instance[UnitMass]",                                             },                                         ),                                         name: "json-or-python[json=function-after[to_enum(), str],python=is-instance[UnitMass]]",                                     },                                 ),                                 name: "lax-or-strict[lax=chain[str,function-plain[to_enum()]],strict=json-or-python[json=function-after[to_enum(), str],python=is-instance[UnitMass]]]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "source_unit",                         lookup_key: Simple {                             key: "source_unit",                             py_key: Py(                                 0x00007fffe10dd370,                             ),                             path: LookupPath(                                 [                                     S(                                         "source_unit",                                         Py(                                             0x00007fffe10dd370,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe10dd370,                         ),                         validator: LaxOrStrict(                             LaxOrStrictValidator {                                 strict: false,                                 lax_validator: Chain(                                     ChainValidator {                                         steps: [                                             Str(                                                 StrValidator {                                                     strict: false,                                                     coerce_numbers_to_str: false,                                                 },                                             ),                                             FunctionPlain(                                                 FunctionPlainValidator {                                                     func: Py(                                                         0x00007fffe0ea01f0,                                                     ),                                                     config: Py(                                                         0x00007fffe0e4d500,                                                     ),                                                     name: "function-plain[to_enum()]",                                                     field_name: None,                                                     info_arg: false,                                                 },                                             ),                                         ],                                         name: "chain[str,function-plain[to_enum()]]",                                     },                                 ),                                 strict_validator: JsonOrPython(                                     JsonOrPython {                                         json: FunctionAfter(                                             FunctionAfterValidator {                                                 validator: Str(                                                     StrValidator {                                                         strict: false,                                                         coerce_numbers_to_str: false,                                                     },                                                 ),                                                 func: Py(                                                     0x00007fffe0ea01f0,                                                 ),                                                 config: Py(                                                     0x00007fffe0e4d500,                                                 ),                                                 name: "function-after[to_enum(), str]",                                                 field_name: None,                                                 info_arg: false,                                             },                                         ),                                         python: IsInstance(                                             IsInstanceValidator {                                                 class: Py(                                                     0x0000555556aac630,                                                 ),                                                 class_repr: "UnitLength",                                                 name: "is-instance[UnitLength]",                                             },                                         ),                                         name: "json-or-python[json=function-after[to_enum(), str],python=is-instance[UnitLength]]",                                     },                                 ),                                 name: "lax-or-strict[lax=chain[str,function-plain[to_enum()]],strict=json-or-python[json=function-after[to_enum(), str],python=is-instance[UnitLength]]]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe1c7b870,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "mass": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe1c7b870,                                                 ),                                             ],                                         },                                         expected_repr: "'mass'",                                         name: "literal['mass']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['mass']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "mass",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556fd1b40,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "mass",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, entity_ids: List[str], material_density: float, material_density_unit: kittycad.models.unit_density.UnitDensity, output_unit: kittycad.models.unit_mass.UnitMass, source_unit: kittycad.models.unit_length.UnitLength, type: Literal['mass'] = 'mass') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

entity_ids: List[str][source]
classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

material_density: float[source]
material_density_unit: UnitDensity[source]
property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'entity_ids': FieldInfo(annotation=List[str], required=True), 'material_density': FieldInfo(annotation=float, required=True), 'material_density_unit': FieldInfo(annotation=UnitDensity, required=True), 'output_unit': FieldInfo(annotation=UnitMass, required=True), 'source_unit': FieldInfo(annotation=UnitLength, required=True), 'type': FieldInfo(annotation=Literal['mass'], required=False, default='mass')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

output_unit: UnitMass[source]
classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

source_unit: UnitLength[source]
type: Literal['mass'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.mouse_click(**data)[source][source]

Send a mouse click event. Updates modified/selected entities.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'type': typing.Literal['mouse_click'], 'window': <class 'kittycad.models.point2d.Point2d'>}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'type': FieldInfo(annotation=Literal['mouse_click'], required=False, default='mouse_click'), 'window': FieldInfo(annotation=Point2d, required=True)}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.mouse_click'>, 'config': {'title': 'mouse_click'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.mouse_click'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.mouse_click'>>]}, 'ref': 'kittycad.models.modeling_cmd.mouse_click:93825019720432', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'mouse_click', 'schema': {'expected': ['mouse_click'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}, 'window': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'cls': <class 'kittycad.models.point2d.Point2d'>, 'config': {'title': 'Point2d'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.point2d.Point2d'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.point2d.Point2d'>>]}, 'ref': 'kittycad.models.point2d.Point2d:93825018798944', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'x': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}, 'y': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}}, 'model_name': 'Point2d', 'type': 'model-fields'}, 'type': 'model'}, 'type': 'model-field'}}, 'model_name': 'mouse_click', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_fade': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_set_opacity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'get_entity_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entities': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_plane': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'new_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_bring_to_front': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_visible': <pydantic._internal._model_construction._PydanticWeakRef object>, 'plane_set_color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'send_object': <pydantic._internal._model_construction._PydanticWeakRef object>, 'set_tool': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid2d_add_hole': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_edge_faces': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_opposite_edges': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_next_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_opposite_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_prev_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'update_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556f8b2f0,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe1c7b0b0,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "mouse_click",                                             },                                             expected_py: None,                                             name: "literal['mouse_click']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                     "window": SerField {                         key_py: Py(                             0x00007ffffdca04f0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Model(                                 ModelSerializer {                                     class: Py(                                         0x0000555556eaa360,                                     ),                                     serializer: Fields(                                         GeneralFieldsSerializer {                                             fields: {                                                 "x": SerField {                                                     key_py: Py(                                                         0x00007fffff8fe870,                                                     ),                                                     alias: None,                                                     alias_py: None,                                                     serializer: Some(                                                         Float(                                                             FloatSerializer {                                                                 inf_nan_mode: Null,                                                             },                                                         ),                                                     ),                                                     required: true,                                                 },                                                 "y": SerField {                                                     key_py: Py(                                                         0x00007fffff72a730,                                                     ),                                                     alias: None,                                                     alias_py: None,                                                     serializer: Some(                                                         Float(                                                             FloatSerializer {                                                                 inf_nan_mode: Null,                                                             },                                                         ),                                                     ),                                                     required: true,                                                 },                                             },                                             computed_fields: Some(                                                 ComputedFields(                                                     [],                                                 ),                                             ),                                             mode: SimpleDict,                                             extra_serializer: None,                                             filter: SchemaFilter {                                                 include: None,                                                 exclude: None,                                             },                                             required_fields: 2,                                         },                                     ),                                     has_extra: false,                                     root_model: false,                                     name: "Point2d",                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 2,             },         ),         has_extra: false,         root_model: false,         name: "mouse_click",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="mouse_click", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe1c7b0b0,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "mouse_click": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe1c7b0b0,                                                 ),                                             ],                                         },                                         expected_repr: "'mouse_click'",                                         name: "literal['mouse_click']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['mouse_click']]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "window",                         lookup_key: Simple {                             key: "window",                             py_key: Py(                                 0x00007ffffdca04f0,                             ),                             path: LookupPath(                                 [                                     S(                                         "window",                                         Py(                                             0x00007ffffdca04f0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007ffffdca04f0,                         ),                         validator: Model(                             ModelValidator {                                 revalidate: Never,                                 validator: ModelFields(                                     ModelFieldsValidator {                                         fields: [                                             Field {                                                 name: "x",                                                 lookup_key: Simple {                                                     key: "x",                                                     py_key: Py(                                                         0x00007fffff8fe870,                                                     ),                                                     path: LookupPath(                                                         [                                                             S(                                                                 "x",                                                                 Py(                                                                     0x00007fffff8fe870,                                                                 ),                                                             ),                                                         ],                                                     ),                                                 },                                                 name_py: Py(                                                     0x00007fffff8fe870,                                                 ),                                                 validator: Float(                                                     FloatValidator {                                                         strict: false,                                                         allow_inf_nan: true,                                                     },                                                 ),                                                 frozen: false,                                             },                                             Field {                                                 name: "y",                                                 lookup_key: Simple {                                                     key: "y",                                                     py_key: Py(                                                         0x00007fffff72a730,                                                     ),                                                     path: LookupPath(                                                         [                                                             S(                                                                 "y",                                                                 Py(                                                                     0x00007fffff72a730,                                                                 ),                                                             ),                                                         ],                                                     ),                                                 },                                                 name_py: Py(                                                     0x00007fffff72a730,                                                 ),                                                 validator: Float(                                                     FloatValidator {                                                         strict: false,                                                         allow_inf_nan: true,                                                     },                                                 ),                                                 frozen: false,                                             },                                         ],                                         model_name: "Point2d",                                         extra_behavior: Ignore,                                         extras_validator: None,                                         strict: false,                                         from_attributes: false,                                         loc_by_alias: true,                                     },                                 ),                                 class: Py(                                     0x0000555556eaa360,                                 ),                                 post_init: None,                                 frozen: false,                                 custom_init: false,                                 root_model: false,                                 name: "Point2d",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "mouse_click",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556f8b2f0,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "mouse_click",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, type: Literal['mouse_click'] = 'mouse_click', window: kittycad.models.point2d.Point2d) -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'type': FieldInfo(annotation=Literal['mouse_click'], required=False, default='mouse_click'), 'window': FieldInfo(annotation=Point2d, required=True)}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['mouse_click'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

window: Point2d[source]
class kittycad.models.modeling_cmd.mouse_move(**data)[source][source]

Send a mouse move event.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'sequence': typing.Optional[int], 'type': typing.Literal['mouse_move'], 'window': <class 'kittycad.models.point2d.Point2d'>}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'sequence': FieldInfo(annotation=Union[int, NoneType], required=False), 'type': FieldInfo(annotation=Literal['mouse_move'], required=False, default='mouse_move'), 'window': FieldInfo(annotation=Point2d, required=True)}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.mouse_move'>, 'config': {'title': 'mouse_move'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.mouse_move'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.mouse_move'>>]}, 'ref': 'kittycad.models.modeling_cmd.mouse_move:93825019704880', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'sequence': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': None, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'int'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'mouse_move', 'schema': {'expected': ['mouse_move'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}, 'window': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'cls': <class 'kittycad.models.point2d.Point2d'>, 'config': {'title': 'Point2d'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.point2d.Point2d'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.point2d.Point2d'>>]}, 'ref': 'kittycad.models.point2d.Point2d:93825018798944', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'x': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}, 'y': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}}, 'model_name': 'Point2d', 'type': 'model-fields'}, 'type': 'model'}, 'type': 'model-field'}}, 'model_name': 'mouse_move', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_fade': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_set_opacity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'get_entity_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entities': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_plane': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'new_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_bring_to_front': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_visible': <pydantic._internal._model_construction._PydanticWeakRef object>, 'plane_set_color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'send_object': <pydantic._internal._model_construction._PydanticWeakRef object>, 'set_tool': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid2d_add_hole': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_edge_faces': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_opposite_edges': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_next_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_opposite_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_prev_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'update_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556f87630,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "window": SerField {                         key_py: Py(                             0x00007ffffdca04f0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Model(                                 ModelSerializer {                                     class: Py(                                         0x0000555556eaa360,                                     ),                                     serializer: Fields(                                         GeneralFieldsSerializer {                                             fields: {                                                 "x": SerField {                                                     key_py: Py(                                                         0x00007fffff8fe870,                                                     ),                                                     alias: None,                                                     alias_py: None,                                                     serializer: Some(                                                         Float(                                                             FloatSerializer {                                                                 inf_nan_mode: Null,                                                             },                                                         ),                                                     ),                                                     required: true,                                                 },                                                 "y": SerField {                                                     key_py: Py(                                                         0x00007fffff72a730,                                                     ),                                                     alias: None,                                                     alias_py: None,                                                     serializer: Some(                                                         Float(                                                             FloatSerializer {                                                                 inf_nan_mode: Null,                                                             },                                                         ),                                                     ),                                                     required: true,                                                 },                                             },                                             computed_fields: Some(                                                 ComputedFields(                                                     [],                                                 ),                                             ),                                             mode: SimpleDict,                                             extra_serializer: None,                                             filter: SchemaFilter {                                                 include: None,                                                 exclude: None,                                             },                                             required_fields: 2,                                         },                                     ),                                     has_extra: false,                                     root_model: false,                                     name: "Point2d",                                 },                             ),                         ),                         required: true,                     },                     "sequence": SerField {                         key_py: Py(                             0x00007fffff11ecf0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007ffffff85420,                                         ),                                     ),                                     serializer: Nullable(                                         NullableSerializer {                                             serializer: Int(                                                 IntSerializer,                                             ),                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe24a4b30,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "mouse_move",                                             },                                             expected_py: None,                                             name: "literal['mouse_move']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 3,             },         ),         has_extra: false,         root_model: false,         name: "mouse_move",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="mouse_move", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "sequence",                         lookup_key: Simple {                             key: "sequence",                             py_key: Py(                                 0x00007fffff11ecf0,                             ),                             path: LookupPath(                                 [                                     S(                                         "sequence",                                         Py(                                             0x00007fffff11ecf0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff11ecf0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007ffffff85420,                                     ),                                 ),                                 on_error: Raise,                                 validator: Nullable(                                     NullableValidator {                                         validator: Int(                                             IntValidator {                                                 strict: false,                                             },                                         ),                                         name: "nullable[int]",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[nullable[int]]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe24a4b30,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "mouse_move": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe24a4b30,                                                 ),                                             ],                                         },                                         expected_repr: "'mouse_move'",                                         name: "literal['mouse_move']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['mouse_move']]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "window",                         lookup_key: Simple {                             key: "window",                             py_key: Py(                                 0x00007ffffdca04f0,                             ),                             path: LookupPath(                                 [                                     S(                                         "window",                                         Py(                                             0x00007ffffdca04f0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007ffffdca04f0,                         ),                         validator: Model(                             ModelValidator {                                 revalidate: Never,                                 validator: ModelFields(                                     ModelFieldsValidator {                                         fields: [                                             Field {                                                 name: "x",                                                 lookup_key: Simple {                                                     key: "x",                                                     py_key: Py(                                                         0x00007fffff8fe870,                                                     ),                                                     path: LookupPath(                                                         [                                                             S(                                                                 "x",                                                                 Py(                                                                     0x00007fffff8fe870,                                                                 ),                                                             ),                                                         ],                                                     ),                                                 },                                                 name_py: Py(                                                     0x00007fffff8fe870,                                                 ),                                                 validator: Float(                                                     FloatValidator {                                                         strict: false,                                                         allow_inf_nan: true,                                                     },                                                 ),                                                 frozen: false,                                             },                                             Field {                                                 name: "y",                                                 lookup_key: Simple {                                                     key: "y",                                                     py_key: Py(                                                         0x00007fffff72a730,                                                     ),                                                     path: LookupPath(                                                         [                                                             S(                                                                 "y",                                                                 Py(                                                                     0x00007fffff72a730,                                                                 ),                                                             ),                                                         ],                                                     ),                                                 },                                                 name_py: Py(                                                     0x00007fffff72a730,                                                 ),                                                 validator: Float(                                                     FloatValidator {                                                         strict: false,                                                         allow_inf_nan: true,                                                     },                                                 ),                                                 frozen: false,                                             },                                         ],                                         model_name: "Point2d",                                         extra_behavior: Ignore,                                         extras_validator: None,                                         strict: false,                                         from_attributes: false,                                         loc_by_alias: true,                                     },                                 ),                                 class: Py(                                     0x0000555556eaa360,                                 ),                                 post_init: None,                                 frozen: false,                                 custom_init: false,                                 root_model: false,                                 name: "Point2d",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "mouse_move",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556f87630,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "mouse_move",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, sequence: Optional[int] = None, type: Literal['mouse_move'] = 'mouse_move', window: kittycad.models.point2d.Point2d) -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'sequence': FieldInfo(annotation=Union[int, NoneType], required=False), 'type': FieldInfo(annotation=Literal['mouse_move'], required=False, default='mouse_move'), 'window': FieldInfo(annotation=Point2d, required=True)}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

sequence: Optional[int][source]
type: Literal['mouse_move'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

window: Point2d[source]
class kittycad.models.modeling_cmd.move_path_pen(**data)[source][source]

Move the path’s “pen”.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'path': <class 'kittycad.models.modeling_cmd_id.ModelingCmdId'>, 'to': <class 'kittycad.models.point3d.Point3d'>, 'type': typing.Literal['move_path_pen']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'path': FieldInfo(annotation=ModelingCmdId, required=True), 'to': FieldInfo(annotation=Point3d, required=True), 'type': FieldInfo(annotation=Literal['move_path_pen'], required=False, default='move_path_pen')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.move_path_pen'>, 'config': {'title': 'move_path_pen'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.move_path_pen'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.move_path_pen'>>]}, 'ref': 'kittycad.models.modeling_cmd.move_path_pen:93825018715376', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'path': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'function': {'function': <class 'kittycad.models.modeling_cmd_id.ModelingCmdId'>, 'type': 'no-info'}, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'function-after'}, 'type': 'model-field'}, 'to': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'cls': <class 'kittycad.models.point3d.Point3d'>, 'config': {'title': 'Point3d'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.point3d.Point3d'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.point3d.Point3d'>>]}, 'ref': 'kittycad.models.point3d.Point3d:93825014233264', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'x': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}, 'y': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}, 'z': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}}, 'model_name': 'Point3d', 'type': 'model-fields'}, 'type': 'model'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'move_path_pen', 'schema': {'expected': ['move_path_pen'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'move_path_pen', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556e95cf0,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "to": SerField {                         key_py: Py(                             0x00007fffff70e470,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Model(                                 ModelSerializer {                                     class: Py(                                         0x0000555556a4f8b0,                                     ),                                     serializer: Fields(                                         GeneralFieldsSerializer {                                             fields: {                                                 "y": SerField {                                                     key_py: Py(                                                         0x00007fffff72a730,                                                     ),                                                     alias: None,                                                     alias_py: None,                                                     serializer: Some(                                                         Float(                                                             FloatSerializer {                                                                 inf_nan_mode: Null,                                                             },                                                         ),                                                     ),                                                     required: true,                                                 },                                                 "z": SerField {                                                     key_py: Py(                                                         0x00007fffff72a770,                                                     ),                                                     alias: None,                                                     alias_py: None,                                                     serializer: Some(                                                         Float(                                                             FloatSerializer {                                                                 inf_nan_mode: Null,                                                             },                                                         ),                                                     ),                                                     required: true,                                                 },                                                 "x": SerField {                                                     key_py: Py(                                                         0x00007fffff8fe870,                                                     ),                                                     alias: None,                                                     alias_py: None,                                                     serializer: Some(                                                         Float(                                                             FloatSerializer {                                                                 inf_nan_mode: Null,                                                             },                                                         ),                                                     ),                                                     required: true,                                                 },                                             },                                             computed_fields: Some(                                                 ComputedFields(                                                     [],                                                 ),                                             ),                                             mode: SimpleDict,                                             extra_serializer: None,                                             filter: SchemaFilter {                                                 include: None,                                                 exclude: None,                                             },                                             required_fields: 3,                                         },                                     ),                                     has_extra: false,                                     root_model: false,                                     name: "Point3d",                                 },                             ),                         ),                         required: true,                     },                     "path": SerField {                         key_py: Py(                             0x00007fffff952230,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Str(                                 StrSerializer,                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe11181f0,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "move_path_pen",                                             },                                             expected_py: None,                                             name: "literal['move_path_pen']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 3,             },         ),         has_extra: false,         root_model: false,         name: "move_path_pen",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="move_path_pen", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "path",                         lookup_key: Simple {                             key: "path",                             py_key: Py(                                 0x00007fffff952230,                             ),                             path: LookupPath(                                 [                                     S(                                         "path",                                         Py(                                             0x00007fffff952230,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff952230,                         ),                         validator: FunctionAfter(                             FunctionAfterValidator {                                 validator: Str(                                     StrValidator {                                         strict: false,                                         coerce_numbers_to_str: false,                                     },                                 ),                                 func: Py(                                     0x0000555556ea9850,                                 ),                                 config: Py(                                     0x00007fffe1044a40,                                 ),                                 name: "function-after[ModelingCmdId(), str]",                                 field_name: None,                                 info_arg: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "to",                         lookup_key: Simple {                             key: "to",                             py_key: Py(                                 0x00007fffff70e470,                             ),                             path: LookupPath(                                 [                                     S(                                         "to",                                         Py(                                             0x00007fffff70e470,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff70e470,                         ),                         validator: Model(                             ModelValidator {                                 revalidate: Never,                                 validator: ModelFields(                                     ModelFieldsValidator {                                         fields: [                                             Field {                                                 name: "x",                                                 lookup_key: Simple {                                                     key: "x",                                                     py_key: Py(                                                         0x00007fffff8fe870,                                                     ),                                                     path: LookupPath(                                                         [                                                             S(                                                                 "x",                                                                 Py(                                                                     0x00007fffff8fe870,                                                                 ),                                                             ),                                                         ],                                                     ),                                                 },                                                 name_py: Py(                                                     0x00007fffff8fe870,                                                 ),                                                 validator: Float(                                                     FloatValidator {                                                         strict: false,                                                         allow_inf_nan: true,                                                     },                                                 ),                                                 frozen: false,                                             },                                             Field {                                                 name: "y",                                                 lookup_key: Simple {                                                     key: "y",                                                     py_key: Py(                                                         0x00007fffff72a730,                                                     ),                                                     path: LookupPath(                                                         [                                                             S(                                                                 "y",                                                                 Py(                                                                     0x00007fffff72a730,                                                                 ),                                                             ),                                                         ],                                                     ),                                                 },                                                 name_py: Py(                                                     0x00007fffff72a730,                                                 ),                                                 validator: Float(                                                     FloatValidator {                                                         strict: false,                                                         allow_inf_nan: true,                                                     },                                                 ),                                                 frozen: false,                                             },                                             Field {                                                 name: "z",                                                 lookup_key: Simple {                                                     key: "z",                                                     py_key: Py(                                                         0x00007fffff72a770,                                                     ),                                                     path: LookupPath(                                                         [                                                             S(                                                                 "z",                                                                 Py(                                                                     0x00007fffff72a770,                                                                 ),                                                             ),                                                         ],                                                     ),                                                 },                                                 name_py: Py(                                                     0x00007fffff72a770,                                                 ),                                                 validator: Float(                                                     FloatValidator {                                                         strict: false,                                                         allow_inf_nan: true,                                                     },                                                 ),                                                 frozen: false,                                             },                                         ],                                         model_name: "Point3d",                                         extra_behavior: Ignore,                                         extras_validator: None,                                         strict: false,                                         from_attributes: false,                                         loc_by_alias: true,                                     },                                 ),                                 class: Py(                                     0x0000555556a4f8b0,                                 ),                                 post_init: None,                                 frozen: false,                                 custom_init: false,                                 root_model: false,                                 name: "Point3d",                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe11181f0,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "move_path_pen": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe11181f0,                                                 ),                                             ],                                         },                                         expected_repr: "'move_path_pen'",                                         name: "literal['move_path_pen']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['move_path_pen']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "move_path_pen",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556e95cf0,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "move_path_pen",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, path: kittycad.models.modeling_cmd_id.ModelingCmdId, to: kittycad.models.point3d.Point3d, type: Literal['move_path_pen'] = 'move_path_pen') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'path': FieldInfo(annotation=ModelingCmdId, required=True), 'to': FieldInfo(annotation=Point3d, required=True), 'type': FieldInfo(annotation=Literal['move_path_pen'], required=False, default='move_path_pen')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

path: ModelingCmdId[source]
classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

to: Point3d[source]
type: Literal['move_path_pen'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.new_annotation(**data)[source][source]

Create a new annotation

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'annotation_type': <enum 'AnnotationType'>, 'clobber': <class 'bool'>, 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'options': <class 'kittycad.models.annotation_options.AnnotationOptions'>, 'type': typing.Literal['new_annotation']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'annotation_type': FieldInfo(annotation=AnnotationType, required=True), 'clobber': FieldInfo(annotation=bool, required=True), 'options': FieldInfo(annotation=AnnotationOptions, required=True), 'type': FieldInfo(annotation=Literal['new_annotation'], required=False, default='new_annotation')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'definitions': [{'type': 'lax-or-strict', 'lax_schema': {'type': 'chain', 'steps': [{'type': 'str'}, {'type': 'function-plain', 'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}}]}, 'strict_schema': {'type': 'json-or-python', 'json_schema': {'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}, 'schema': {'type': 'str'}, 'type': 'function-after'}, 'python_schema': {'type': 'is-instance', 'cls': <enum 'AnnotationLineEnd'>}}, 'ref': 'kittycad.models.annotation_line_end.AnnotationLineEnd:93825014183648', 'metadata': {'pydantic_js_functions': [<function get_enum_core_schema.<locals>.get_json_schema>], 'pydantic.internal.needs_apply_discriminated_union': False}}], 'schema': {'cls': <class 'kittycad.models.modeling_cmd.new_annotation'>, 'config': {'title': 'new_annotation'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.new_annotation'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.new_annotation'>>]}, 'ref': 'kittycad.models.modeling_cmd.new_annotation:93825019352640', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'annotation_type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'lax_schema': {'steps': [{'type': 'str'}, {'type': 'function-plain', 'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}}], 'type': 'chain'}, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_functions': [<function get_enum_core_schema.<locals>.get_json_schema>]}, 'ref': 'kittycad.models.annotation_type.AnnotationType:93825014281664', 'strict_schema': {'json_schema': {'function': {'function': <function get_enum_core_schema.<locals>.to_enum>, 'type': 'no-info'}, 'schema': {'type': 'str'}, 'type': 'function-after'}, 'python_schema': {'cls': <enum 'AnnotationType'>, 'type': 'is-instance'}, 'type': 'json-or-python'}, 'type': 'lax-or-strict'}, 'type': 'model-field'}, 'clobber': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'bool'}, 'type': 'model-field'}, 'options': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'cls': <class 'kittycad.models.annotation_options.AnnotationOptions'>, 'config': {'title': 'AnnotationOptions'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.annotation_options.AnnotationOptions'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.annotation_options.AnnotationOptions'>>]}, 'ref': 'kittycad.models.annotation_options.AnnotationOptions:93825014241216', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'color': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': None, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'schema': {'cls': <class 'kittycad.models.color.Color'>, 'config': {'title': 'Color'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.color.Color'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.color.Color'>>]}, 'ref': 'kittycad.models.color.Color:93825013450848', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'a': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}, 'b': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}, 'g': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}, 'r': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}}, 'model_name': 'Color', 'type': 'model-fields'}, 'type': 'model'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'line_ends': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': None, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'schema': {'cls': <class 'kittycad.models.annotation_line_end_options.AnnotationLineEndOptions'>, 'config': {'title': 'AnnotationLineEndOptions'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.annotation_line_end_options.AnnotationLineEndOptions'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.annotation_line_end_options.AnnotationLineEndOptions'>>]}, 'ref': 'kittycad.models.annotation_line_end_options.AnnotationLineEndOptions:93825014184640', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'end': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'schema_ref': 'kittycad.models.annotation_line_end.AnnotationLineEnd:93825014183648', 'type': 'definition-ref'}, 'type': 'model-field'}, 'start': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'schema_ref': 'kittycad.models.annotation_line_end.AnnotationLineEnd:93825014183648', 'type': 'definition-ref'}, 'type': 'model-field'}}, 'model_name': 'AnnotationLineEndOptions', 'type': 'model-fields'}, 'type': 'model'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'line_width': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': None, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'position': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': None, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'schema': {'cls': <class 'kittycad.models.point3d.Point3d'>, 'config': {'title': 'Point3d'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.point3d.Point3d'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.point3d.Point3d'>>]}, 'ref': 'kittycad.models.point3d.Point3d:93825014233264', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'x': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}, 'y': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}, 'z': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}}, 'model_name': 'Point3d', 'type': 'model-fields'}, 'type': 'model'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'text': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': None, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'schema': {'cls': <class 'kittycad.models.annotation_text_options.AnnotationTextOptions'>, 'config': {'title': 'AnnotationTextOptions'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.annotation_text_options.AnnotationTextOptions'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.annotation_text_options.AnnotationTextOptions'>>]}, 'ref': 'kittycad.models.annotation_text_options.AnnotationTextOptions:93825014200064', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'point_size': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'int'}, 'type': 'model-field'}, 'text': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'model-field'}, 'x': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'lax_schema': {'steps': [{'type': 'str'}, {'type': 'function-plain', 'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}}], 'type': 'chain'}, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_functions': [<function get_enum_core_schema.<locals>.get_json_schema>]}, 'ref': 'kittycad.models.annotation_text_alignment_x.AnnotationTextAlignmentX:93825014201904', 'strict_schema': {'json_schema': {'function': {'function': <function get_enum_core_schema.<locals>.to_enum>, 'type': 'no-info'}, 'schema': {'type': 'str'}, 'type': 'function-after'}, 'python_schema': {'cls': <enum 'AnnotationTextAlignmentX'>, 'type': 'is-instance'}, 'type': 'json-or-python'}, 'type': 'lax-or-strict'}, 'type': 'model-field'}, 'y': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'lax_schema': {'steps': [{'type': 'str'}, {'type': 'function-plain', 'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}}], 'type': 'chain'}, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_functions': [<function get_enum_core_schema.<locals>.get_json_schema>]}, 'ref': 'kittycad.models.annotation_text_alignment_y.AnnotationTextAlignmentY:93825014197936', 'strict_schema': {'json_schema': {'function': {'function': <function get_enum_core_schema.<locals>.to_enum>, 'type': 'no-info'}, 'schema': {'type': 'str'}, 'type': 'function-after'}, 'python_schema': {'cls': <enum 'AnnotationTextAlignmentY'>, 'type': 'is-instance'}, 'type': 'json-or-python'}, 'type': 'lax-or-strict'}, 'type': 'model-field'}}, 'model_name': 'AnnotationTextOptions', 'type': 'model-fields'}, 'type': 'model'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'AnnotationOptions', 'type': 'model-fields'}, 'type': 'model'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'new_annotation', 'schema': {'expected': ['new_annotation'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'new_annotation', 'type': 'model-fields'}, 'type': 'model'}, 'type': 'definitions'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entities': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556f31640,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "annotation_type": SerField {                         key_py: Py(                             0x00007fffe1c8dc70,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             JsonOrPython(                                 JsonOrPythonSerializer {                                     json: Str(                                         StrSerializer,                                     ),                                     python: Any(                                         AnySerializer,                                     ),                                     name: "json-or-python[json=str, python=any]",                                 },                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe10db570,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "new_annotation",                                             },                                             expected_py: None,                                             name: "literal['new_annotation']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                     "clobber": SerField {                         key_py: Py(                             0x00007fffe10db070,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Bool(                                 BoolSerializer,                             ),                         ),                         required: true,                     },                     "options": SerField {                         key_py: Py(                             0x00007fffff67d970,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Model(                                 ModelSerializer {                                     class: Py(                                         0x0000555556a517c0,                                     ),                                     serializer: Fields(                                         GeneralFieldsSerializer {                                             fields: {                                                 "color": SerField {                                                     key_py: Py(                                                         0x00007fffff6e21b0,                                                     ),                                                     alias: None,                                                     alias_py: None,                                                     serializer: Some(                                                         WithDefault(                                                             WithDefaultSerializer {                                                                 default: Default(                                                                     Py(                                                                         0x00007ffffff85420,                                                                     ),                                                                 ),                                                                 serializer: Nullable(                                                                     NullableSerializer {                                                                         serializer: Model(                                                                             ModelSerializer {                                                                                 class: Py(                                                                                     0x0000555556990860,                                                                                 ),                                                                                 serializer: Fields(                                                                                     GeneralFieldsSerializer {                                                                                         fields: {                                                                                             "b": SerField {                                                                                                 key_py: Py(                                                                                                     0x00007fffff86b330,                                                                                                 ),                                                                                                 alias: None,                                                                                                 alias_py: None,                                                                                                 serializer: Some(                                                                                                     Float(                                                                                                         FloatSerializer {                                                                                                             inf_nan_mode: Null,                                                                                                         },                                                                                                     ),                                                                                                 ),                                                                                                 required: true,                                                                                             },                                                                                             "g": SerField {                                                                                                 key_py: Py(                                                                                                     0x00007fffff858bb0,                                                                                                 ),                                                                                                 alias: None,                                                                                                 alias_py: None,                                                                                                 serializer: Some(                                                                                                     Float(                                                                                                         FloatSerializer {                                                                                                             inf_nan_mode: Null,                                                                                                         },                                                                                                     ),                                                                                                 ),                                                                                                 required: true,                                                                                             },                                                                                             "a": SerField {                                                                                                 key_py: Py(                                                                                                     0x00007fffff82fa70,                                                                                                 ),                                                                                                 alias: None,                                                                                                 alias_py: None,                                                                                                 serializer: Some(                                                                                                     Float(                                                                                                         FloatSerializer {                                                                                                             inf_nan_mode: Null,                                                                                                         },                                                                                                     ),                                                                                                 ),                                                                                                 required: true,                                                                                             },                                                                                             "r": SerField {                                                                                                 key_py: Py(                                                                                                     0x00007fffff89d4b0,                                                                                                 ),                                                                                                 alias: None,                                                                                                 alias_py: None,                                                                                                 serializer: Some(                                                                                                     Float(                                                                                                         FloatSerializer {                                                                                                             inf_nan_mode: Null,                                                                                                         },                                                                                                     ),                                                                                                 ),                                                                                                 required: true,                                                                                             },                                                                                         },                                                                                         computed_fields: Some(                                                                                             ComputedFields(                                                                                                 [],                                                                                             ),                                                                                         ),                                                                                         mode: SimpleDict,                                                                                         extra_serializer: None,                                                                                         filter: SchemaFilter {                                                                                             include: None,                                                                                             exclude: None,                                                                                         },                                                                                         required_fields: 4,                                                                                     },                                                                                 ),                                                                                 has_extra: false,                                                                                 root_model: false,                                                                                 name: "Color",                                                                             },                                                                         ),                                                                     },                                                                 ),                                                             },                                                         ),                                                     ),                                                     required: true,                                                 },                                                 "line_ends": SerField {                                                     key_py: Py(                                                         0x00007fffe20b14b0,                                                     ),                                                     alias: None,                                                     alias_py: None,                                                     serializer: Some(                                                         WithDefault(                                                             WithDefaultSerializer {                                                                 default: Default(                                                                     Py(                                                                         0x00007ffffff85420,                                                                     ),                                                                 ),                                                                 serializer: Nullable(                                                                     NullableSerializer {                                                                         serializer: Model(                                                                             ModelSerializer {                                                                                 class: Py(                                                                                     0x0000555556a43ac0,                                                                                 ),                                                                                 serializer: Fields(                                                                                     GeneralFieldsSerializer {                                                                                         fields: {                                                                                             "start": SerField {                                                                                                 key_py: Py(                                                                                                     0x00007fffff929c30,                                                                                                 ),                                                                                                 alias: None,                                                                                                 alias_py: None,                                                                                                 serializer: Some(                                                                                                     Recursive(                                                                                                         DefinitionRefSerializer {                                                                                                             definition: "kittycad.models.annotation_line_end.AnnotationLineEnd:93825014183648",                                                                                                         },                                                                                                     ),                                                                                                 ),                                                                                                 required: true,                                                                                             },                                                                                             "end": SerField {                                                                                                 key_py: Py(                                                                                                     0x00007fffff952eb0,                                                                                                 ),                                                                                                 alias: None,                                                                                                 alias_py: None,                                                                                                 serializer: Some(                                                                                                     Recursive(                                                                                                         DefinitionRefSerializer {                                                                                                             definition: "kittycad.models.annotation_line_end.AnnotationLineEnd:93825014183648",                                                                                                         },                                                                                                     ),                                                                                                 ),                                                                                                 required: true,                                                                                             },                                                                                         },                                                                                         computed_fields: Some(                                                                                             ComputedFields(                                                                                                 [],                                                                                             ),                                                                                         ),                                                                                         mode: SimpleDict,                                                                                         extra_serializer: None,                                                                                         filter: SchemaFilter {                                                                                             include: None,                                                                                             exclude: None,                                                                                         },                                                                                         required_fields: 2,                                                                                     },                                                                                 ),                                                                                 has_extra: false,                                                                                 root_model: false,                                                                                 name: "AnnotationLineEndOptions",                                                                             },                                                                         ),                                                                     },                                                                 ),                                                             },                                                         ),                                                     ),                                                     required: true,                                                 },                                                 "line_width": SerField {                                                     key_py: Py(                                                         0x00007ffffa112cf0,                                                     ),                                                     alias: None,                                                     alias_py: None,                                                     serializer: Some(                                                         WithDefault(                                                             WithDefaultSerializer {                                                                 default: Default(                                                                     Py(                                                                         0x00007ffffff85420,                                                                     ),                                                                 ),                                                                 serializer: Nullable(                                                                     NullableSerializer {                                                                         serializer: Float(                                                                             FloatSerializer {                                                                                 inf_nan_mode: Null,                                                                             },                                                                         ),                                                                     },                                                                 ),                                                             },                                                         ),                                                     ),                                                     required: true,                                                 },                                                 "text": SerField {                                                     key_py: Py(                                                         0x00007fffff9529b0,                                                     ),                                                     alias: None,                                                     alias_py: None,                                                     serializer: Some(                                                         WithDefault(                                                             WithDefaultSerializer {                                                                 default: Default(                                                                     Py(                                                                         0x00007ffffff85420,                                                                     ),                                                                 ),                                                                 serializer: Nullable(                                                                     NullableSerializer {                                                                         serializer: Model(                                                                             ModelSerializer {                                                                                 class: Py(                                                                                     0x0000555556a47700,                                                                                 ),                                                                                 serializer: Fields(                                                                                     GeneralFieldsSerializer {                                                                                         fields: {                                                                                             "point_size": SerField {                                                                                                 key_py: Py(                                                                                                     0x00007fffe12d3a70,                                                                                                 ),                                                                                                 alias: None,                                                                                                 alias_py: None,                                                                                                 serializer: Some(                                                                                                     Int(                                                                                                         IntSerializer,                                                                                                     ),                                                                                                 ),                                                                                                 required: true,                                                                                             },                                                                                             "x": SerField {                                                                                                 key_py: Py(                                                                                                     0x00007fffff8fe870,                                                                                                 ),                                                                                                 alias: None,                                                                                                 alias_py: None,                                                                                                 serializer: Some(                                                                                                     JsonOrPython(                                                                                                         JsonOrPythonSerializer {                                                                                                             json: Str(                                                                                                                 StrSerializer,                                                                                                             ),                                                                                                             python: Any(                                                                                                                 AnySerializer,                                                                                                             ),                                                                                                             name: "json-or-python[json=str, python=any]",                                                                                                         },                                                                                                     ),                                                                                                 ),                                                                                                 required: true,                                                                                             },                                                                                             "text": SerField {                                                                                                 key_py: Py(                                                                                                     0x00007fffff9529b0,                                                                                                 ),                                                                                                 alias: None,                                                                                                 alias_py: None,                                                                                                 serializer: Some(                                                                                                     Str(                                                                                                         StrSerializer,                                                                                                     ),                                                                                                 ),                                                                                                 required: true,                                                                                             },                                                                                             "y": SerField {                                                                                                 key_py: Py(                                                                                                     0x00007fffff72a730,                                                                                                 ),                                                                                                 alias: None,                                                                                                 alias_py: None,                                                                                                 serializer: Some(                                                                                                     JsonOrPython(                                                                                                         JsonOrPythonSerializer {                                                                                                             json: Str(                                                                                                                 StrSerializer,                                                                                                             ),                                                                                                             python: Any(                                                                                                                 AnySerializer,                                                                                                             ),                                                                                                             name: "json-or-python[json=str, python=any]",                                                                                                         },                                                                                                     ),                                                                                                 ),                                                                                                 required: true,                                                                                             },                                                                                         },                                                                                         computed_fields: Some(                                                                                             ComputedFields(                                                                                                 [],                                                                                             ),                                                                                         ),                                                                                         mode: SimpleDict,                                                                                         extra_serializer: None,                                                                                         filter: SchemaFilter {                                                                                             include: None,                                                                                             exclude: None,                                                                                         },                                                                                         required_fields: 4,                                                                                     },                                                                                 ),                                                                                 has_extra: false,                                                                                 root_model: false,                                                                                 name: "AnnotationTextOptions",                                                                             },                                                                         ),                                                                     },                                                                 ),                                                             },                                                         ),                                                     ),                                                     required: true,                                                 },                                                 "position": SerField {                                                     key_py: Py(                                                         0x00007fffff116db0,                                                     ),                                                     alias: None,                                                     alias_py: None,                                                     serializer: Some(                                                         WithDefault(                                                             WithDefaultSerializer {                                                                 default: Default(                                                                     Py(                                                                         0x00007ffffff85420,                                                                     ),                                                                 ),                                                                 serializer: Nullable(                                                                     NullableSerializer {                                                                         serializer: Model(                                                                             ModelSerializer {                                                                                 class: Py(                                                                                     0x0000555556a4f8b0,                                                                                 ),                                                                                 serializer: Fields(                                                                                     GeneralFieldsSerializer {                                                                                         fields: {                                                                                             "y": SerField {                                                                                                 key_py: Py(                                                                                                     0x00007fffff72a730,                                                                                                 ),                                                                                                 alias: None,                                                                                                 alias_py: None,                                                                                                 serializer: Some(                                                                                                     Float(                                                                                                         FloatSerializer {                                                                                                             inf_nan_mode: Null,                                                                                                         },                                                                                                     ),                                                                                                 ),                                                                                                 required: true,                                                                                             },                                                                                             "x": SerField {                                                                                                 key_py: Py(                                                                                                     0x00007fffff8fe870,                                                                                                 ),                                                                                                 alias: None,                                                                                                 alias_py: None,                                                                                                 serializer: Some(                                                                                                     Float(                                                                                                         FloatSerializer {                                                                                                             inf_nan_mode: Null,                                                                                                         },                                                                                                     ),                                                                                                 ),                                                                                                 required: true,                                                                                             },                                                                                             "z": SerField {                                                                                                 key_py: Py(                                                                                                     0x00007fffff72a770,                                                                                                 ),                                                                                                 alias: None,                                                                                                 alias_py: None,                                                                                                 serializer: Some(                                                                                                     Float(                                                                                                         FloatSerializer {                                                                                                             inf_nan_mode: Null,                                                                                                         },                                                                                                     ),                                                                                                 ),                                                                                                 required: true,                                                                                             },                                                                                         },                                                                                         computed_fields: Some(                                                                                             ComputedFields(                                                                                                 [],                                                                                             ),                                                                                         ),                                                                                         mode: SimpleDict,                                                                                         extra_serializer: None,                                                                                         filter: SchemaFilter {                                                                                             include: None,                                                                                             exclude: None,                                                                                         },                                                                                         required_fields: 3,                                                                                     },                                                                                 ),                                                                                 has_extra: false,                                                                                 root_model: false,                                                                                 name: "Point3d",                                                                             },                                                                         ),                                                                     },                                                                 ),                                                             },                                                         ),                                                     ),                                                     required: true,                                                 },                                             },                                             computed_fields: Some(                                                 ComputedFields(                                                     [],                                                 ),                                             ),                                             mode: SimpleDict,                                             extra_serializer: None,                                             filter: SchemaFilter {                                                 include: None,                                                 exclude: None,                                             },                                             required_fields: 5,                                         },                                     ),                                     has_extra: false,                                     root_model: false,                                     name: "AnnotationOptions",                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 4,             },         ),         has_extra: false,         root_model: false,         name: "new_annotation",     }, ), definitions=[JsonOrPython(JsonOrPythonSerializer { json: Str(StrSerializer), python: Any(AnySerializer), name: "json-or-python[json=str, python=any]" })])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="new_annotation", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "annotation_type",                         lookup_key: Simple {                             key: "annotation_type",                             py_key: Py(                                 0x00007fffe1c8dc70,                             ),                             path: LookupPath(                                 [                                     S(                                         "annotation_type",                                         Py(                                             0x00007fffe1c8dc70,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe1c8dc70,                         ),                         validator: LaxOrStrict(                             LaxOrStrictValidator {                                 strict: false,                                 lax_validator: Chain(                                     ChainValidator {                                         steps: [                                             Str(                                                 StrValidator {                                                     strict: false,                                                     coerce_numbers_to_str: false,                                                 },                                             ),                                             FunctionPlain(                                                 FunctionPlainValidator {                                                     func: Py(                                                         0x00007fffe0fca940,                                                     ),                                                     config: Py(                                                         0x00007fffe0faf200,                                                     ),                                                     name: "function-plain[to_enum()]",                                                     field_name: None,                                                     info_arg: false,                                                 },                                             ),                                         ],                                         name: "chain[str,function-plain[to_enum()]]",                                     },                                 ),                                 strict_validator: JsonOrPython(                                     JsonOrPython {                                         json: FunctionAfter(                                             FunctionAfterValidator {                                                 validator: Str(                                                     StrValidator {                                                         strict: false,                                                         coerce_numbers_to_str: false,                                                     },                                                 ),                                                 func: Py(                                                     0x00007fffe0fca940,                                                 ),                                                 config: Py(                                                     0x00007fffe0faf200,                                                 ),                                                 name: "function-after[to_enum(), str]",                                                 field_name: None,                                                 info_arg: false,                                             },                                         ),                                         python: IsInstance(                                             IsInstanceValidator {                                                 class: Py(                                                     0x0000555556a5b5c0,                                                 ),                                                 class_repr: "AnnotationType",                                                 name: "is-instance[AnnotationType]",                                             },                                         ),                                         name: "json-or-python[json=function-after[to_enum(), str],python=is-instance[AnnotationType]]",                                     },                                 ),                                 name: "lax-or-strict[lax=chain[str,function-plain[to_enum()]],strict=json-or-python[json=function-after[to_enum(), str],python=is-instance[AnnotationType]]]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "clobber",                         lookup_key: Simple {                             key: "clobber",                             py_key: Py(                                 0x00007fffe10db070,                             ),                             path: LookupPath(                                 [                                     S(                                         "clobber",                                         Py(                                             0x00007fffe10db070,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe10db070,                         ),                         validator: Bool(                             BoolValidator {                                 strict: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "options",                         lookup_key: Simple {                             key: "options",                             py_key: Py(                                 0x00007fffff67d970,                             ),                             path: LookupPath(                                 [                                     S(                                         "options",                                         Py(                                             0x00007fffff67d970,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff67d970,                         ),                         validator: Model(                             ModelValidator {                                 revalidate: Never,                                 validator: ModelFields(                                     ModelFieldsValidator {                                         fields: [                                             Field {                                                 name: "color",                                                 lookup_key: Simple {                                                     key: "color",                                                     py_key: Py(                                                         0x00007fffff6e21b0,                                                     ),                                                     path: LookupPath(                                                         [                                                             S(                                                                 "color",                                                                 Py(                                                                     0x00007fffff6e21b0,                                                                 ),                                                             ),                                                         ],                                                     ),                                                 },                                                 name_py: Py(                                                     0x00007fffff6e21b0,                                                 ),                                                 validator: WithDefault(                                                     WithDefaultValidator {                                                         default: Default(                                                             Py(                                                                 0x00007ffffff85420,                                                             ),                                                         ),                                                         on_error: Raise,                                                         validator: Nullable(                                                             NullableValidator {                                                                 validator: Model(                                                                     ModelValidator {                                                                         revalidate: Never,                                                                         validator: ModelFields(                                                                             ModelFieldsValidator {                                                                                 fields: [                                                                                     Field {                                                                                         name: "a",                                                                                         lookup_key: Simple {                                                                                             key: "a",                                                                                             py_key: Py(                                                                                                 0x00007fffff82fa70,                                                                                             ),                                                                                             path: LookupPath(                                                                                                 [                                                                                                     S(                                                                                                         "a",                                                                                                         Py(                                                                                                             0x00007fffff82fa70,                                                                                                         ),                                                                                                     ),                                                                                                 ],                                                                                             ),                                                                                         },                                                                                         name_py: Py(                                                                                             0x00007fffff82fa70,                                                                                         ),                                                                                         validator: Float(                                                                                             FloatValidator {                                                                                                 strict: false,                                                                                                 allow_inf_nan: true,                                                                                             },                                                                                         ),                                                                                         frozen: false,                                                                                     },                                                                                     Field {                                                                                         name: "b",                                                                                         lookup_key: Simple {                                                                                             key: "b",                                                                                             py_key: Py(                                                                                                 0x00007fffff86b330,                                                                                             ),                                                                                             path: LookupPath(                                                                                                 [                                                                                                     S(                                                                                                         "b",                                                                                                         Py(                                                                                                             0x00007fffff86b330,                                                                                                         ),                                                                                                     ),                                                                                                 ],                                                                                             ),                                                                                         },                                                                                         name_py: Py(                                                                                             0x00007fffff86b330,                                                                                         ),                                                                                         validator: Float(                                                                                             FloatValidator {                                                                                                 strict: false,                                                                                                 allow_inf_nan: true,                                                                                             },                                                                                         ),                                                                                         frozen: false,                                                                                     },                                                                                     Field {                                                                                         name: "g",                                                                                         lookup_key: Simple {                                                                                             key: "g",                                                                                             py_key: Py(                                                                                                 0x00007fffff858bb0,                                                                                             ),                                                                                             path: LookupPath(                                                                                                 [                                                                                                     S(                                                                                                         "g",                                                                                                         Py(                                                                                                             0x00007fffff858bb0,                                                                                                         ),                                                                                                     ),                                                                                                 ],                                                                                             ),                                                                                         },                                                                                         name_py: Py(                                                                                             0x00007fffff858bb0,                                                                                         ),                                                                                         validator: Float(                                                                                             FloatValidator {                                                                                                 strict: false,                                                                                                 allow_inf_nan: true,                                                                                             },                                                                                         ),                                                                                         frozen: false,                                                                                     },                                                                                     Field {                                                                                         name: "r",                                                                                         lookup_key: Simple {                                                                                             key: "r",                                                                                             py_key: Py(                                                                                                 0x00007fffff89d4b0,                                                                                             ),                                                                                             path: LookupPath(                                                                                                 [                                                                                                     S(                                                                                                         "r",                                                                                                         Py(                                                                                                             0x00007fffff89d4b0,                                                                                                         ),                                                                                                     ),                                                                                                 ],                                                                                             ),                                                                                         },                                                                                         name_py: Py(                                                                                             0x00007fffff89d4b0,                                                                                         ),                                                                                         validator: Float(                                                                                             FloatValidator {                                                                                                 strict: false,                                                                                                 allow_inf_nan: true,                                                                                             },                                                                                         ),                                                                                         frozen: false,                                                                                     },                                                                                 ],                                                                                 model_name: "Color",                                                                                 extra_behavior: Ignore,                                                                                 extras_validator: None,                                                                                 strict: false,                                                                                 from_attributes: false,                                                                                 loc_by_alias: true,                                                                             },                                                                         ),                                                                         class: Py(                                                                             0x0000555556990860,                                                                         ),                                                                         post_init: None,                                                                         frozen: false,                                                                         custom_init: false,                                                                         root_model: false,                                                                         name: "Color",                                                                     },                                                                 ),                                                                 name: "nullable[Color]",                                                             },                                                         ),                                                         validate_default: false,                                                         copy_default: false,                                                         name: "default[nullable[Color]]",                                                     },                                                 ),                                                 frozen: false,                                             },                                             Field {                                                 name: "line_ends",                                                 lookup_key: Simple {                                                     key: "line_ends",                                                     py_key: Py(                                                         0x00007fffe20b14b0,                                                     ),                                                     path: LookupPath(                                                         [                                                             S(                                                                 "line_ends",                                                                 Py(                                                                     0x00007fffe20b14b0,                                                                 ),                                                             ),                                                         ],                                                     ),                                                 },                                                 name_py: Py(                                                     0x00007fffe20b14b0,                                                 ),                                                 validator: WithDefault(                                                     WithDefaultValidator {                                                         default: Default(                                                             Py(                                                                 0x00007ffffff85420,                                                             ),                                                         ),                                                         on_error: Raise,                                                         validator: Nullable(                                                             NullableValidator {                                                                 validator: Model(                                                                     ModelValidator {                                                                         revalidate: Never,                                                                         validator: ModelFields(                                                                             ModelFieldsValidator {                                                                                 fields: [                                                                                     Field {                                                                                         name: "end",                                                                                         lookup_key: Simple {                                                                                             key: "end",                                                                                             py_key: Py(                                                                                                 0x00007fffff952eb0,                                                                                             ),                                                                                             path: LookupPath(                                                                                                 [                                                                                                     S(                                                                                                         "end",                                                                                                         Py(                                                                                                             0x00007fffff952eb0,                                                                                                         ),                                                                                                     ),                                                                                                 ],                                                                                             ),                                                                                         },                                                                                         name_py: Py(                                                                                             0x00007fffff952eb0,                                                                                         ),                                                                                         validator: DefinitionRef(                                                                                             DefinitionRefValidator {                                                                                                 definition: "kittycad.models.annotation_line_end.AnnotationLineEnd:93825014183648",                                                                                             },                                                                                         ),                                                                                         frozen: false,                                                                                     },                                                                                     Field {                                                                                         name: "start",                                                                                         lookup_key: Simple {                                                                                             key: "start",                                                                                             py_key: Py(                                                                                                 0x00007fffff929c30,                                                                                             ),                                                                                             path: LookupPath(                                                                                                 [                                                                                                     S(                                                                                                         "start",                                                                                                         Py(                                                                                                             0x00007fffff929c30,                                                                                                         ),                                                                                                     ),                                                                                                 ],                                                                                             ),                                                                                         },                                                                                         name_py: Py(                                                                                             0x00007fffff929c30,                                                                                         ),                                                                                         validator: DefinitionRef(                                                                                             DefinitionRefValidator {                                                                                                 definition: "kittycad.models.annotation_line_end.AnnotationLineEnd:93825014183648",                                                                                             },                                                                                         ),                                                                                         frozen: false,                                                                                     },                                                                                 ],                                                                                 model_name: "AnnotationLineEndOptions",                                                                                 extra_behavior: Ignore,                                                                                 extras_validator: None,                                                                                 strict: false,                                                                                 from_attributes: false,                                                                                 loc_by_alias: true,                                                                             },                                                                         ),                                                                         class: Py(                                                                             0x0000555556a43ac0,                                                                         ),                                                                         post_init: None,                                                                         frozen: false,                                                                         custom_init: false,                                                                         root_model: false,                                                                         name: "AnnotationLineEndOptions",                                                                     },                                                                 ),                                                                 name: "nullable[AnnotationLineEndOptions]",                                                             },                                                         ),                                                         validate_default: false,                                                         copy_default: false,                                                         name: "default[nullable[AnnotationLineEndOptions]]",                                                     },                                                 ),                                                 frozen: false,                                             },                                             Field {                                                 name: "line_width",                                                 lookup_key: Simple {                                                     key: "line_width",                                                     py_key: Py(                                                         0x00007ffffa112cf0,                                                     ),                                                     path: LookupPath(                                                         [                                                             S(                                                                 "line_width",                                                                 Py(                                                                     0x00007ffffa112cf0,                                                                 ),                                                             ),                                                         ],                                                     ),                                                 },                                                 name_py: Py(                                                     0x00007ffffa112cf0,                                                 ),                                                 validator: WithDefault(                                                     WithDefaultValidator {                                                         default: Default(                                                             Py(                                                                 0x00007ffffff85420,                                                             ),                                                         ),                                                         on_error: Raise,                                                         validator: Nullable(                                                             NullableValidator {                                                                 validator: Float(                                                                     FloatValidator {                                                                         strict: false,                                                                         allow_inf_nan: true,                                                                     },                                                                 ),                                                                 name: "nullable[float]",                                                             },                                                         ),                                                         validate_default: false,                                                         copy_default: false,                                                         name: "default[nullable[float]]",                                                     },                                                 ),                                                 frozen: false,                                             },                                             Field {                                                 name: "position",                                                 lookup_key: Simple {                                                     key: "position",                                                     py_key: Py(                                                         0x00007fffff116db0,                                                     ),                                                     path: LookupPath(                                                         [                                                             S(                                                                 "position",                                                                 Py(                                                                     0x00007fffff116db0,                                                                 ),                                                             ),                                                         ],                                                     ),                                                 },                                                 name_py: Py(                                                     0x00007fffff116db0,                                                 ),                                                 validator: WithDefault(                                                     WithDefaultValidator {                                                         default: Default(                                                             Py(                                                                 0x00007ffffff85420,                                                             ),                                                         ),                                                         on_error: Raise,                                                         validator: Nullable(                                                             NullableValidator {                                                                 validator: Model(                                                                     ModelValidator {                                                                         revalidate: Never,                                                                         validator: ModelFields(                                                                             ModelFieldsValidator {                                                                                 fields: [                                                                                     Field {                                                                                         name: "x",                                                                                         lookup_key: Simple {                                                                                             key: "x",                                                                                             py_key: Py(                                                                                                 0x00007fffff8fe870,                                                                                             ),                                                                                             path: LookupPath(                                                                                                 [                                                                                                     S(                                                                                                         "x",                                                                                                         Py(                                                                                                             0x00007fffff8fe870,                                                                                                         ),                                                                                                     ),                                                                                                 ],                                                                                             ),                                                                                         },                                                                                         name_py: Py(                                                                                             0x00007fffff8fe870,                                                                                         ),                                                                                         validator: Float(                                                                                             FloatValidator {                                                                                                 strict: false,                                                                                                 allow_inf_nan: true,                                                                                             },                                                                                         ),                                                                                         frozen: false,                                                                                     },                                                                                     Field {                                                                                         name: "y",                                                                                         lookup_key: Simple {                                                                                             key: "y",                                                                                             py_key: Py(                                                                                                 0x00007fffff72a730,                                                                                             ),                                                                                             path: LookupPath(                                                                                                 [                                                                                                     S(                                                                                                         "y",                                                                                                         Py(                                                                                                             0x00007fffff72a730,                                                                                                         ),                                                                                                     ),                                                                                                 ],                                                                                             ),                                                                                         },                                                                                         name_py: Py(                                                                                             0x00007fffff72a730,                                                                                         ),                                                                                         validator: Float(                                                                                             FloatValidator {                                                                                                 strict: false,                                                                                                 allow_inf_nan: true,                                                                                             },                                                                                         ),                                                                                         frozen: false,                                                                                     },                                                                                     Field {                                                                                         name: "z",                                                                                         lookup_key: Simple {                                                                                             key: "z",                                                                                             py_key: Py(                                                                                                 0x00007fffff72a770,                                                                                             ),                                                                                             path: LookupPath(                                                                                                 [                                                                                                     S(                                                                                                         "z",                                                                                                         Py(                                                                                                             0x00007fffff72a770,                                                                                                         ),                                                                                                     ),                                                                                                 ],                                                                                             ),                                                                                         },                                                                                         name_py: Py(                                                                                             0x00007fffff72a770,                                                                                         ),                                                                                         validator: Float(                                                                                             FloatValidator {                                                                                                 strict: false,                                                                                                 allow_inf_nan: true,                                                                                             },                                                                                         ),                                                                                         frozen: false,                                                                                     },                                                                                 ],                                                                                 model_name: "Point3d",                                                                                 extra_behavior: Ignore,                                                                                 extras_validator: None,                                                                                 strict: false,                                                                                 from_attributes: false,                                                                                 loc_by_alias: true,                                                                             },                                                                         ),                                                                         class: Py(                                                                             0x0000555556a4f8b0,                                                                         ),                                                                         post_init: None,                                                                         frozen: false,                                                                         custom_init: false,                                                                         root_model: false,                                                                         name: "Point3d",                                                                     },                                                                 ),                                                                 name: "nullable[Point3d]",                                                             },                                                         ),                                                         validate_default: false,                                                         copy_default: false,                                                         name: "default[nullable[Point3d]]",                                                     },                                                 ),                                                 frozen: false,                                             },                                             Field {                                                 name: "text",                                                 lookup_key: Simple {                                                     key: "text",                                                     py_key: Py(                                                         0x00007fffff9529b0,                                                     ),                                                     path: LookupPath(                                                         [                                                             S(                                                                 "text",                                                                 Py(                                                                     0x00007fffff9529b0,                                                                 ),                                                             ),                                                         ],                                                     ),                                                 },                                                 name_py: Py(                                                     0x00007fffff9529b0,                                                 ),                                                 validator: WithDefault(                                                     WithDefaultValidator {                                                         default: Default(                                                             Py(                                                                 0x00007ffffff85420,                                                             ),                                                         ),                                                         on_error: Raise,                                                         validator: Nullable(                                                             NullableValidator {                                                                 validator: Model(                                                                     ModelValidator {                                                                         revalidate: Never,                                                                         validator: ModelFields(                                                                             ModelFieldsValidator {                                                                                 fields: [                                                                                     Field {                                                                                         name: "point_size",                                                                                         lookup_key: Simple {                                                                                             key: "point_size",                                                                                             py_key: Py(                                                                                                 0x00007fffe12d3a70,                                                                                             ),                                                                                             path: LookupPath(                                                                                                 [                                                                                                     S(                                                                                                         "point_size",                                                                                                         Py(                                                                                                             0x00007fffe12d3a70,                                                                                                         ),                                                                                                     ),                                                                                                 ],                                                                                             ),                                                                                         },                                                                                         name_py: Py(                                                                                             0x00007fffe12d3a70,                                                                                         ),                                                                                         validator: Int(                                                                                             IntValidator {                                                                                                 strict: false,                                                                                             },                                                                                         ),                                                                                         frozen: false,                                                                                     },                                                                                     Field {                                                                                         name: "text",                                                                                         lookup_key: Simple {                                                                                             key: "text",                                                                                             py_key: Py(                                                                                                 0x00007fffff9529b0,                                                                                             ),                                                                                             path: LookupPath(                                                                                                 [                                                                                                     S(                                                                                                         "text",                                                                                                         Py(                                                                                                             0x00007fffff9529b0,                                                                                                         ),                                                                                                     ),                                                                                                 ],                                                                                             ),                                                                                         },                                                                                         name_py: Py(                                                                                             0x00007fffff9529b0,                                                                                         ),                                                                                         validator: Str(                                                                                             StrValidator {                                                                                                 strict: false,                                                                                                 coerce_numbers_to_str: false,                                                                                             },                                                                                         ),                                                                                         frozen: false,                                                                                     },                                                                                     Field {                                                                                         name: "x",                                                                                         lookup_key: Simple {                                                                                             key: "x",                                                                                             py_key: Py(                                                                                                 0x00007fffff8fe870,                                                                                             ),                                                                                             path: LookupPath(                                                                                                 [                                                                                                     S(                                                                                                         "x",                                                                                                         Py(                                                                                                             0x00007fffff8fe870,                                                                                                         ),                                                                                                     ),                                                                                                 ],                                                                                             ),                                                                                         },                                                                                         name_py: Py(                                                                                             0x00007fffff8fe870,                                                                                         ),                                                                                         validator: LaxOrStrict(                                                                                             LaxOrStrictValidator {                                                                                                 strict: false,                                                                                                 lax_validator: Chain(                                                                                                     ChainValidator {                                                                                                         steps: [                                                                                                             Str(                                                                                                                 StrValidator {                                                                                                                     strict: false,                                                                                                                     coerce_numbers_to_str: false,                                                                                                                 },                                                                                                             ),                                                                                                             FunctionPlain(                                                                                                                 FunctionPlainValidator {                                                                                                                     func: Py(                                                                                                                         0x00007fffe149d160,                                                                                                                     ),                                                                                                                     config: Py(                                                                                                                         0x00007fffe0fab400,                                                                                                                     ),                                                                                                                     name: "function-plain[to_enum()]",                                                                                                                     field_name: None,                                                                                                                     info_arg: false,                                                                                                                 },                                                                                                             ),                                                                                                         ],                                                                                                         name: "chain[str,function-plain[to_enum()]]",                                                                                                     },                                                                                                 ),                                                                                                 strict_validator: JsonOrPython(                                                                                                     JsonOrPython {                                                                                                         json: FunctionAfter(                                                                                                             FunctionAfterValidator {                                                                                                                 validator: Str(                                                                                                                     StrValidator {                                                                                                                         strict: false,                                                                                                                         coerce_numbers_to_str: false,                                                                                                                     },                                                                                                                 ),                                                                                                                 func: Py(                                                                                                                     0x00007fffe149d160,                                                                                                                 ),                                                                                                                 config: Py(                                                                                                                     0x00007fffe0fab400,                                                                                                                 ),                                                                                                                 name: "function-after[to_enum(), str]",                                                                                                                 field_name: None,                                                                                                                 info_arg: false,                                                                                                             },                                                                                                         ),                                                                                                         python: IsInstance(                                                                                                             IsInstanceValidator {                                                                                                                 class: Py(                                                                                                                     0x0000555556a47e30,                                                                                                                 ),                                                                                                                 class_repr: "AnnotationTextAlignmentX",                                                                                                                 name: "is-instance[AnnotationTextAlignmentX]",                                                                                                             },                                                                                                         ),                                                                                                         name: "json-or-python[json=function-after[to_enum(), str],python=is-instance[AnnotationTextAlignmentX]]",                                                                                                     },                                                                                                 ),                                                                                                 name: "lax-or-strict[lax=chain[str,function-plain[to_enum()]],strict=json-or-python[json=function-after[to_enum(), str],python=is-instance[AnnotationTextAlignmentX]]]",                                                                                             },                                                                                         ),                                                                                         frozen: false,                                                                                     },                                                                                     Field {                                                                                         name: "y",                                                                                         lookup_key: Simple {                                                                                             key: "y",                                                                                             py_key: Py(                                                                                                 0x00007fffff72a730,                                                                                             ),                                                                                             path: LookupPath(                                                                                                 [                                                                                                     S(                                                                                                         "y",                                                                                                         Py(                                                                                                             0x00007fffff72a730,                                                                                                         ),                                                                                                     ),                                                                                                 ],                                                                                             ),                                                                                         },                                                                                         name_py: Py(                                                                                             0x00007fffff72a730,                                                                                         ),                                                                                         validator: LaxOrStrict(                                                                                             LaxOrStrictValidator {                                                                                                 strict: false,                                                                                                 lax_validator: Chain(                                                                                                     ChainValidator {                                                                                                         steps: [                                                                                                             Str(                                                                                                                 StrValidator {                                                                                                                     strict: false,                                                                                                                     coerce_numbers_to_str: false,                                                                                                                 },                                                                                                             ),                                                                                                             FunctionPlain(                                                                                                                 FunctionPlainValidator {                                                                                                                     func: Py(                                                                                                                         0x00007fffe149d5e0,                                                                                                                     ),                                                                                                                     config: Py(                                                                                                                         0x00007fffe0fab400,                                                                                                                     ),                                                                                                                     name: "function-plain[to_enum()]",                                                                                                                     field_name: None,                                                                                                                     info_arg: false,                                                                                                                 },                                                                                                             ),                                                                                                         ],                                                                                                         name: "chain[str,function-plain[to_enum()]]",                                                                                                     },                                                                                                 ),                                                                                                 strict_validator: JsonOrPython(                                                                                                     JsonOrPython {                                                                                                         json: FunctionAfter(                                                                                                             FunctionAfterValidator {                                                                                                                 validator: Str(                                                                                                                     StrValidator {                                                                                                                         strict: false,                                                                                                                         coerce_numbers_to_str: false,                                                                                                                     },                                                                                                                 ),                                                                                                                 func: Py(                                                                                                                     0x00007fffe149d5e0,                                                                                                                 ),                                                                                                                 config: Py(                                                                                                                     0x00007fffe0fab400,                                                                                                                 ),                                                                                                                 name: "function-after[to_enum(), str]",                                                                                                                 field_name: None,                                                                                                                 info_arg: false,                                                                                                             },                                                                                                         ),                                                                                                         python: IsInstance(                                                                                                             IsInstanceValidator {                                                                                                                 class: Py(                                                                                                                     0x0000555556a46eb0,                                                                                                                 ),                                                                                                                 class_repr: "AnnotationTextAlignmentY",                                                                                                                 name: "is-instance[AnnotationTextAlignmentY]",                                                                                                             },                                                                                                         ),                                                                                                         name: "json-or-python[json=function-after[to_enum(), str],python=is-instance[AnnotationTextAlignmentY]]",                                                                                                     },                                                                                                 ),                                                                                                 name: "lax-or-strict[lax=chain[str,function-plain[to_enum()]],strict=json-or-python[json=function-after[to_enum(), str],python=is-instance[AnnotationTextAlignmentY]]]",                                                                                             },                                                                                         ),                                                                                         frozen: false,                                                                                     },                                                                                 ],                                                                                 model_name: "AnnotationTextOptions",                                                                                 extra_behavior: Ignore,                                                                                 extras_validator: None,                                                                                 strict: false,                                                                                 from_attributes: false,                                                                                 loc_by_alias: true,                                                                             },                                                                         ),                                                                         class: Py(                                                                             0x0000555556a47700,                                                                         ),                                                                         post_init: None,                                                                         frozen: false,                                                                         custom_init: false,                                                                         root_model: false,                                                                         name: "AnnotationTextOptions",                                                                     },                                                                 ),                                                                 name: "nullable[AnnotationTextOptions]",                                                             },                                                         ),                                                         validate_default: false,                                                         copy_default: false,                                                         name: "default[nullable[AnnotationTextOptions]]",                                                     },                                                 ),                                                 frozen: false,                                             },                                         ],                                         model_name: "AnnotationOptions",                                         extra_behavior: Ignore,                                         extras_validator: None,                                         strict: false,                                         from_attributes: false,                                         loc_by_alias: true,                                     },                                 ),                                 class: Py(                                     0x0000555556a517c0,                                 ),                                 post_init: None,                                 frozen: false,                                 custom_init: false,                                 root_model: false,                                 name: "AnnotationOptions",                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe10db570,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "new_annotation": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe10db570,                                                 ),                                             ],                                         },                                         expected_repr: "'new_annotation'",                                         name: "literal['new_annotation']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['new_annotation']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "new_annotation",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556f31640,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "new_annotation",     }, ), definitions=[LaxOrStrict(LaxOrStrictValidator { strict: false, lax_validator: Chain(ChainValidator { steps: [Str(StrValidator { strict: false, coerce_numbers_to_str: false }), FunctionPlain(FunctionPlainValidator { func: Py(0x7fffe12e49d0), config: Py(0x7fffe0f92840), name: "function-plain[to_enum()]", field_name: None, info_arg: false })], name: "chain[str,function-plain[to_enum()]]" }), strict_validator: JsonOrPython(JsonOrPython { json: FunctionAfter(FunctionAfterValidator { validator: Str(StrValidator { strict: false, coerce_numbers_to_str: false }), func: Py(0x7fffe12e49d0), config: Py(0x7fffe0f92840), name: "function-after[to_enum(), str]", field_name: None, info_arg: false }), python: IsInstance(IsInstanceValidator { class: Py(0x555556a436e0), class_repr: "AnnotationLineEnd", name: "is-instance[AnnotationLineEnd]" }), name: "json-or-python[json=function-after[to_enum(), str],python=is-instance[AnnotationLineEnd]]" }), name: "lax-or-strict[lax=chain[str,function-plain[to_enum()]],strict=json-or-python[json=function-after[to_enum(), str],python=is-instance[AnnotationLineEnd]]]" })])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, annotation_type: kittycad.models.annotation_type.AnnotationType, clobber: bool, options: kittycad.models.annotation_options.AnnotationOptions, type: Literal['new_annotation'] = 'new_annotation') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

annotation_type: AnnotationType[source]
clobber: bool[source]
classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'annotation_type': FieldInfo(annotation=AnnotationType, required=True), 'clobber': FieldInfo(annotation=bool, required=True), 'options': FieldInfo(annotation=AnnotationOptions, required=True), 'type': FieldInfo(annotation=Literal['new_annotation'], required=False, default='new_annotation')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

options: AnnotationOptions[source]
classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['new_annotation'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.object_bring_to_front(**data)[source][source]

Bring an object to the front of the scene

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'object_id': <class 'str'>, 'type': typing.Literal['object_bring_to_front']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'object_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['object_bring_to_front'], required=False, default='object_bring_to_front')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.object_bring_to_front'>, 'config': {'title': 'object_bring_to_front'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.object_bring_to_front'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.object_bring_to_front'>>]}, 'ref': 'kittycad.models.modeling_cmd.object_bring_to_front:93825019425232', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'object_id': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'object_bring_to_front', 'schema': {'expected': ['object_bring_to_front'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'object_bring_to_front', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entities': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'new_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_visible': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'update_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556f431d0,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "object_id": SerField {                         key_py: Py(                             0x00007ffffdc17c30,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Str(                                 StrSerializer,                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe113e490,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "object_bring_to_front",                                             },                                             expected_py: None,                                             name: "literal['object_bring_to_front']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 2,             },         ),         has_extra: false,         root_model: false,         name: "object_bring_to_front",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="object_bring_to_front", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "object_id",                         lookup_key: Simple {                             key: "object_id",                             py_key: Py(                                 0x00007ffffdc17c30,                             ),                             path: LookupPath(                                 [                                     S(                                         "object_id",                                         Py(                                             0x00007ffffdc17c30,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007ffffdc17c30,                         ),                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe113e490,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "object_bring_to_front": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe113e490,                                                 ),                                             ],                                         },                                         expected_repr: "'object_bring_to_front'",                                         name: "literal['object_bring_to_front']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['object_bring_to_front']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "object_bring_to_front",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556f431d0,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "object_bring_to_front",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, object_id: str, type: Literal['object_bring_to_front'] = 'object_bring_to_front') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'object_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['object_bring_to_front'], required=False, default='object_bring_to_front')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

object_id: str[source]
classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['object_bring_to_front'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.object_visible(**data)[source][source]

Hide or show an object

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'hidden': <class 'bool'>, 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'object_id': <class 'str'>, 'type': typing.Literal['object_visible']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'hidden': FieldInfo(annotation=bool, required=True), 'object_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['object_visible'], required=False, default='object_visible')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.object_visible'>, 'config': {'title': 'object_visible'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.object_visible'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.object_visible'>>]}, 'ref': 'kittycad.models.modeling_cmd.object_visible:93825019423728', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'hidden': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'bool'}, 'type': 'model-field'}, 'object_id': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'object_visible', 'schema': {'expected': ['object_visible'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'object_visible', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entities': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'new_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'update_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556f42bf0,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "hidden": SerField {                         key_py: Py(                             0x00007ffffdf1b6f0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Bool(                                 BoolSerializer,                             ),                         ),                         required: true,                     },                     "object_id": SerField {                         key_py: Py(                             0x00007ffffdc17c30,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Str(                                 StrSerializer,                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe10825f0,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "object_visible",                                             },                                             expected_py: None,                                             name: "literal['object_visible']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 3,             },         ),         has_extra: false,         root_model: false,         name: "object_visible",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="object_visible", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "hidden",                         lookup_key: Simple {                             key: "hidden",                             py_key: Py(                                 0x00007ffffdf1b6f0,                             ),                             path: LookupPath(                                 [                                     S(                                         "hidden",                                         Py(                                             0x00007ffffdf1b6f0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007ffffdf1b6f0,                         ),                         validator: Bool(                             BoolValidator {                                 strict: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "object_id",                         lookup_key: Simple {                             key: "object_id",                             py_key: Py(                                 0x00007ffffdc17c30,                             ),                             path: LookupPath(                                 [                                     S(                                         "object_id",                                         Py(                                             0x00007ffffdc17c30,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007ffffdc17c30,                         ),                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe10825f0,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "object_visible": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe10825f0,                                                 ),                                             ],                                         },                                         expected_repr: "'object_visible'",                                         name: "literal['object_visible']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['object_visible']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "object_visible",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556f42bf0,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "object_visible",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, hidden: bool, object_id: str, type: Literal['object_visible'] = 'object_visible') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

classmethod from_orm(cls, obj)[source]
Return type:

Model

hidden: bool[source]
json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'hidden': FieldInfo(annotation=bool, required=True), 'object_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['object_visible'], required=False, default='object_visible')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

object_id: str[source]
classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['object_visible'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.path_get_curve_uuids_for_vertices(**data)[source][source]

Get curves for vertices within a path

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'path_id': <class 'str'>, 'type': typing.Literal['path_get_curve_uuids_for_vertices'], 'vertex_ids': typing.List[str]}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'path_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['path_get_curve_uuids_for_vertices'], required=False, default='path_get_curve_uuids_for_vertices'), 'vertex_ids': FieldInfo(annotation=List[str], required=True)}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.path_get_curve_uuids_for_vertices'>, 'config': {'title': 'path_get_curve_uuids_for_vertices'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.path_get_curve_uuids_for_vertices'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.path_get_curve_uuids_for_vertices'>>]}, 'ref': 'kittycad.models.modeling_cmd.path_get_curve_uuids_for_vertices:93825019851920', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'path_id': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'path_get_curve_uuids_for_vertices', 'schema': {'expected': ['path_get_curve_uuids_for_vertices'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}, 'vertex_ids': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'items_schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'strict': False, 'type': 'list'}, 'type': 'model-field'}}, 'model_name': 'path_get_curve_uuids_for_vertices', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_control_points': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_fade': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_set_opacity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'get_entity_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entities': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_axes_gizmo': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_plane': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_click': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'new_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_bring_to_front': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_visible': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_info': <pydantic._internal._model_construction._PydanticWeakRef object>, 'plane_set_color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'send_object': <pydantic._internal._model_construction._PydanticWeakRef object>, 'set_tool': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_disable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_enable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid2d_add_hole': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_edge_faces': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_opposite_edges': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_next_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_opposite_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_prev_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'take_snapshot': <pydantic._internal._model_construction._PydanticWeakRef object>, 'update_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556fab490,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe1ceb450,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "path_get_curve_uuids_for_vertices",                                             },                                             expected_py: None,                                             name: "literal['path_get_curve_uuids_for_vertices']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                     "path_id": SerField {                         key_py: Py(                             0x00007fffe2481fb0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Str(                                 StrSerializer,                             ),                         ),                         required: true,                     },                     "vertex_ids": SerField {                         key_py: Py(                             0x00007fffe10f88b0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             List(                                 ListSerializer {                                     item_serializer: Str(                                         StrSerializer,                                     ),                                     filter: SchemaFilter {                                         include: None,                                         exclude: None,                                     },                                     name: "list[str]",                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 3,             },         ),         has_extra: false,         root_model: false,         name: "path_get_curve_uuids_for_vertices",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="path_get_curve_uuids_for_vertices", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "path_id",                         lookup_key: Simple {                             key: "path_id",                             py_key: Py(                                 0x00007fffe2481fb0,                             ),                             path: LookupPath(                                 [                                     S(                                         "path_id",                                         Py(                                             0x00007fffe2481fb0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe2481fb0,                         ),                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe1ceb450,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "path_get_curve_uuids_for_vertices": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe1ceb450,                                                 ),                                             ],                                         },                                         expected_repr: "'path_get_curve_uuids_for_vertices'",                                         name: "literal['path_get_curve_uuids_for_vertices']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['path_get_curve_uuids_for_vertices']]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "vertex_ids",                         lookup_key: Simple {                             key: "vertex_ids",                             py_key: Py(                                 0x00007fffe10f88b0,                             ),                             path: LookupPath(                                 [                                     S(                                         "vertex_ids",                                         Py(                                             0x00007fffe10f88b0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe10f88b0,                         ),                         validator: List(                             ListValidator {                                 strict: false,                                 item_validator: Some(                                     Str(                                         StrValidator {                                             strict: false,                                             coerce_numbers_to_str: false,                                         },                                     ),                                 ),                                 min_length: None,                                 max_length: None,                                 name: OnceLock(                                     <uninit>,                                 ),                             },                         ),                         frozen: false,                     },                 ],                 model_name: "path_get_curve_uuids_for_vertices",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556fab490,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "path_get_curve_uuids_for_vertices",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, path_id: str, type: Literal['path_get_curve_uuids_for_vertices'] = 'path_get_curve_uuids_for_vertices', vertex_ids: List[str]) -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'path_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['path_get_curve_uuids_for_vertices'], required=False, default='path_get_curve_uuids_for_vertices'), 'vertex_ids': FieldInfo(annotation=List[str], required=True)}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

path_id: str[source]
classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['path_get_curve_uuids_for_vertices'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

vertex_ids: List[str][source]
class kittycad.models.modeling_cmd.path_get_info(**data)[source][source]

Query the given path

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'path_id': <class 'str'>, 'type': typing.Literal['path_get_info']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'path_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['path_get_info'], required=False, default='path_get_info')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.path_get_info'>, 'config': {'title': 'path_get_info'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.path_get_info'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.path_get_info'>>]}, 'ref': 'kittycad.models.modeling_cmd.path_get_info:93825019818768', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'path_id': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'path_get_info', 'schema': {'expected': ['path_get_info'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'path_get_info', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_control_points': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_fade': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_set_opacity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'get_entity_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entities': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_axes_gizmo': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_plane': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_click': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'new_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_bring_to_front': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_visible': <pydantic._internal._model_construction._PydanticWeakRef object>, 'plane_set_color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'send_object': <pydantic._internal._model_construction._PydanticWeakRef object>, 'set_tool': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_disable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_enable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid2d_add_hole': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_edge_faces': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_opposite_edges': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_next_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_opposite_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_prev_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'take_snapshot': <pydantic._internal._model_construction._PydanticWeakRef object>, 'update_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556fa3310,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe1c7bc70,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "path_get_info",                                             },                                             expected_py: None,                                             name: "literal['path_get_info']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                     "path_id": SerField {                         key_py: Py(                             0x00007fffe2481fb0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Str(                                 StrSerializer,                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 2,             },         ),         has_extra: false,         root_model: false,         name: "path_get_info",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="path_get_info", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "path_id",                         lookup_key: Simple {                             key: "path_id",                             py_key: Py(                                 0x00007fffe2481fb0,                             ),                             path: LookupPath(                                 [                                     S(                                         "path_id",                                         Py(                                             0x00007fffe2481fb0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe2481fb0,                         ),                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe1c7bc70,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "path_get_info": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe1c7bc70,                                                 ),                                             ],                                         },                                         expected_repr: "'path_get_info'",                                         name: "literal['path_get_info']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['path_get_info']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "path_get_info",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556fa3310,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "path_get_info",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, path_id: str, type: Literal['path_get_info'] = 'path_get_info') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'path_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['path_get_info'], required=False, default='path_get_info')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

path_id: str[source]
classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['path_get_info'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.path_get_vertex_uuids(**data)[source][source]

Get vertices within a path

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'path_id': <class 'str'>, 'type': typing.Literal['path_get_vertex_uuids']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'path_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['path_get_vertex_uuids'], required=False, default='path_get_vertex_uuids')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.path_get_vertex_uuids'>, 'config': {'title': 'path_get_vertex_uuids'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.path_get_vertex_uuids'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.path_get_vertex_uuids'>>]}, 'ref': 'kittycad.models.modeling_cmd.path_get_vertex_uuids:93825019863680', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'path_id': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'path_get_vertex_uuids', 'schema': {'expected': ['path_get_vertex_uuids'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'path_get_vertex_uuids', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_control_points': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_fade': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_set_opacity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'get_entity_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entities': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_axes_gizmo': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_plane': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_click': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'new_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_bring_to_front': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_visible': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_curve_uuids_for_vertices': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_info': <pydantic._internal._model_construction._PydanticWeakRef object>, 'plane_set_color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'send_object': <pydantic._internal._model_construction._PydanticWeakRef object>, 'set_tool': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_disable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_enable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid2d_add_hole': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_edge_faces': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_opposite_edges': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_next_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_opposite_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_prev_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'take_snapshot': <pydantic._internal._model_construction._PydanticWeakRef object>, 'update_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556fae280,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "path_id": SerField {                         key_py: Py(                             0x00007fffe2481fb0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Str(                                 StrSerializer,                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe1c933f0,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "path_get_vertex_uuids",                                             },                                             expected_py: None,                                             name: "literal['path_get_vertex_uuids']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 2,             },         ),         has_extra: false,         root_model: false,         name: "path_get_vertex_uuids",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="path_get_vertex_uuids", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "path_id",                         lookup_key: Simple {                             key: "path_id",                             py_key: Py(                                 0x00007fffe2481fb0,                             ),                             path: LookupPath(                                 [                                     S(                                         "path_id",                                         Py(                                             0x00007fffe2481fb0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe2481fb0,                         ),                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe1c933f0,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "path_get_vertex_uuids": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe1c933f0,                                                 ),                                             ],                                         },                                         expected_repr: "'path_get_vertex_uuids'",                                         name: "literal['path_get_vertex_uuids']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['path_get_vertex_uuids']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "path_get_vertex_uuids",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556fae280,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "path_get_vertex_uuids",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, path_id: str, type: Literal['path_get_vertex_uuids'] = 'path_get_vertex_uuids') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'path_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['path_get_vertex_uuids'], required=False, default='path_get_vertex_uuids')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

path_id: str[source]
classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['path_get_vertex_uuids'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.plane_intersect_and_project(**data)[source][source]

Utility method. Performs both a ray cast and projection to plane-local coordinates. Returns the plane coordinates for the given window coordinates.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'plane_id': <class 'str'>, 'type': typing.Literal['plane_intersect_and_project'], 'window': <class 'kittycad.models.point2d.Point2d'>}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'plane_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['plane_intersect_and_project'], required=False, default='plane_intersect_and_project'), 'window': FieldInfo(annotation=Point2d, required=True)}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.plane_intersect_and_project'>, 'config': {'title': 'plane_intersect_and_project'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.plane_intersect_and_project'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.plane_intersect_and_project'>>]}, 'ref': 'kittycad.models.modeling_cmd.plane_intersect_and_project:93825019951696', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'plane_id': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'plane_intersect_and_project', 'schema': {'expected': ['plane_intersect_and_project'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}, 'window': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'cls': <class 'kittycad.models.point2d.Point2d'>, 'config': {'title': 'Point2d'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.point2d.Point2d'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.point2d.Point2d'>>]}, 'ref': 'kittycad.models.point2d.Point2d:93825018798944', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'x': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}, 'y': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}}, 'model_name': 'Point2d', 'type': 'model-fields'}, 'type': 'model'}, 'type': 'model-field'}}, 'model_name': 'plane_intersect_and_project', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_control_points': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_fade': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_set_opacity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'get_entity_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'handle_mouse_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'handle_mouse_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'handle_mouse_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entities': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_axes_gizmo': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_plane': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_click': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'new_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_bring_to_front': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_visible': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_curve_uuids_for_vertices': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_info': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_vertex_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'plane_set_color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'remove_scene_objects': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'send_object': <pydantic._internal._model_construction._PydanticWeakRef object>, 'set_tool': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_disable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_enable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid2d_add_hole': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_edge_faces': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_opposite_edges': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_next_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_opposite_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_prev_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'take_snapshot': <pydantic._internal._model_construction._PydanticWeakRef object>, 'update_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556fc3a50,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "plane_id": SerField {                         key_py: Py(                             0x00007fffe10f87f0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Str(                                 StrSerializer,                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe1c93530,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "plane_intersect_and_project",                                             },                                             expected_py: None,                                             name: "literal['plane_intersect_and_project']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                     "window": SerField {                         key_py: Py(                             0x00007ffffdca04f0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Model(                                 ModelSerializer {                                     class: Py(                                         0x0000555556eaa360,                                     ),                                     serializer: Fields(                                         GeneralFieldsSerializer {                                             fields: {                                                 "x": SerField {                                                     key_py: Py(                                                         0x00007fffff8fe870,                                                     ),                                                     alias: None,                                                     alias_py: None,                                                     serializer: Some(                                                         Float(                                                             FloatSerializer {                                                                 inf_nan_mode: Null,                                                             },                                                         ),                                                     ),                                                     required: true,                                                 },                                                 "y": SerField {                                                     key_py: Py(                                                         0x00007fffff72a730,                                                     ),                                                     alias: None,                                                     alias_py: None,                                                     serializer: Some(                                                         Float(                                                             FloatSerializer {                                                                 inf_nan_mode: Null,                                                             },                                                         ),                                                     ),                                                     required: true,                                                 },                                             },                                             computed_fields: Some(                                                 ComputedFields(                                                     [],                                                 ),                                             ),                                             mode: SimpleDict,                                             extra_serializer: None,                                             filter: SchemaFilter {                                                 include: None,                                                 exclude: None,                                             },                                             required_fields: 2,                                         },                                     ),                                     has_extra: false,                                     root_model: false,                                     name: "Point2d",                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 3,             },         ),         has_extra: false,         root_model: false,         name: "plane_intersect_and_project",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="plane_intersect_and_project", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "plane_id",                         lookup_key: Simple {                             key: "plane_id",                             py_key: Py(                                 0x00007fffe10f87f0,                             ),                             path: LookupPath(                                 [                                     S(                                         "plane_id",                                         Py(                                             0x00007fffe10f87f0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe10f87f0,                         ),                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe1c93530,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "plane_intersect_and_project": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe1c93530,                                                 ),                                             ],                                         },                                         expected_repr: "'plane_intersect_and_project'",                                         name: "literal['plane_intersect_and_project']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['plane_intersect_and_project']]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "window",                         lookup_key: Simple {                             key: "window",                             py_key: Py(                                 0x00007ffffdca04f0,                             ),                             path: LookupPath(                                 [                                     S(                                         "window",                                         Py(                                             0x00007ffffdca04f0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007ffffdca04f0,                         ),                         validator: Model(                             ModelValidator {                                 revalidate: Never,                                 validator: ModelFields(                                     ModelFieldsValidator {                                         fields: [                                             Field {                                                 name: "x",                                                 lookup_key: Simple {                                                     key: "x",                                                     py_key: Py(                                                         0x00007fffff8fe870,                                                     ),                                                     path: LookupPath(                                                         [                                                             S(                                                                 "x",                                                                 Py(                                                                     0x00007fffff8fe870,                                                                 ),                                                             ),                                                         ],                                                     ),                                                 },                                                 name_py: Py(                                                     0x00007fffff8fe870,                                                 ),                                                 validator: Float(                                                     FloatValidator {                                                         strict: false,                                                         allow_inf_nan: true,                                                     },                                                 ),                                                 frozen: false,                                             },                                             Field {                                                 name: "y",                                                 lookup_key: Simple {                                                     key: "y",                                                     py_key: Py(                                                         0x00007fffff72a730,                                                     ),                                                     path: LookupPath(                                                         [                                                             S(                                                                 "y",                                                                 Py(                                                                     0x00007fffff72a730,                                                                 ),                                                             ),                                                         ],                                                     ),                                                 },                                                 name_py: Py(                                                     0x00007fffff72a730,                                                 ),                                                 validator: Float(                                                     FloatValidator {                                                         strict: false,                                                         allow_inf_nan: true,                                                     },                                                 ),                                                 frozen: false,                                             },                                         ],                                         model_name: "Point2d",                                         extra_behavior: Ignore,                                         extras_validator: None,                                         strict: false,                                         from_attributes: false,                                         loc_by_alias: true,                                     },                                 ),                                 class: Py(                                     0x0000555556eaa360,                                 ),                                 post_init: None,                                 frozen: false,                                 custom_init: false,                                 root_model: false,                                 name: "Point2d",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "plane_intersect_and_project",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556fc3a50,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "plane_intersect_and_project",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, plane_id: str, type: Literal['plane_intersect_and_project'] = 'plane_intersect_and_project', window: kittycad.models.point2d.Point2d) -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'plane_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['plane_intersect_and_project'], required=False, default='plane_intersect_and_project'), 'window': FieldInfo(annotation=Point2d, required=True)}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

plane_id: str[source]
classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['plane_intersect_and_project'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

window: Point2d[source]
class kittycad.models.modeling_cmd.plane_set_color(**data)[source][source]

Set the plane’s color.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'color': <class 'kittycad.models.color.Color'>, 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'plane_id': <class 'str'>, 'type': typing.Literal['plane_set_color']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'color': FieldInfo(annotation=Color, required=True), 'plane_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['plane_set_color'], required=False, default='plane_set_color')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.plane_set_color'>, 'config': {'title': 'plane_set_color'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.plane_set_color'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.plane_set_color'>>]}, 'ref': 'kittycad.models.modeling_cmd.plane_set_color:93825019663104', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'color': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'cls': <class 'kittycad.models.color.Color'>, 'config': {'title': 'Color'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.color.Color'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.color.Color'>>]}, 'ref': 'kittycad.models.color.Color:93825013450848', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'a': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}, 'b': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}, 'g': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}, 'r': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}}, 'model_name': 'Color', 'type': 'model-fields'}, 'type': 'model'}, 'type': 'model-field'}, 'plane_id': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'plane_set_color', 'schema': {'expected': ['plane_set_color'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'plane_set_color', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_fade': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_set_opacity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'get_entity_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entities': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_plane': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'new_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_bring_to_front': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_visible': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'send_object': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid2d_add_hole': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_edge_faces': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_opposite_edges': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_next_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_opposite_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_prev_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'update_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556f7d300,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "plane_id": SerField {                         key_py: Py(                             0x00007fffe10f87f0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Str(                                 StrSerializer,                             ),                         ),                         required: true,                     },                     "color": SerField {                         key_py: Py(                             0x00007fffff6e21b0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Model(                                 ModelSerializer {                                     class: Py(                                         0x0000555556990860,                                     ),                                     serializer: Fields(                                         GeneralFieldsSerializer {                                             fields: {                                                 "r": SerField {                                                     key_py: Py(                                                         0x00007fffff89d4b0,                                                     ),                                                     alias: None,                                                     alias_py: None,                                                     serializer: Some(                                                         Float(                                                             FloatSerializer {                                                                 inf_nan_mode: Null,                                                             },                                                         ),                                                     ),                                                     required: true,                                                 },                                                 "a": SerField {                                                     key_py: Py(                                                         0x00007fffff82fa70,                                                     ),                                                     alias: None,                                                     alias_py: None,                                                     serializer: Some(                                                         Float(                                                             FloatSerializer {                                                                 inf_nan_mode: Null,                                                             },                                                         ),                                                     ),                                                     required: true,                                                 },                                                 "b": SerField {                                                     key_py: Py(                                                         0x00007fffff86b330,                                                     ),                                                     alias: None,                                                     alias_py: None,                                                     serializer: Some(                                                         Float(                                                             FloatSerializer {                                                                 inf_nan_mode: Null,                                                             },                                                         ),                                                     ),                                                     required: true,                                                 },                                                 "g": SerField {                                                     key_py: Py(                                                         0x00007fffff858bb0,                                                     ),                                                     alias: None,                                                     alias_py: None,                                                     serializer: Some(                                                         Float(                                                             FloatSerializer {                                                                 inf_nan_mode: Null,                                                             },                                                         ),                                                     ),                                                     required: true,                                                 },                                             },                                             computed_fields: Some(                                                 ComputedFields(                                                     [],                                                 ),                                             ),                                             mode: SimpleDict,                                             extra_serializer: None,                                             filter: SchemaFilter {                                                 include: None,                                                 exclude: None,                                             },                                             required_fields: 4,                                         },                                     ),                                     has_extra: false,                                     root_model: false,                                     name: "Color",                                 },                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe10f8630,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "plane_set_color",                                             },                                             expected_py: None,                                             name: "literal['plane_set_color']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 3,             },         ),         has_extra: false,         root_model: false,         name: "plane_set_color",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="plane_set_color", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "color",                         lookup_key: Simple {                             key: "color",                             py_key: Py(                                 0x00007fffff6e21b0,                             ),                             path: LookupPath(                                 [                                     S(                                         "color",                                         Py(                                             0x00007fffff6e21b0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff6e21b0,                         ),                         validator: Model(                             ModelValidator {                                 revalidate: Never,                                 validator: ModelFields(                                     ModelFieldsValidator {                                         fields: [                                             Field {                                                 name: "a",                                                 lookup_key: Simple {                                                     key: "a",                                                     py_key: Py(                                                         0x00007fffff82fa70,                                                     ),                                                     path: LookupPath(                                                         [                                                             S(                                                                 "a",                                                                 Py(                                                                     0x00007fffff82fa70,                                                                 ),                                                             ),                                                         ],                                                     ),                                                 },                                                 name_py: Py(                                                     0x00007fffff82fa70,                                                 ),                                                 validator: Float(                                                     FloatValidator {                                                         strict: false,                                                         allow_inf_nan: true,                                                     },                                                 ),                                                 frozen: false,                                             },                                             Field {                                                 name: "b",                                                 lookup_key: Simple {                                                     key: "b",                                                     py_key: Py(                                                         0x00007fffff86b330,                                                     ),                                                     path: LookupPath(                                                         [                                                             S(                                                                 "b",                                                                 Py(                                                                     0x00007fffff86b330,                                                                 ),                                                             ),                                                         ],                                                     ),                                                 },                                                 name_py: Py(                                                     0x00007fffff86b330,                                                 ),                                                 validator: Float(                                                     FloatValidator {                                                         strict: false,                                                         allow_inf_nan: true,                                                     },                                                 ),                                                 frozen: false,                                             },                                             Field {                                                 name: "g",                                                 lookup_key: Simple {                                                     key: "g",                                                     py_key: Py(                                                         0x00007fffff858bb0,                                                     ),                                                     path: LookupPath(                                                         [                                                             S(                                                                 "g",                                                                 Py(                                                                     0x00007fffff858bb0,                                                                 ),                                                             ),                                                         ],                                                     ),                                                 },                                                 name_py: Py(                                                     0x00007fffff858bb0,                                                 ),                                                 validator: Float(                                                     FloatValidator {                                                         strict: false,                                                         allow_inf_nan: true,                                                     },                                                 ),                                                 frozen: false,                                             },                                             Field {                                                 name: "r",                                                 lookup_key: Simple {                                                     key: "r",                                                     py_key: Py(                                                         0x00007fffff89d4b0,                                                     ),                                                     path: LookupPath(                                                         [                                                             S(                                                                 "r",                                                                 Py(                                                                     0x00007fffff89d4b0,                                                                 ),                                                             ),                                                         ],                                                     ),                                                 },                                                 name_py: Py(                                                     0x00007fffff89d4b0,                                                 ),                                                 validator: Float(                                                     FloatValidator {                                                         strict: false,                                                         allow_inf_nan: true,                                                     },                                                 ),                                                 frozen: false,                                             },                                         ],                                         model_name: "Color",                                         extra_behavior: Ignore,                                         extras_validator: None,                                         strict: false,                                         from_attributes: false,                                         loc_by_alias: true,                                     },                                 ),                                 class: Py(                                     0x0000555556990860,                                 ),                                 post_init: None,                                 frozen: false,                                 custom_init: false,                                 root_model: false,                                 name: "Color",                             },                         ),                         frozen: false,                     },                     Field {                         name: "plane_id",                         lookup_key: Simple {                             key: "plane_id",                             py_key: Py(                                 0x00007fffe10f87f0,                             ),                             path: LookupPath(                                 [                                     S(                                         "plane_id",                                         Py(                                             0x00007fffe10f87f0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe10f87f0,                         ),                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe10f8630,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "plane_set_color": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe10f8630,                                                 ),                                             ],                                         },                                         expected_repr: "'plane_set_color'",                                         name: "literal['plane_set_color']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['plane_set_color']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "plane_set_color",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556f7d300,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "plane_set_color",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, color: kittycad.models.color.Color, plane_id: str, type: Literal['plane_set_color'] = 'plane_set_color') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

color: Color[source]
classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'color': FieldInfo(annotation=Color, required=True), 'plane_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['plane_set_color'], required=False, default='plane_set_color')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

plane_id: str[source]
classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['plane_set_color'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.reconfigure_stream(**data)[source][source]

Reconfigure the stream.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'fps': <class 'int'>, 'height': <class 'int'>, 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'type': typing.Literal['reconfigure_stream'], 'width': <class 'int'>}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'fps': FieldInfo(annotation=int, required=True), 'height': FieldInfo(annotation=int, required=True), 'type': FieldInfo(annotation=Literal['reconfigure_stream'], required=False, default='reconfigure_stream'), 'width': FieldInfo(annotation=int, required=True)}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.reconfigure_stream'>, 'config': {'title': 'reconfigure_stream'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.reconfigure_stream'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.reconfigure_stream'>>]}, 'ref': 'kittycad.models.modeling_cmd.reconfigure_stream:93825017396320', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'fps': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'int'}, 'type': 'model-field'}, 'height': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'int'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'reconfigure_stream', 'schema': {'expected': ['reconfigure_stream'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}, 'width': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'int'}, 'type': 'model-field'}}, 'model_name': 'reconfigure_stream', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_control_points': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_end_points': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_fade': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_set_opacity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'get_entity_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'handle_mouse_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'handle_mouse_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'handle_mouse_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entities': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_axes_gizmo': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_plane': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_click': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'new_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_bring_to_front': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_visible': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_curve_uuids_for_vertices': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_info': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_vertex_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'plane_intersect_and_project': <pydantic._internal._model_construction._PydanticWeakRef object>, 'plane_set_color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'remove_scene_objects': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'send_object': <pydantic._internal._model_construction._PydanticWeakRef object>, 'set_tool': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_disable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_enable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid2d_add_hole': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_edge_faces': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_opposite_edges': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_next_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_opposite_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_prev_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'take_snapshot': <pydantic._internal._model_construction._PydanticWeakRef object>, 'update_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556d53c60,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "width": SerField {                         key_py: Py(                             0x00007fffff8e3c30,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Int(                                 IntSerializer,                             ),                         ),                         required: true,                     },                     "fps": SerField {                         key_py: Py(                             0x00007fffe2fd9f30,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Int(                                 IntSerializer,                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe114b530,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "reconfigure_stream",                                             },                                             expected_py: None,                                             name: "literal['reconfigure_stream']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                     "height": SerField {                         key_py: Py(                             0x00007ffffea4b1b0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Int(                                 IntSerializer,                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 4,             },         ),         has_extra: false,         root_model: false,         name: "reconfigure_stream",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="reconfigure_stream", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "fps",                         lookup_key: Simple {                             key: "fps",                             py_key: Py(                                 0x00007fffe2fd9f30,                             ),                             path: LookupPath(                                 [                                     S(                                         "fps",                                         Py(                                             0x00007fffe2fd9f30,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe2fd9f30,                         ),                         validator: Int(                             IntValidator {                                 strict: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "height",                         lookup_key: Simple {                             key: "height",                             py_key: Py(                                 0x00007ffffea4b1b0,                             ),                             path: LookupPath(                                 [                                     S(                                         "height",                                         Py(                                             0x00007ffffea4b1b0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007ffffea4b1b0,                         ),                         validator: Int(                             IntValidator {                                 strict: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe114b530,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "reconfigure_stream": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe114b530,                                                 ),                                             ],                                         },                                         expected_repr: "'reconfigure_stream'",                                         name: "literal['reconfigure_stream']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['reconfigure_stream']]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "width",                         lookup_key: Simple {                             key: "width",                             py_key: Py(                                 0x00007fffff8e3c30,                             ),                             path: LookupPath(                                 [                                     S(                                         "width",                                         Py(                                             0x00007fffff8e3c30,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8e3c30,                         ),                         validator: Int(                             IntValidator {                                 strict: false,                             },                         ),                         frozen: false,                     },                 ],                 model_name: "reconfigure_stream",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556d53c60,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "reconfigure_stream",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, fps: int, height: int, type: Literal['reconfigure_stream'] = 'reconfigure_stream', width: int) -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

fps: int[source]
classmethod from_orm(cls, obj)[source]
Return type:

Model

height: int[source]
json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'fps': FieldInfo(annotation=int, required=True), 'height': FieldInfo(annotation=int, required=True), 'type': FieldInfo(annotation=Literal['reconfigure_stream'], required=False, default='reconfigure_stream'), 'width': FieldInfo(annotation=int, required=True)}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['reconfigure_stream'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

width: int[source]
class kittycad.models.modeling_cmd.remove_scene_objects(**data)[source][source]

Remove scene objects.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'object_ids': typing.List[str], 'type': typing.Literal['remove_scene_objects']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'object_ids': FieldInfo(annotation=List[str], required=True), 'type': FieldInfo(annotation=Literal['remove_scene_objects'], required=False, default='remove_scene_objects')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.remove_scene_objects'>, 'config': {'title': 'remove_scene_objects'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.remove_scene_objects'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.remove_scene_objects'>>]}, 'ref': 'kittycad.models.modeling_cmd.remove_scene_objects:93825019927232', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'object_ids': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'items_schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'strict': False, 'type': 'list'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'remove_scene_objects', 'schema': {'expected': ['remove_scene_objects'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'remove_scene_objects', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_control_points': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_fade': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_set_opacity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'get_entity_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'handle_mouse_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'handle_mouse_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'handle_mouse_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entities': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_axes_gizmo': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_plane': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_click': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'new_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_bring_to_front': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_visible': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_curve_uuids_for_vertices': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_info': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_vertex_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'plane_set_color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'send_object': <pydantic._internal._model_construction._PydanticWeakRef object>, 'set_tool': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_disable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_enable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid2d_add_hole': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_edge_faces': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_opposite_edges': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_next_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_opposite_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_prev_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'take_snapshot': <pydantic._internal._model_construction._PydanticWeakRef object>, 'update_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556fbdac0,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe114b3f0,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "remove_scene_objects",                                             },                                             expected_py: None,                                             name: "literal['remove_scene_objects']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                     "object_ids": SerField {                         key_py: Py(                             0x00007fffe10f8830,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             List(                                 ListSerializer {                                     item_serializer: Str(                                         StrSerializer,                                     ),                                     filter: SchemaFilter {                                         include: None,                                         exclude: None,                                     },                                     name: "list[str]",                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 2,             },         ),         has_extra: false,         root_model: false,         name: "remove_scene_objects",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="remove_scene_objects", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "object_ids",                         lookup_key: Simple {                             key: "object_ids",                             py_key: Py(                                 0x00007fffe10f8830,                             ),                             path: LookupPath(                                 [                                     S(                                         "object_ids",                                         Py(                                             0x00007fffe10f8830,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe10f8830,                         ),                         validator: List(                             ListValidator {                                 strict: false,                                 item_validator: Some(                                     Str(                                         StrValidator {                                             strict: false,                                             coerce_numbers_to_str: false,                                         },                                     ),                                 ),                                 min_length: None,                                 max_length: None,                                 name: OnceLock(                                     <uninit>,                                 ),                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe114b3f0,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "remove_scene_objects": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe114b3f0,                                                 ),                                             ],                                         },                                         expected_repr: "'remove_scene_objects'",                                         name: "literal['remove_scene_objects']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['remove_scene_objects']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "remove_scene_objects",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556fbdac0,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "remove_scene_objects",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, object_ids: List[str], type: Literal['remove_scene_objects'] = 'remove_scene_objects') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'object_ids': FieldInfo(annotation=List[str], required=True), 'type': FieldInfo(annotation=Literal['remove_scene_objects'], required=False, default='remove_scene_objects')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

object_ids: List[str][source]
classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['remove_scene_objects'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.select_add(**data)[source][source]

Adds one or more entities (by UUID) to the selection.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'entities': typing.List[str], 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'type': typing.Literal['select_add']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'entities': FieldInfo(annotation=List[str], required=True), 'type': FieldInfo(annotation=Literal['select_add'], required=False, default='select_add')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.select_add'>, 'config': {'title': 'select_add'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.select_add'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.select_add'>>]}, 'ref': 'kittycad.models.modeling_cmd.select_add:93825019242176', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'entities': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'items_schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'strict': False, 'type': 'list'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'select_add', 'schema': {'expected': ['select_add'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'select_add', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556f166c0,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "entities": SerField {                         key_py: Py(                             0x00007ffffe25daf0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             List(                                 ListSerializer {                                     item_serializer: Str(                                         StrSerializer,                                     ),                                     filter: SchemaFilter {                                         include: None,                                         exclude: None,                                     },                                     name: "list[str]",                                 },                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe140e3f0,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "select_add",                                             },                                             expected_py: None,                                             name: "literal['select_add']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 2,             },         ),         has_extra: false,         root_model: false,         name: "select_add",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="select_add", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "entities",                         lookup_key: Simple {                             key: "entities",                             py_key: Py(                                 0x00007ffffe25daf0,                             ),                             path: LookupPath(                                 [                                     S(                                         "entities",                                         Py(                                             0x00007ffffe25daf0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007ffffe25daf0,                         ),                         validator: List(                             ListValidator {                                 strict: false,                                 item_validator: Some(                                     Str(                                         StrValidator {                                             strict: false,                                             coerce_numbers_to_str: false,                                         },                                     ),                                 ),                                 min_length: None,                                 max_length: None,                                 name: OnceLock(                                     <uninit>,                                 ),                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe140e3f0,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "select_add": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe140e3f0,                                                 ),                                             ],                                         },                                         expected_repr: "'select_add'",                                         name: "literal['select_add']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['select_add']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "select_add",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556f166c0,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "select_add",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, entities: List[str], type: Literal['select_add'] = 'select_add') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

entities: List[str][source]
classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'entities': FieldInfo(annotation=List[str], required=True), 'type': FieldInfo(annotation=Literal['select_add'], required=False, default='select_add')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['select_add'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.select_clear(**data)[source][source]

Clear the selection

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'type': typing.Literal['select_clear']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'type': FieldInfo(annotation=Literal['select_clear'], required=False, default='select_clear')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.select_clear'>, 'config': {'title': 'select_clear'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.select_clear'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.select_clear'>>]}, 'ref': 'kittycad.models.modeling_cmd.select_clear:93825019240672', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'select_clear', 'schema': {'expected': ['select_clear'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'select_clear', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556f160e0,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe1132a30,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "select_clear",                                             },                                             expected_py: None,                                             name: "literal['select_clear']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 1,             },         ),         has_extra: false,         root_model: false,         name: "select_clear",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="select_clear", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe1132a30,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "select_clear": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe1132a30,                                                 ),                                             ],                                         },                                         expected_repr: "'select_clear'",                                         name: "literal['select_clear']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['select_clear']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "select_clear",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556f160e0,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "select_clear",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, type: Literal['select_clear'] = 'select_clear') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'type': FieldInfo(annotation=Literal['select_clear'], required=False, default='select_clear')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['select_clear'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.select_get(**data)[source][source]

Find all IDs of selected entities

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'type': typing.Literal['select_get']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'type': FieldInfo(annotation=Literal['select_get'], required=False, default='select_get')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.select_get'>, 'config': {'title': 'select_get'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.select_get'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.select_get'>>]}, 'ref': 'kittycad.models.modeling_cmd.select_get:93825019316288', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'select_get', 'schema': {'expected': ['select_get'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'select_get', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556f28840,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe1c7b730,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "select_get",                                             },                                             expected_py: None,                                             name: "literal['select_get']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 1,             },         ),         has_extra: false,         root_model: false,         name: "select_get",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="select_get", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe1c7b730,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "select_get": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe1c7b730,                                                 ),                                             ],                                         },                                         expected_repr: "'select_get'",                                         name: "literal['select_get']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['select_get']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "select_get",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556f28840,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "select_get",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, type: Literal['select_get'] = 'select_get') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'type': FieldInfo(annotation=Literal['select_get'], required=False, default='select_get')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['select_get'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.select_remove(**data)[source][source]

Removes one or more entities (by UUID) from the selection.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'entities': typing.List[str], 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'type': typing.Literal['select_remove']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'entities': FieldInfo(annotation=List[str], required=True), 'type': FieldInfo(annotation=Literal['select_remove'], required=False, default='select_remove')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.select_remove'>, 'config': {'title': 'select_remove'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.select_remove'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.select_remove'>>]}, 'ref': 'kittycad.models.modeling_cmd.select_remove:93825019287952', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'entities': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'items_schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'strict': False, 'type': 'list'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'select_remove', 'schema': {'expected': ['select_remove'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'select_remove', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556f21990,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "entities": SerField {                         key_py: Py(                             0x00007ffffe25daf0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             List(                                 ListSerializer {                                     item_serializer: Str(                                         StrSerializer,                                     ),                                     filter: SchemaFilter {                                         include: None,                                         exclude: None,                                     },                                     name: "list[str]",                                 },                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe10db4b0,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "select_remove",                                             },                                             expected_py: None,                                             name: "literal['select_remove']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 2,             },         ),         has_extra: false,         root_model: false,         name: "select_remove",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="select_remove", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "entities",                         lookup_key: Simple {                             key: "entities",                             py_key: Py(                                 0x00007ffffe25daf0,                             ),                             path: LookupPath(                                 [                                     S(                                         "entities",                                         Py(                                             0x00007ffffe25daf0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007ffffe25daf0,                         ),                         validator: List(                             ListValidator {                                 strict: false,                                 item_validator: Some(                                     Str(                                         StrValidator {                                             strict: false,                                             coerce_numbers_to_str: false,                                         },                                     ),                                 ),                                 min_length: None,                                 max_length: None,                                 name: OnceLock(                                     <uninit>,                                 ),                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe10db4b0,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "select_remove": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe10db4b0,                                                 ),                                             ],                                         },                                         expected_repr: "'select_remove'",                                         name: "literal['select_remove']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['select_remove']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "select_remove",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556f21990,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "select_remove",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, entities: List[str], type: Literal['select_remove'] = 'select_remove') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

entities: List[str][source]
classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'entities': FieldInfo(annotation=List[str], required=True), 'type': FieldInfo(annotation=Literal['select_remove'], required=False, default='select_remove')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['select_remove'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.select_replace(**data)[source][source]

Replaces the current selection with these new entities (by UUID). Equivalent to doing SelectClear then SelectAdd.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'entities': typing.List[str], 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'type': typing.Literal['select_replace']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'entities': FieldInfo(annotation=List[str], required=True), 'type': FieldInfo(annotation=Literal['select_replace'], required=False, default='select_replace')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.select_replace'>, 'config': {'title': 'select_replace'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.select_replace'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.select_replace'>>]}, 'ref': 'kittycad.models.modeling_cmd.select_replace:93825019305552', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'entities': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'items_schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'strict': False, 'type': 'list'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'select_replace', 'schema': {'expected': ['select_replace'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'select_replace', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556f25e50,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "entities": SerField {                         key_py: Py(                             0x00007ffffe25daf0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             List(                                 ListSerializer {                                     item_serializer: Str(                                         StrSerializer,                                     ),                                     filter: SchemaFilter {                                         include: None,                                         exclude: None,                                     },                                     name: "list[str]",                                 },                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe10db330,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "select_replace",                                             },                                             expected_py: None,                                             name: "literal['select_replace']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 2,             },         ),         has_extra: false,         root_model: false,         name: "select_replace",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="select_replace", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "entities",                         lookup_key: Simple {                             key: "entities",                             py_key: Py(                                 0x00007ffffe25daf0,                             ),                             path: LookupPath(                                 [                                     S(                                         "entities",                                         Py(                                             0x00007ffffe25daf0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007ffffe25daf0,                         ),                         validator: List(                             ListValidator {                                 strict: false,                                 item_validator: Some(                                     Str(                                         StrValidator {                                             strict: false,                                             coerce_numbers_to_str: false,                                         },                                     ),                                 ),                                 min_length: None,                                 max_length: None,                                 name: OnceLock(                                     <uninit>,                                 ),                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe10db330,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "select_replace": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe10db330,                                                 ),                                             ],                                         },                                         expected_repr: "'select_replace'",                                         name: "literal['select_replace']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['select_replace']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "select_replace",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556f25e50,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "select_replace",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, entities: List[str], type: Literal['select_replace'] = 'select_replace') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

entities: List[str][source]
classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'entities': FieldInfo(annotation=List[str], required=True), 'type': FieldInfo(annotation=Literal['select_replace'], required=False, default='select_replace')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['select_replace'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.select_with_point(**data)[source][source]

Modifies the selection by simulating a “mouse click” at the given x,y window coordinate Returns ID of whatever was selected.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'selected_at_window': <class 'kittycad.models.point2d.Point2d'>, 'selection_type': <enum 'SceneSelectionType'>, 'type': typing.Literal['select_with_point']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'selected_at_window': FieldInfo(annotation=Point2d, required=True), 'selection_type': FieldInfo(annotation=SceneSelectionType, required=True), 'type': FieldInfo(annotation=Literal['select_with_point'], required=False, default='select_with_point')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.select_with_point'>, 'config': {'title': 'select_with_point'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.select_with_point'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.select_with_point'>>]}, 'ref': 'kittycad.models.modeling_cmd.select_with_point:93825019231920', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'selected_at_window': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'cls': <class 'kittycad.models.point2d.Point2d'>, 'config': {'title': 'Point2d'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.point2d.Point2d'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.point2d.Point2d'>>]}, 'ref': 'kittycad.models.point2d.Point2d:93825018798944', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'x': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}, 'y': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}}, 'model_name': 'Point2d', 'type': 'model-fields'}, 'type': 'model'}, 'type': 'model-field'}, 'selection_type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'lax_schema': {'steps': [{'type': 'str'}, {'type': 'function-plain', 'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}}], 'type': 'chain'}, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_functions': [<function get_enum_core_schema.<locals>.get_json_schema>]}, 'ref': 'kittycad.models.scene_selection_type.SceneSelectionType:93825018635456', 'strict_schema': {'json_schema': {'function': {'function': <function get_enum_core_schema.<locals>.to_enum>, 'type': 'no-info'}, 'schema': {'type': 'str'}, 'type': 'function-after'}, 'python_schema': {'cls': <enum 'SceneSelectionType'>, 'type': 'is-instance'}, 'type': 'json-or-python'}, 'type': 'lax-or-strict'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'select_with_point', 'schema': {'expected': ['select_with_point'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'select_with_point', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556f13eb0,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe1c93670,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "select_with_point",                                             },                                             expected_py: None,                                             name: "literal['select_with_point']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                     "selected_at_window": SerField {                         key_py: Py(                             0x00007fffe113e030,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Model(                                 ModelSerializer {                                     class: Py(                                         0x0000555556eaa360,                                     ),                                     serializer: Fields(                                         GeneralFieldsSerializer {                                             fields: {                                                 "x": SerField {                                                     key_py: Py(                                                         0x00007fffff8fe870,                                                     ),                                                     alias: None,                                                     alias_py: None,                                                     serializer: Some(                                                         Float(                                                             FloatSerializer {                                                                 inf_nan_mode: Null,                                                             },                                                         ),                                                     ),                                                     required: true,                                                 },                                                 "y": SerField {                                                     key_py: Py(                                                         0x00007fffff72a730,                                                     ),                                                     alias: None,                                                     alias_py: None,                                                     serializer: Some(                                                         Float(                                                             FloatSerializer {                                                                 inf_nan_mode: Null,                                                             },                                                         ),                                                     ),                                                     required: true,                                                 },                                             },                                             computed_fields: Some(                                                 ComputedFields(                                                     [],                                                 ),                                             ),                                             mode: SimpleDict,                                             extra_serializer: None,                                             filter: SchemaFilter {                                                 include: None,                                                 exclude: None,                                             },                                             required_fields: 2,                                         },                                     ),                                     has_extra: false,                                     root_model: false,                                     name: "Point2d",                                 },                             ),                         ),                         required: true,                     },                     "selection_type": SerField {                         key_py: Py(                             0x00007fffe1132bf0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             JsonOrPython(                                 JsonOrPythonSerializer {                                     json: Str(                                         StrSerializer,                                     ),                                     python: Any(                                         AnySerializer,                                     ),                                     name: "json-or-python[json=str, python=any]",                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 3,             },         ),         has_extra: false,         root_model: false,         name: "select_with_point",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="select_with_point", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "selected_at_window",                         lookup_key: Simple {                             key: "selected_at_window",                             py_key: Py(                                 0x00007fffe113e030,                             ),                             path: LookupPath(                                 [                                     S(                                         "selected_at_window",                                         Py(                                             0x00007fffe113e030,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe113e030,                         ),                         validator: Model(                             ModelValidator {                                 revalidate: Never,                                 validator: ModelFields(                                     ModelFieldsValidator {                                         fields: [                                             Field {                                                 name: "x",                                                 lookup_key: Simple {                                                     key: "x",                                                     py_key: Py(                                                         0x00007fffff8fe870,                                                     ),                                                     path: LookupPath(                                                         [                                                             S(                                                                 "x",                                                                 Py(                                                                     0x00007fffff8fe870,                                                                 ),                                                             ),                                                         ],                                                     ),                                                 },                                                 name_py: Py(                                                     0x00007fffff8fe870,                                                 ),                                                 validator: Float(                                                     FloatValidator {                                                         strict: false,                                                         allow_inf_nan: true,                                                     },                                                 ),                                                 frozen: false,                                             },                                             Field {                                                 name: "y",                                                 lookup_key: Simple {                                                     key: "y",                                                     py_key: Py(                                                         0x00007fffff72a730,                                                     ),                                                     path: LookupPath(                                                         [                                                             S(                                                                 "y",                                                                 Py(                                                                     0x00007fffff72a730,                                                                 ),                                                             ),                                                         ],                                                     ),                                                 },                                                 name_py: Py(                                                     0x00007fffff72a730,                                                 ),                                                 validator: Float(                                                     FloatValidator {                                                         strict: false,                                                         allow_inf_nan: true,                                                     },                                                 ),                                                 frozen: false,                                             },                                         ],                                         model_name: "Point2d",                                         extra_behavior: Ignore,                                         extras_validator: None,                                         strict: false,                                         from_attributes: false,                                         loc_by_alias: true,                                     },                                 ),                                 class: Py(                                     0x0000555556eaa360,                                 ),                                 post_init: None,                                 frozen: false,                                 custom_init: false,                                 root_model: false,                                 name: "Point2d",                             },                         ),                         frozen: false,                     },                     Field {                         name: "selection_type",                         lookup_key: Simple {                             key: "selection_type",                             py_key: Py(                                 0x00007fffe1132bf0,                             ),                             path: LookupPath(                                 [                                     S(                                         "selection_type",                                         Py(                                             0x00007fffe1132bf0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe1132bf0,                         ),                         validator: LaxOrStrict(                             LaxOrStrictValidator {                                 strict: false,                                 lax_validator: Chain(                                     ChainValidator {                                         steps: [                                             Str(                                                 StrValidator {                                                     strict: false,                                                     coerce_numbers_to_str: false,                                                 },                                             ),                                             FunctionPlain(                                                 FunctionPlainValidator {                                                     func: Py(                                                         0x00007fffe1009790,                                                     ),                                                     config: Py(                                                         0x00007fffe108b980,                                                     ),                                                     name: "function-plain[to_enum()]",                                                     field_name: None,                                                     info_arg: false,                                                 },                                             ),                                         ],                                         name: "chain[str,function-plain[to_enum()]]",                                     },                                 ),                                 strict_validator: JsonOrPython(                                     JsonOrPython {                                         json: FunctionAfter(                                             FunctionAfterValidator {                                                 validator: Str(                                                     StrValidator {                                                         strict: false,                                                         coerce_numbers_to_str: false,                                                     },                                                 ),                                                 func: Py(                                                     0x00007fffe1009790,                                                 ),                                                 config: Py(                                                     0x00007fffe108b980,                                                 ),                                                 name: "function-after[to_enum(), str]",                                                 field_name: None,                                                 info_arg: false,                                             },                                         ),                                         python: IsInstance(                                             IsInstanceValidator {                                                 class: Py(                                                     0x0000555556e824c0,                                                 ),                                                 class_repr: "SceneSelectionType",                                                 name: "is-instance[SceneSelectionType]",                                             },                                         ),                                         name: "json-or-python[json=function-after[to_enum(), str],python=is-instance[SceneSelectionType]]",                                     },                                 ),                                 name: "lax-or-strict[lax=chain[str,function-plain[to_enum()]],strict=json-or-python[json=function-after[to_enum(), str],python=is-instance[SceneSelectionType]]]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe1c93670,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "select_with_point": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe1c93670,                                                 ),                                             ],                                         },                                         expected_repr: "'select_with_point'",                                         name: "literal['select_with_point']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['select_with_point']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "select_with_point",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556f13eb0,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "select_with_point",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, selected_at_window: kittycad.models.point2d.Point2d, selection_type: kittycad.models.scene_selection_type.SceneSelectionType, type: Literal['select_with_point'] = 'select_with_point') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'selected_at_window': FieldInfo(annotation=Point2d, required=True), 'selection_type': FieldInfo(annotation=SceneSelectionType, required=True), 'type': FieldInfo(annotation=Literal['select_with_point'], required=False, default='select_with_point')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

selected_at_window: Point2d[source]
selection_type: SceneSelectionType[source]
type: Literal['select_with_point'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.send_object(**data)[source][source]

Sends object to front or back.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'front': <class 'bool'>, 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'object_id': <class 'str'>, 'type': typing.Literal['send_object']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'front': FieldInfo(annotation=bool, required=True), 'object_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['send_object'], required=False, default='send_object')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.send_object'>, 'config': {'title': 'send_object'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.send_object'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.send_object'>>]}, 'ref': 'kittycad.models.modeling_cmd.send_object:93825019589984', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'front': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'bool'}, 'type': 'model-field'}, 'object_id': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'send_object', 'schema': {'expected': ['send_object'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'send_object', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'get_entity_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entities': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'new_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_bring_to_front': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_visible': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid2d_add_hole': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_edge_faces': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_opposite_edges': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_next_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_opposite_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_prev_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'update_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556f6b560,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "front": SerField {                         key_py: Py(                             0x00007fffe2322e70,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Bool(                                 BoolSerializer,                             ),                         ),                         required: true,                     },                     "object_id": SerField {                         key_py: Py(                             0x00007ffffdc17c30,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Str(                                 StrSerializer,                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe10820f0,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "send_object",                                             },                                             expected_py: None,                                             name: "literal['send_object']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 3,             },         ),         has_extra: false,         root_model: false,         name: "send_object",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="send_object", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "front",                         lookup_key: Simple {                             key: "front",                             py_key: Py(                                 0x00007fffe2322e70,                             ),                             path: LookupPath(                                 [                                     S(                                         "front",                                         Py(                                             0x00007fffe2322e70,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe2322e70,                         ),                         validator: Bool(                             BoolValidator {                                 strict: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "object_id",                         lookup_key: Simple {                             key: "object_id",                             py_key: Py(                                 0x00007ffffdc17c30,                             ),                             path: LookupPath(                                 [                                     S(                                         "object_id",                                         Py(                                             0x00007ffffdc17c30,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007ffffdc17c30,                         ),                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe10820f0,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "send_object": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe10820f0,                                                 ),                                             ],                                         },                                         expected_repr: "'send_object'",                                         name: "literal['send_object']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['send_object']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "send_object",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556f6b560,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "send_object",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, front: bool, object_id: str, type: Literal['send_object'] = 'send_object') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

classmethod from_orm(cls, obj)[source]
Return type:

Model

front: bool[source]
json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'front': FieldInfo(annotation=bool, required=True), 'object_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['send_object'], required=False, default='send_object')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

object_id: str[source]
classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['send_object'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.set_tool(**data)[source][source]

Set the active tool.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'tool': <enum 'SceneToolType'>, 'type': typing.Literal['set_tool']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'tool': FieldInfo(annotation=SceneToolType, required=True), 'type': FieldInfo(annotation=Literal['set_tool'], required=False, default='set_tool')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.set_tool'>, 'config': {'title': 'set_tool'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.set_tool'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.set_tool'>>]}, 'ref': 'kittycad.models.modeling_cmd.set_tool:93825019625856', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'tool': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'lax_schema': {'steps': [{'type': 'str'}, {'type': 'function-plain', 'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}}], 'type': 'chain'}, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_functions': [<function get_enum_core_schema.<locals>.get_json_schema>]}, 'ref': 'kittycad.models.scene_tool_type.SceneToolType:93825018711776', 'strict_schema': {'json_schema': {'function': {'function': <function get_enum_core_schema.<locals>.to_enum>, 'type': 'no-info'}, 'schema': {'type': 'str'}, 'type': 'function-after'}, 'python_schema': {'cls': <enum 'SceneToolType'>, 'type': 'is-instance'}, 'type': 'json-or-python'}, 'type': 'lax-or-strict'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'set_tool', 'schema': {'expected': ['set_tool'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'set_tool', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_fade': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_set_opacity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'get_entity_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entities': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_plane': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'new_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_bring_to_front': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_visible': <pydantic._internal._model_construction._PydanticWeakRef object>, 'plane_set_color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'send_object': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid2d_add_hole': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_edge_faces': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_opposite_edges': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_next_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_opposite_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_prev_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'update_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556f74180,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe10f89b0,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "set_tool",                                             },                                             expected_py: None,                                             name: "literal['set_tool']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                     "tool": SerField {                         key_py: Py(                             0x00007fffe24af3f0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             JsonOrPython(                                 JsonOrPythonSerializer {                                     json: Str(                                         StrSerializer,                                     ),                                     python: Any(                                         AnySerializer,                                     ),                                     name: "json-or-python[json=str, python=any]",                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 2,             },         ),         has_extra: false,         root_model: false,         name: "set_tool",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="set_tool", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "tool",                         lookup_key: Simple {                             key: "tool",                             py_key: Py(                                 0x00007fffe24af3f0,                             ),                             path: LookupPath(                                 [                                     S(                                         "tool",                                         Py(                                             0x00007fffe24af3f0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe24af3f0,                         ),                         validator: LaxOrStrict(                             LaxOrStrictValidator {                                 strict: false,                                 lax_validator: Chain(                                     ChainValidator {                                         steps: [                                             Str(                                                 StrValidator {                                                     strict: false,                                                     coerce_numbers_to_str: false,                                                 },                                             ),                                             FunctionPlain(                                                 FunctionPlainValidator {                                                     func: Py(                                                         0x00007fffe0f4fee0,                                                     ),                                                     config: Py(                                                         0x00007fffe0f18fc0,                                                     ),                                                     name: "function-plain[to_enum()]",                                                     field_name: None,                                                     info_arg: false,                                                 },                                             ),                                         ],                                         name: "chain[str,function-plain[to_enum()]]",                                     },                                 ),                                 strict_validator: JsonOrPython(                                     JsonOrPython {                                         json: FunctionAfter(                                             FunctionAfterValidator {                                                 validator: Str(                                                     StrValidator {                                                         strict: false,                                                         coerce_numbers_to_str: false,                                                     },                                                 ),                                                 func: Py(                                                     0x00007fffe0f4fee0,                                                 ),                                                 config: Py(                                                     0x00007fffe0f18fc0,                                                 ),                                                 name: "function-after[to_enum(), str]",                                                 field_name: None,                                                 info_arg: false,                                             },                                         ),                                         python: IsInstance(                                             IsInstanceValidator {                                                 class: Py(                                                     0x0000555556e94ee0,                                                 ),                                                 class_repr: "SceneToolType",                                                 name: "is-instance[SceneToolType]",                                             },                                         ),                                         name: "json-or-python[json=function-after[to_enum(), str],python=is-instance[SceneToolType]]",                                     },                                 ),                                 name: "lax-or-strict[lax=chain[str,function-plain[to_enum()]],strict=json-or-python[json=function-after[to_enum(), str],python=is-instance[SceneToolType]]]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe10f89b0,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "set_tool": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe10f89b0,                                                 ),                                             ],                                         },                                         expected_repr: "'set_tool'",                                         name: "literal['set_tool']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['set_tool']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "set_tool",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556f74180,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "set_tool",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, tool: kittycad.models.scene_tool_type.SceneToolType, type: Literal['set_tool'] = 'set_tool') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'tool': FieldInfo(annotation=SceneToolType, required=True), 'type': FieldInfo(annotation=Literal['set_tool'], required=False, default='set_tool')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

tool: SceneToolType[source]
type: Literal['set_tool'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.sketch_mode_disable(**data)[source][source]

Disable sketch mode.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'type': typing.Literal['sketch_mode_disable']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'type': FieldInfo(annotation=Literal['sketch_mode_disable'], required=False, default='sketch_mode_disable')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.sketch_mode_disable'>, 'config': {'title': 'sketch_mode_disable'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.sketch_mode_disable'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.sketch_mode_disable'>>]}, 'ref': 'kittycad.models.modeling_cmd.sketch_mode_disable:93825019751504', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'sketch_mode_disable', 'schema': {'expected': ['sketch_mode_disable'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'sketch_mode_disable', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_fade': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_set_opacity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'get_entity_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entities': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_plane': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_click': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'new_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_bring_to_front': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_visible': <pydantic._internal._model_construction._PydanticWeakRef object>, 'plane_set_color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'send_object': <pydantic._internal._model_construction._PydanticWeakRef object>, 'set_tool': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_enable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid2d_add_hole': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_edge_faces': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_opposite_edges': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_next_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_opposite_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_prev_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'update_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556f92c50,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe113ea80,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "sketch_mode_disable",                                             },                                             expected_py: None,                                             name: "literal['sketch_mode_disable']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 1,             },         ),         has_extra: false,         root_model: false,         name: "sketch_mode_disable",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="sketch_mode_disable", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe113ea80,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "sketch_mode_disable": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe113ea80,                                                 ),                                             ],                                         },                                         expected_repr: "'sketch_mode_disable'",                                         name: "literal['sketch_mode_disable']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['sketch_mode_disable']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "sketch_mode_disable",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556f92c50,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "sketch_mode_disable",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, type: Literal['sketch_mode_disable'] = 'sketch_mode_disable') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'type': FieldInfo(annotation=Literal['sketch_mode_disable'], required=False, default='sketch_mode_disable')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['sketch_mode_disable'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.sketch_mode_enable(**data)[source][source]

Enable sketch mode on the given plane.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'animated': <class 'bool'>, 'disable_camera_with_plane': typing.Optional[kittycad.models.point3d.Point3d], 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'ortho': <class 'bool'>, 'plane_id': <class 'str'>, 'type': typing.Literal['sketch_mode_enable']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'animated': FieldInfo(annotation=bool, required=True), 'disable_camera_with_plane': FieldInfo(annotation=Union[Point3d, NoneType], required=False), 'ortho': FieldInfo(annotation=bool, required=True), 'plane_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['sketch_mode_enable'], required=False, default='sketch_mode_enable')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.sketch_mode_enable'>, 'config': {'title': 'sketch_mode_enable'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.sketch_mode_enable'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.sketch_mode_enable'>>]}, 'ref': 'kittycad.models.modeling_cmd.sketch_mode_enable:93825019721936', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'animated': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'bool'}, 'type': 'model-field'}, 'disable_camera_with_plane': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': None, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'schema': {'cls': <class 'kittycad.models.point3d.Point3d'>, 'config': {'title': 'Point3d'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.point3d.Point3d'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.point3d.Point3d'>>]}, 'ref': 'kittycad.models.point3d.Point3d:93825014233264', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'x': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}, 'y': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}, 'z': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}}, 'model_name': 'Point3d', 'type': 'model-fields'}, 'type': 'model'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'ortho': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'bool'}, 'type': 'model-field'}, 'plane_id': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'sketch_mode_enable', 'schema': {'expected': ['sketch_mode_enable'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'sketch_mode_enable', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_fade': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_set_opacity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'get_entity_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entities': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_plane': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_click': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'new_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_bring_to_front': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_visible': <pydantic._internal._model_construction._PydanticWeakRef object>, 'plane_set_color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'send_object': <pydantic._internal._model_construction._PydanticWeakRef object>, 'set_tool': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid2d_add_hole': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_edge_faces': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_opposite_edges': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_next_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_opposite_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_prev_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'update_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556f8b8d0,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe113e990,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "sketch_mode_enable",                                             },                                             expected_py: None,                                             name: "literal['sketch_mode_enable']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                     "ortho": SerField {                         key_py: Py(                             0x00007ffffddd9730,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Bool(                                 BoolSerializer,                             ),                         ),                         required: true,                     },                     "plane_id": SerField {                         key_py: Py(                             0x00007fffe10f87f0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Str(                                 StrSerializer,                             ),                         ),                         required: true,                     },                     "animated": SerField {                         key_py: Py(                             0x00007fffe22e4470,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Bool(                                 BoolSerializer,                             ),                         ),                         required: true,                     },                     "disable_camera_with_plane": SerField {                         key_py: Py(                             0x00007fffe113e9e0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007ffffff85420,                                         ),                                     ),                                     serializer: Nullable(                                         NullableSerializer {                                             serializer: Model(                                                 ModelSerializer {                                                     class: Py(                                                         0x0000555556a4f8b0,                                                     ),                                                     serializer: Fields(                                                         GeneralFieldsSerializer {                                                             fields: {                                                                 "y": SerField {                                                                     key_py: Py(                                                                         0x00007fffff72a730,                                                                     ),                                                                     alias: None,                                                                     alias_py: None,                                                                     serializer: Some(                                                                         Float(                                                                             FloatSerializer {                                                                                 inf_nan_mode: Null,                                                                             },                                                                         ),                                                                     ),                                                                     required: true,                                                                 },                                                                 "z": SerField {                                                                     key_py: Py(                                                                         0x00007fffff72a770,                                                                     ),                                                                     alias: None,                                                                     alias_py: None,                                                                     serializer: Some(                                                                         Float(                                                                             FloatSerializer {                                                                                 inf_nan_mode: Null,                                                                             },                                                                         ),                                                                     ),                                                                     required: true,                                                                 },                                                                 "x": SerField {                                                                     key_py: Py(                                                                         0x00007fffff8fe870,                                                                     ),                                                                     alias: None,                                                                     alias_py: None,                                                                     serializer: Some(                                                                         Float(                                                                             FloatSerializer {                                                                                 inf_nan_mode: Null,                                                                             },                                                                         ),                                                                     ),                                                                     required: true,                                                                 },                                                             },                                                             computed_fields: Some(                                                                 ComputedFields(                                                                     [],                                                                 ),                                                             ),                                                             mode: SimpleDict,                                                             extra_serializer: None,                                                             filter: SchemaFilter {                                                                 include: None,                                                                 exclude: None,                                                             },                                                             required_fields: 3,                                                         },                                                     ),                                                     has_extra: false,                                                     root_model: false,                                                     name: "Point3d",                                                 },                                             ),                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 5,             },         ),         has_extra: false,         root_model: false,         name: "sketch_mode_enable",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="sketch_mode_enable", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "animated",                         lookup_key: Simple {                             key: "animated",                             py_key: Py(                                 0x00007fffe22e4470,                             ),                             path: LookupPath(                                 [                                     S(                                         "animated",                                         Py(                                             0x00007fffe22e4470,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe22e4470,                         ),                         validator: Bool(                             BoolValidator {                                 strict: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "disable_camera_with_plane",                         lookup_key: Simple {                             key: "disable_camera_with_plane",                             py_key: Py(                                 0x00007fffe113e9e0,                             ),                             path: LookupPath(                                 [                                     S(                                         "disable_camera_with_plane",                                         Py(                                             0x00007fffe113e9e0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe113e9e0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007ffffff85420,                                     ),                                 ),                                 on_error: Raise,                                 validator: Nullable(                                     NullableValidator {                                         validator: Model(                                             ModelValidator {                                                 revalidate: Never,                                                 validator: ModelFields(                                                     ModelFieldsValidator {                                                         fields: [                                                             Field {                                                                 name: "x",                                                                 lookup_key: Simple {                                                                     key: "x",                                                                     py_key: Py(                                                                         0x00007fffff8fe870,                                                                     ),                                                                     path: LookupPath(                                                                         [                                                                             S(                                                                                 "x",                                                                                 Py(                                                                                     0x00007fffff8fe870,                                                                                 ),                                                                             ),                                                                         ],                                                                     ),                                                                 },                                                                 name_py: Py(                                                                     0x00007fffff8fe870,                                                                 ),                                                                 validator: Float(                                                                     FloatValidator {                                                                         strict: false,                                                                         allow_inf_nan: true,                                                                     },                                                                 ),                                                                 frozen: false,                                                             },                                                             Field {                                                                 name: "y",                                                                 lookup_key: Simple {                                                                     key: "y",                                                                     py_key: Py(                                                                         0x00007fffff72a730,                                                                     ),                                                                     path: LookupPath(                                                                         [                                                                             S(                                                                                 "y",                                                                                 Py(                                                                                     0x00007fffff72a730,                                                                                 ),                                                                             ),                                                                         ],                                                                     ),                                                                 },                                                                 name_py: Py(                                                                     0x00007fffff72a730,                                                                 ),                                                                 validator: Float(                                                                     FloatValidator {                                                                         strict: false,                                                                         allow_inf_nan: true,                                                                     },                                                                 ),                                                                 frozen: false,                                                             },                                                             Field {                                                                 name: "z",                                                                 lookup_key: Simple {                                                                     key: "z",                                                                     py_key: Py(                                                                         0x00007fffff72a770,                                                                     ),                                                                     path: LookupPath(                                                                         [                                                                             S(                                                                                 "z",                                                                                 Py(                                                                                     0x00007fffff72a770,                                                                                 ),                                                                             ),                                                                         ],                                                                     ),                                                                 },                                                                 name_py: Py(                                                                     0x00007fffff72a770,                                                                 ),                                                                 validator: Float(                                                                     FloatValidator {                                                                         strict: false,                                                                         allow_inf_nan: true,                                                                     },                                                                 ),                                                                 frozen: false,                                                             },                                                         ],                                                         model_name: "Point3d",                                                         extra_behavior: Ignore,                                                         extras_validator: None,                                                         strict: false,                                                         from_attributes: false,                                                         loc_by_alias: true,                                                     },                                                 ),                                                 class: Py(                                                     0x0000555556a4f8b0,                                                 ),                                                 post_init: None,                                                 frozen: false,                                                 custom_init: false,                                                 root_model: false,                                                 name: "Point3d",                                             },                                         ),                                         name: "nullable[Point3d]",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[nullable[Point3d]]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "ortho",                         lookup_key: Simple {                             key: "ortho",                             py_key: Py(                                 0x00007ffffddd9730,                             ),                             path: LookupPath(                                 [                                     S(                                         "ortho",                                         Py(                                             0x00007ffffddd9730,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007ffffddd9730,                         ),                         validator: Bool(                             BoolValidator {                                 strict: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "plane_id",                         lookup_key: Simple {                             key: "plane_id",                             py_key: Py(                                 0x00007fffe10f87f0,                             ),                             path: LookupPath(                                 [                                     S(                                         "plane_id",                                         Py(                                             0x00007fffe10f87f0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe10f87f0,                         ),                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe113e990,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "sketch_mode_enable": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe113e990,                                                 ),                                             ],                                         },                                         expected_repr: "'sketch_mode_enable'",                                         name: "literal['sketch_mode_enable']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['sketch_mode_enable']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "sketch_mode_enable",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556f8b8d0,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "sketch_mode_enable",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, animated: bool, disable_camera_with_plane: Optional[kittycad.models.point3d.Point3d] = None, ortho: bool, plane_id: str, type: Literal['sketch_mode_enable'] = 'sketch_mode_enable') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

animated: bool[source]
classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

disable_camera_with_plane: Optional[Point3d][source]
classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'animated': FieldInfo(annotation=bool, required=True), 'disable_camera_with_plane': FieldInfo(annotation=Union[Point3d, NoneType], required=False), 'ortho': FieldInfo(annotation=bool, required=True), 'plane_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['sketch_mode_enable'], required=False, default='sketch_mode_enable')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

ortho: bool[source]
classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

plane_id: str[source]
classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['sketch_mode_enable'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.solid2d_add_hole(**data)[source][source]

Add a hole to a Solid2d object before extruding it.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'hole_id': <class 'str'>, 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'object_id': <class 'str'>, 'type': typing.Literal['solid2d_add_hole']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'hole_id': FieldInfo(annotation=str, required=True), 'object_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['solid2d_add_hole'], required=False, default='solid2d_add_hole')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.solid2d_add_hole'>, 'config': {'title': 'solid2d_add_hole'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.solid2d_add_hole'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.solid2d_add_hole'>>]}, 'ref': 'kittycad.models.modeling_cmd.solid2d_add_hole:93825019503056', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'hole_id': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'model-field'}, 'object_id': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'solid2d_add_hole', 'schema': {'expected': ['solid2d_add_hole'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'solid2d_add_hole', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'get_entity_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entities': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'new_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_bring_to_front': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_visible': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'update_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556f561d0,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "object_id": SerField {                         key_py: Py(                             0x00007ffffdc17c30,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Str(                                 StrSerializer,                             ),                         ),                         required: true,                     },                     "hole_id": SerField {                         key_py: Py(                             0x00007fffe1082670,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Str(                                 StrSerializer,                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe113e580,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "solid2d_add_hole",                                             },                                             expected_py: None,                                             name: "literal['solid2d_add_hole']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 3,             },         ),         has_extra: false,         root_model: false,         name: "solid2d_add_hole",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="solid2d_add_hole", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "hole_id",                         lookup_key: Simple {                             key: "hole_id",                             py_key: Py(                                 0x00007fffe1082670,                             ),                             path: LookupPath(                                 [                                     S(                                         "hole_id",                                         Py(                                             0x00007fffe1082670,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe1082670,                         ),                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "object_id",                         lookup_key: Simple {                             key: "object_id",                             py_key: Py(                                 0x00007ffffdc17c30,                             ),                             path: LookupPath(                                 [                                     S(                                         "object_id",                                         Py(                                             0x00007ffffdc17c30,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007ffffdc17c30,                         ),                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe113e580,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "solid2d_add_hole": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe113e580,                                                 ),                                             ],                                         },                                         expected_repr: "'solid2d_add_hole'",                                         name: "literal['solid2d_add_hole']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['solid2d_add_hole']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "solid2d_add_hole",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556f561d0,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "solid2d_add_hole",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, hole_id: str, object_id: str, type: Literal['solid2d_add_hole'] = 'solid2d_add_hole') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

classmethod from_orm(cls, obj)[source]
Return type:

Model

hole_id: str[source]
json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'hole_id': FieldInfo(annotation=str, required=True), 'object_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['solid2d_add_hole'], required=False, default='solid2d_add_hole')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

object_id: str[source]
classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['solid2d_add_hole'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.solid3d_get_all_edge_faces(**data)[source][source]

Gets all faces which use the given edge.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'edge_id': <class 'str'>, 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'object_id': <class 'str'>, 'type': typing.Literal['solid3d_get_all_edge_faces']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'edge_id': FieldInfo(annotation=str, required=True), 'object_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['solid3d_get_all_edge_faces'], required=False, default='solid3d_get_all_edge_faces')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.solid3d_get_all_edge_faces'>, 'config': {'title': 'solid3d_get_all_edge_faces'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.solid3d_get_all_edge_faces'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.solid3d_get_all_edge_faces'>>]}, 'ref': 'kittycad.models.modeling_cmd.solid3d_get_all_edge_faces:93825019521040', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'edge_id': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'model-field'}, 'object_id': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'solid3d_get_all_edge_faces', 'schema': {'expected': ['solid3d_get_all_edge_faces'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'solid3d_get_all_edge_faces', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'get_entity_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entities': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'new_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_bring_to_front': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_visible': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid2d_add_hole': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'update_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556f5a810,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe1c936c0,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "solid3d_get_all_edge_faces",                                             },                                             expected_py: None,                                             name: "literal['solid3d_get_all_edge_faces']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                     "edge_id": SerField {                         key_py: Py(                             0x00007fffe1082070,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Str(                                 StrSerializer,                             ),                         ),                         required: true,                     },                     "object_id": SerField {                         key_py: Py(                             0x00007ffffdc17c30,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Str(                                 StrSerializer,                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 3,             },         ),         has_extra: false,         root_model: false,         name: "solid3d_get_all_edge_faces",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="solid3d_get_all_edge_faces", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "edge_id",                         lookup_key: Simple {                             key: "edge_id",                             py_key: Py(                                 0x00007fffe1082070,                             ),                             path: LookupPath(                                 [                                     S(                                         "edge_id",                                         Py(                                             0x00007fffe1082070,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe1082070,                         ),                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "object_id",                         lookup_key: Simple {                             key: "object_id",                             py_key: Py(                                 0x00007ffffdc17c30,                             ),                             path: LookupPath(                                 [                                     S(                                         "object_id",                                         Py(                                             0x00007ffffdc17c30,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007ffffdc17c30,                         ),                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe1c936c0,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "solid3d_get_all_edge_faces": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe1c936c0,                                                 ),                                             ],                                         },                                         expected_repr: "'solid3d_get_all_edge_faces'",                                         name: "literal['solid3d_get_all_edge_faces']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['solid3d_get_all_edge_faces']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "solid3d_get_all_edge_faces",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556f5a810,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "solid3d_get_all_edge_faces",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, edge_id: str, object_id: str, type: Literal['solid3d_get_all_edge_faces'] = 'solid3d_get_all_edge_faces') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

edge_id: str[source]
classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'edge_id': FieldInfo(annotation=str, required=True), 'object_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['solid3d_get_all_edge_faces'], required=False, default='solid3d_get_all_edge_faces')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

object_id: str[source]
classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['solid3d_get_all_edge_faces'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.solid3d_get_all_opposite_edges(**data)[source][source]

Gets all edges which are opposite the given edge, across all possible faces.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'along_vector': typing.Optional[kittycad.models.point3d.Point3d], 'edge_id': <class 'str'>, 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'object_id': <class 'str'>, 'type': typing.Literal['solid3d_get_all_opposite_edges']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'along_vector': FieldInfo(annotation=Union[Point3d, NoneType], required=False), 'edge_id': FieldInfo(annotation=str, required=True), 'object_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['solid3d_get_all_opposite_edges'], required=False, default='solid3d_get_all_opposite_edges')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.solid3d_get_all_opposite_edges'>, 'config': {'title': 'solid3d_get_all_opposite_edges'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.solid3d_get_all_opposite_edges'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.solid3d_get_all_opposite_edges'>>]}, 'ref': 'kittycad.models.modeling_cmd.solid3d_get_all_opposite_edges:93825019522544', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'along_vector': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': None, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'schema': {'cls': <class 'kittycad.models.point3d.Point3d'>, 'config': {'title': 'Point3d'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.point3d.Point3d'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.point3d.Point3d'>>]}, 'ref': 'kittycad.models.point3d.Point3d:93825014233264', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'x': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}, 'y': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}, 'z': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}}, 'model_name': 'Point3d', 'type': 'model-fields'}, 'type': 'model'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'edge_id': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'model-field'}, 'object_id': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'solid3d_get_all_opposite_edges', 'schema': {'expected': ['solid3d_get_all_opposite_edges'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'solid3d_get_all_opposite_edges', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'get_entity_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entities': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'new_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_bring_to_front': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_visible': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid2d_add_hole': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_edge_faces': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'update_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556f5adf0,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "object_id": SerField {                         key_py: Py(                             0x00007ffffdc17c30,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Str(                                 StrSerializer,                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe1c93710,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "solid3d_get_all_opposite_edges",                                             },                                             expected_py: None,                                             name: "literal['solid3d_get_all_opposite_edges']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                     "edge_id": SerField {                         key_py: Py(                             0x00007fffe1082070,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Str(                                 StrSerializer,                             ),                         ),                         required: true,                     },                     "along_vector": SerField {                         key_py: Py(                             0x00007fffe1082630,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007ffffff85420,                                         ),                                     ),                                     serializer: Nullable(                                         NullableSerializer {                                             serializer: Model(                                                 ModelSerializer {                                                     class: Py(                                                         0x0000555556a4f8b0,                                                     ),                                                     serializer: Fields(                                                         GeneralFieldsSerializer {                                                             fields: {                                                                 "x": SerField {                                                                     key_py: Py(                                                                         0x00007fffff8fe870,                                                                     ),                                                                     alias: None,                                                                     alias_py: None,                                                                     serializer: Some(                                                                         Float(                                                                             FloatSerializer {                                                                                 inf_nan_mode: Null,                                                                             },                                                                         ),                                                                     ),                                                                     required: true,                                                                 },                                                                 "y": SerField {                                                                     key_py: Py(                                                                         0x00007fffff72a730,                                                                     ),                                                                     alias: None,                                                                     alias_py: None,                                                                     serializer: Some(                                                                         Float(                                                                             FloatSerializer {                                                                                 inf_nan_mode: Null,                                                                             },                                                                         ),                                                                     ),                                                                     required: true,                                                                 },                                                                 "z": SerField {                                                                     key_py: Py(                                                                         0x00007fffff72a770,                                                                     ),                                                                     alias: None,                                                                     alias_py: None,                                                                     serializer: Some(                                                                         Float(                                                                             FloatSerializer {                                                                                 inf_nan_mode: Null,                                                                             },                                                                         ),                                                                     ),                                                                     required: true,                                                                 },                                                             },                                                             computed_fields: Some(                                                                 ComputedFields(                                                                     [],                                                                 ),                                                             ),                                                             mode: SimpleDict,                                                             extra_serializer: None,                                                             filter: SchemaFilter {                                                                 include: None,                                                                 exclude: None,                                                             },                                                             required_fields: 3,                                                         },                                                     ),                                                     has_extra: false,                                                     root_model: false,                                                     name: "Point3d",                                                 },                                             ),                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 4,             },         ),         has_extra: false,         root_model: false,         name: "solid3d_get_all_opposite_edges",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="solid3d_get_all_opposite_edges", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "along_vector",                         lookup_key: Simple {                             key: "along_vector",                             py_key: Py(                                 0x00007fffe1082630,                             ),                             path: LookupPath(                                 [                                     S(                                         "along_vector",                                         Py(                                             0x00007fffe1082630,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe1082630,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007ffffff85420,                                     ),                                 ),                                 on_error: Raise,                                 validator: Nullable(                                     NullableValidator {                                         validator: Model(                                             ModelValidator {                                                 revalidate: Never,                                                 validator: ModelFields(                                                     ModelFieldsValidator {                                                         fields: [                                                             Field {                                                                 name: "x",                                                                 lookup_key: Simple {                                                                     key: "x",                                                                     py_key: Py(                                                                         0x00007fffff8fe870,                                                                     ),                                                                     path: LookupPath(                                                                         [                                                                             S(                                                                                 "x",                                                                                 Py(                                                                                     0x00007fffff8fe870,                                                                                 ),                                                                             ),                                                                         ],                                                                     ),                                                                 },                                                                 name_py: Py(                                                                     0x00007fffff8fe870,                                                                 ),                                                                 validator: Float(                                                                     FloatValidator {                                                                         strict: false,                                                                         allow_inf_nan: true,                                                                     },                                                                 ),                                                                 frozen: false,                                                             },                                                             Field {                                                                 name: "y",                                                                 lookup_key: Simple {                                                                     key: "y",                                                                     py_key: Py(                                                                         0x00007fffff72a730,                                                                     ),                                                                     path: LookupPath(                                                                         [                                                                             S(                                                                                 "y",                                                                                 Py(                                                                                     0x00007fffff72a730,                                                                                 ),                                                                             ),                                                                         ],                                                                     ),                                                                 },                                                                 name_py: Py(                                                                     0x00007fffff72a730,                                                                 ),                                                                 validator: Float(                                                                     FloatValidator {                                                                         strict: false,                                                                         allow_inf_nan: true,                                                                     },                                                                 ),                                                                 frozen: false,                                                             },                                                             Field {                                                                 name: "z",                                                                 lookup_key: Simple {                                                                     key: "z",                                                                     py_key: Py(                                                                         0x00007fffff72a770,                                                                     ),                                                                     path: LookupPath(                                                                         [                                                                             S(                                                                                 "z",                                                                                 Py(                                                                                     0x00007fffff72a770,                                                                                 ),                                                                             ),                                                                         ],                                                                     ),                                                                 },                                                                 name_py: Py(                                                                     0x00007fffff72a770,                                                                 ),                                                                 validator: Float(                                                                     FloatValidator {                                                                         strict: false,                                                                         allow_inf_nan: true,                                                                     },                                                                 ),                                                                 frozen: false,                                                             },                                                         ],                                                         model_name: "Point3d",                                                         extra_behavior: Ignore,                                                         extras_validator: None,                                                         strict: false,                                                         from_attributes: false,                                                         loc_by_alias: true,                                                     },                                                 ),                                                 class: Py(                                                     0x0000555556a4f8b0,                                                 ),                                                 post_init: None,                                                 frozen: false,                                                 custom_init: false,                                                 root_model: false,                                                 name: "Point3d",                                             },                                         ),                                         name: "nullable[Point3d]",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[nullable[Point3d]]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "edge_id",                         lookup_key: Simple {                             key: "edge_id",                             py_key: Py(                                 0x00007fffe1082070,                             ),                             path: LookupPath(                                 [                                     S(                                         "edge_id",                                         Py(                                             0x00007fffe1082070,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe1082070,                         ),                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "object_id",                         lookup_key: Simple {                             key: "object_id",                             py_key: Py(                                 0x00007ffffdc17c30,                             ),                             path: LookupPath(                                 [                                     S(                                         "object_id",                                         Py(                                             0x00007ffffdc17c30,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007ffffdc17c30,                         ),                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe1c93710,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "solid3d_get_all_opposite_edges": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe1c93710,                                                 ),                                             ],                                         },                                         expected_repr: "'solid3d_get_all_opposite_edges'",                                         name: "literal['solid3d_get_all_opposite_edges']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['solid3d_get_all_opposite_edges']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "solid3d_get_all_opposite_edges",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556f5adf0,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "solid3d_get_all_opposite_edges",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, along_vector: Optional[kittycad.models.point3d.Point3d] = None, edge_id: str, object_id: str, type: Literal['solid3d_get_all_opposite_edges'] = 'solid3d_get_all_opposite_edges') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

along_vector: Optional[Point3d][source]
classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

edge_id: str[source]
classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'along_vector': FieldInfo(annotation=Union[Point3d, NoneType], required=False), 'edge_id': FieldInfo(annotation=str, required=True), 'object_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['solid3d_get_all_opposite_edges'], required=False, default='solid3d_get_all_opposite_edges')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

object_id: str[source]
classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['solid3d_get_all_opposite_edges'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.solid3d_get_next_adjacent_edge(**data)[source][source]

Gets the next adjacent edge for the given edge, along the given face.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'edge_id': <class 'str'>, 'face_id': <class 'str'>, 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'object_id': <class 'str'>, 'type': typing.Literal['solid3d_get_next_adjacent_edge']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'edge_id': FieldInfo(annotation=str, required=True), 'face_id': FieldInfo(annotation=str, required=True), 'object_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['solid3d_get_next_adjacent_edge'], required=False, default='solid3d_get_next_adjacent_edge')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.solid3d_get_next_adjacent_edge'>, 'config': {'title': 'solid3d_get_next_adjacent_edge'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.solid3d_get_next_adjacent_edge'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.solid3d_get_next_adjacent_edge'>>]}, 'ref': 'kittycad.models.modeling_cmd.solid3d_get_next_adjacent_edge:93825019564640', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'edge_id': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'model-field'}, 'face_id': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'model-field'}, 'object_id': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'solid3d_get_next_adjacent_edge', 'schema': {'expected': ['solid3d_get_next_adjacent_edge'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'solid3d_get_next_adjacent_edge', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'get_entity_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entities': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'new_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_bring_to_front': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_visible': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid2d_add_hole': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_edge_faces': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_opposite_edges': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_opposite_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'update_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556f65260,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "object_id": SerField {                         key_py: Py(                             0x00007ffffdc17c30,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Str(                                 StrSerializer,                             ),                         ),                         required: true,                     },                     "face_id": SerField {                         key_py: Py(                             0x00007fffe1082730,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Str(                                 StrSerializer,                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe1c93760,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "solid3d_get_next_adjacent_edge",                                             },                                             expected_py: None,                                             name: "literal['solid3d_get_next_adjacent_edge']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                     "edge_id": SerField {                         key_py: Py(                             0x00007fffe1082070,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Str(                                 StrSerializer,                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 4,             },         ),         has_extra: false,         root_model: false,         name: "solid3d_get_next_adjacent_edge",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="solid3d_get_next_adjacent_edge", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "edge_id",                         lookup_key: Simple {                             key: "edge_id",                             py_key: Py(                                 0x00007fffe1082070,                             ),                             path: LookupPath(                                 [                                     S(                                         "edge_id",                                         Py(                                             0x00007fffe1082070,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe1082070,                         ),                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "face_id",                         lookup_key: Simple {                             key: "face_id",                             py_key: Py(                                 0x00007fffe1082730,                             ),                             path: LookupPath(                                 [                                     S(                                         "face_id",                                         Py(                                             0x00007fffe1082730,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe1082730,                         ),                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "object_id",                         lookup_key: Simple {                             key: "object_id",                             py_key: Py(                                 0x00007ffffdc17c30,                             ),                             path: LookupPath(                                 [                                     S(                                         "object_id",                                         Py(                                             0x00007ffffdc17c30,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007ffffdc17c30,                         ),                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe1c93760,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "solid3d_get_next_adjacent_edge": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe1c93760,                                                 ),                                             ],                                         },                                         expected_repr: "'solid3d_get_next_adjacent_edge'",                                         name: "literal['solid3d_get_next_adjacent_edge']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['solid3d_get_next_adjacent_edge']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "solid3d_get_next_adjacent_edge",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556f65260,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "solid3d_get_next_adjacent_edge",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, edge_id: str, face_id: str, object_id: str, type: Literal['solid3d_get_next_adjacent_edge'] = 'solid3d_get_next_adjacent_edge') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

edge_id: str[source]
face_id: str[source]
classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'edge_id': FieldInfo(annotation=str, required=True), 'face_id': FieldInfo(annotation=str, required=True), 'object_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['solid3d_get_next_adjacent_edge'], required=False, default='solid3d_get_next_adjacent_edge')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

object_id: str[source]
classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['solid3d_get_next_adjacent_edge'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.solid3d_get_opposite_edge(**data)[source][source]

Gets the edge opposite the given edge, along the given face.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'edge_id': <class 'str'>, 'face_id': <class 'str'>, 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'object_id': <class 'str'>, 'type': typing.Literal['solid3d_get_opposite_edge']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'edge_id': FieldInfo(annotation=str, required=True), 'face_id': FieldInfo(annotation=str, required=True), 'object_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['solid3d_get_opposite_edge'], required=False, default='solid3d_get_opposite_edge')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.solid3d_get_opposite_edge'>, 'config': {'title': 'solid3d_get_opposite_edge'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.solid3d_get_opposite_edge'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.solid3d_get_opposite_edge'>>]}, 'ref': 'kittycad.models.modeling_cmd.solid3d_get_opposite_edge:93825019534448', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'edge_id': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'model-field'}, 'face_id': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'model-field'}, 'object_id': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'solid3d_get_opposite_edge', 'schema': {'expected': ['solid3d_get_opposite_edge'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'solid3d_get_opposite_edge', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'get_entity_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entities': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'new_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_bring_to_front': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_visible': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid2d_add_hole': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_edge_faces': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_opposite_edges': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'update_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556f5dc70,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "edge_id": SerField {                         key_py: Py(                             0x00007fffe1082070,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Str(                                 StrSerializer,                             ),                         ),                         required: true,                     },                     "object_id": SerField {                         key_py: Py(                             0x00007ffffdc17c30,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Str(                                 StrSerializer,                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe1c937b0,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "solid3d_get_opposite_edge",                                             },                                             expected_py: None,                                             name: "literal['solid3d_get_opposite_edge']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                     "face_id": SerField {                         key_py: Py(                             0x00007fffe1082730,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Str(                                 StrSerializer,                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 4,             },         ),         has_extra: false,         root_model: false,         name: "solid3d_get_opposite_edge",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="solid3d_get_opposite_edge", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "edge_id",                         lookup_key: Simple {                             key: "edge_id",                             py_key: Py(                                 0x00007fffe1082070,                             ),                             path: LookupPath(                                 [                                     S(                                         "edge_id",                                         Py(                                             0x00007fffe1082070,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe1082070,                         ),                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "face_id",                         lookup_key: Simple {                             key: "face_id",                             py_key: Py(                                 0x00007fffe1082730,                             ),                             path: LookupPath(                                 [                                     S(                                         "face_id",                                         Py(                                             0x00007fffe1082730,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe1082730,                         ),                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "object_id",                         lookup_key: Simple {                             key: "object_id",                             py_key: Py(                                 0x00007ffffdc17c30,                             ),                             path: LookupPath(                                 [                                     S(                                         "object_id",                                         Py(                                             0x00007ffffdc17c30,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007ffffdc17c30,                         ),                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe1c937b0,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "solid3d_get_opposite_edge": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe1c937b0,                                                 ),                                             ],                                         },                                         expected_repr: "'solid3d_get_opposite_edge'",                                         name: "literal['solid3d_get_opposite_edge']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['solid3d_get_opposite_edge']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "solid3d_get_opposite_edge",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556f5dc70,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "solid3d_get_opposite_edge",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, edge_id: str, face_id: str, object_id: str, type: Literal['solid3d_get_opposite_edge'] = 'solid3d_get_opposite_edge') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

edge_id: str[source]
face_id: str[source]
classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'edge_id': FieldInfo(annotation=str, required=True), 'face_id': FieldInfo(annotation=str, required=True), 'object_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['solid3d_get_opposite_edge'], required=False, default='solid3d_get_opposite_edge')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

object_id: str[source]
classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['solid3d_get_opposite_edge'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.solid3d_get_prev_adjacent_edge(**data)[source][source]

Gets the previous adjacent edge for the given edge, along the given face.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'edge_id': <class 'str'>, 'face_id': <class 'str'>, 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'object_id': <class 'str'>, 'type': typing.Literal['solid3d_get_prev_adjacent_edge']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'edge_id': FieldInfo(annotation=str, required=True), 'face_id': FieldInfo(annotation=str, required=True), 'object_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['solid3d_get_prev_adjacent_edge'], required=False, default='solid3d_get_prev_adjacent_edge')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.solid3d_get_prev_adjacent_edge'>, 'config': {'title': 'solid3d_get_prev_adjacent_edge'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.solid3d_get_prev_adjacent_edge'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.solid3d_get_prev_adjacent_edge'>>]}, 'ref': 'kittycad.models.modeling_cmd.solid3d_get_prev_adjacent_edge:93825019577280', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'edge_id': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'model-field'}, 'face_id': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'model-field'}, 'object_id': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'solid3d_get_prev_adjacent_edge', 'schema': {'expected': ['solid3d_get_prev_adjacent_edge'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'solid3d_get_prev_adjacent_edge', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'get_entity_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entities': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'new_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_bring_to_front': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_visible': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid2d_add_hole': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_edge_faces': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_opposite_edges': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_next_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_opposite_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'update_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556f683c0,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "face_id": SerField {                         key_py: Py(                             0x00007fffe1082730,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Str(                                 StrSerializer,                             ),                         ),                         required: true,                     },                     "object_id": SerField {                         key_py: Py(                             0x00007ffffdc17c30,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Str(                                 StrSerializer,                             ),                         ),                         required: true,                     },                     "edge_id": SerField {                         key_py: Py(                             0x00007fffe1082070,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Str(                                 StrSerializer,                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe1c93800,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "solid3d_get_prev_adjacent_edge",                                             },                                             expected_py: None,                                             name: "literal['solid3d_get_prev_adjacent_edge']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 4,             },         ),         has_extra: false,         root_model: false,         name: "solid3d_get_prev_adjacent_edge",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="solid3d_get_prev_adjacent_edge", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "edge_id",                         lookup_key: Simple {                             key: "edge_id",                             py_key: Py(                                 0x00007fffe1082070,                             ),                             path: LookupPath(                                 [                                     S(                                         "edge_id",                                         Py(                                             0x00007fffe1082070,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe1082070,                         ),                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "face_id",                         lookup_key: Simple {                             key: "face_id",                             py_key: Py(                                 0x00007fffe1082730,                             ),                             path: LookupPath(                                 [                                     S(                                         "face_id",                                         Py(                                             0x00007fffe1082730,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe1082730,                         ),                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "object_id",                         lookup_key: Simple {                             key: "object_id",                             py_key: Py(                                 0x00007ffffdc17c30,                             ),                             path: LookupPath(                                 [                                     S(                                         "object_id",                                         Py(                                             0x00007ffffdc17c30,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007ffffdc17c30,                         ),                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe1c93800,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "solid3d_get_prev_adjacent_edge": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe1c93800,                                                 ),                                             ],                                         },                                         expected_repr: "'solid3d_get_prev_adjacent_edge'",                                         name: "literal['solid3d_get_prev_adjacent_edge']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['solid3d_get_prev_adjacent_edge']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "solid3d_get_prev_adjacent_edge",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556f683c0,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "solid3d_get_prev_adjacent_edge",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, edge_id: str, face_id: str, object_id: str, type: Literal['solid3d_get_prev_adjacent_edge'] = 'solid3d_get_prev_adjacent_edge') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

edge_id: str[source]
face_id: str[source]
classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'edge_id': FieldInfo(annotation=str, required=True), 'face_id': FieldInfo(annotation=str, required=True), 'object_id': FieldInfo(annotation=str, required=True), 'type': FieldInfo(annotation=Literal['solid3d_get_prev_adjacent_edge'], required=False, default='solid3d_get_prev_adjacent_edge')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

object_id: str[source]
classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['solid3d_get_prev_adjacent_edge'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.start_path(**data)[source][source]

Start a path.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'type': typing.Literal['start_path']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'type': FieldInfo(annotation=Literal['start_path'], required=False, default='start_path')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.start_path'>, 'config': {'title': 'start_path'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.start_path'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.start_path'>>]}, 'ref': 'kittycad.models.modeling_cmd.start_path:93825018712720', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'start_path', 'schema': {'expected': ['start_path'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'start_path', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556e95290,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe10e74b0,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "start_path",                                             },                                             expected_py: None,                                             name: "literal['start_path']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 1,             },         ),         has_extra: false,         root_model: false,         name: "start_path",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="start_path", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe10e74b0,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "start_path": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe10e74b0,                                                 ),                                             ],                                         },                                         expected_repr: "'start_path'",                                         name: "literal['start_path']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['start_path']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "start_path",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556e95290,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "start_path",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, type: Literal['start_path'] = 'start_path') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'type': FieldInfo(annotation=Literal['start_path'], required=False, default='start_path')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['start_path'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.surface_area(**data)[source][source]

Get the surface area of entities in the scene or the default scene.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'entity_ids': typing.List[str], 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'output_unit': <enum 'UnitArea'>, 'source_unit': <enum 'UnitLength'>, 'type': typing.Literal['surface_area']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'entity_ids': FieldInfo(annotation=List[str], required=True), 'output_unit': FieldInfo(annotation=UnitArea, required=True), 'source_unit': FieldInfo(annotation=UnitLength, required=True), 'type': FieldInfo(annotation=Literal['surface_area'], required=False, default='surface_area')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.surface_area'>, 'config': {'title': 'surface_area'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.surface_area'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.surface_area'>>]}, 'ref': 'kittycad.models.modeling_cmd.surface_area:93825020201312', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'entity_ids': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'items_schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'strict': False, 'type': 'list'}, 'type': 'model-field'}, 'output_unit': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'lax_schema': {'steps': [{'type': 'str'}, {'type': 'function-plain', 'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}}], 'type': 'chain'}, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_functions': [<function get_enum_core_schema.<locals>.get_json_schema>]}, 'ref': 'kittycad.models.unit_area.UnitArea:93825015216496', 'strict_schema': {'json_schema': {'function': {'function': <function get_enum_core_schema.<locals>.to_enum>, 'type': 'no-info'}, 'schema': {'type': 'str'}, 'type': 'function-after'}, 'python_schema': {'cls': <enum 'UnitArea'>, 'type': 'is-instance'}, 'type': 'json-or-python'}, 'type': 'lax-or-strict'}, 'type': 'model-field'}, 'source_unit': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'lax_schema': {'steps': [{'type': 'str'}, {'type': 'function-plain', 'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}}], 'type': 'chain'}, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_functions': [<function get_enum_core_schema.<locals>.get_json_schema>]}, 'ref': 'kittycad.models.unit_length.UnitLength:93825014613552', 'strict_schema': {'json_schema': {'function': {'function': <function get_enum_core_schema.<locals>.to_enum>, 'type': 'no-info'}, 'schema': {'type': 'str'}, 'type': 'function-after'}, 'python_schema': {'cls': <enum 'UnitLength'>, 'type': 'is-instance'}, 'type': 'json-or-python'}, 'type': 'lax-or-strict'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'surface_area', 'schema': {'expected': ['surface_area'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'surface_area', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'center_of_mass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_control_points': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_end_points': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'density': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_fade': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_set_opacity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'get_entity_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'handle_mouse_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'handle_mouse_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'handle_mouse_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entities': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'import_files': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_axes_gizmo': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_plane': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_click': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'new_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_bring_to_front': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_visible': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_curve_uuids_for_vertices': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_info': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_vertex_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'plane_intersect_and_project': <pydantic._internal._model_construction._PydanticWeakRef object>, 'plane_set_color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'reconfigure_stream': <pydantic._internal._model_construction._PydanticWeakRef object>, 'remove_scene_objects': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'send_object': <pydantic._internal._model_construction._PydanticWeakRef object>, 'set_tool': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_disable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_enable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid2d_add_hole': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_edge_faces': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_opposite_edges': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_next_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_opposite_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_prev_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'take_snapshot': <pydantic._internal._model_construction._PydanticWeakRef object>, 'update_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'volume': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555557000960,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "source_unit": SerField {                         key_py: Py(                             0x00007fffe10dd370,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             JsonOrPython(                                 JsonOrPythonSerializer {                                     json: Str(                                         StrSerializer,                                     ),                                     python: Any(                                         AnySerializer,                                     ),                                     name: "json-or-python[json=str, python=any]",                                 },                             ),                         ),                         required: true,                     },                     "entity_ids": SerField {                         key_py: Py(                             0x00007fffe118cc70,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             List(                                 ListSerializer {                                     item_serializer: Str(                                         StrSerializer,                                     ),                                     filter: SchemaFilter {                                         include: None,                                         exclude: None,                                     },                                     name: "list[str]",                                 },                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe1c7bdb0,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "surface_area",                                             },                                             expected_py: None,                                             name: "literal['surface_area']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                     "output_unit": SerField {                         key_py: Py(                             0x00007fffe14f4170,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             JsonOrPython(                                 JsonOrPythonSerializer {                                     json: Str(                                         StrSerializer,                                     ),                                     python: Any(                                         AnySerializer,                                     ),                                     name: "json-or-python[json=str, python=any]",                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 4,             },         ),         has_extra: false,         root_model: false,         name: "surface_area",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="surface_area", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "entity_ids",                         lookup_key: Simple {                             key: "entity_ids",                             py_key: Py(                                 0x00007fffe118cc70,                             ),                             path: LookupPath(                                 [                                     S(                                         "entity_ids",                                         Py(                                             0x00007fffe118cc70,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe118cc70,                         ),                         validator: List(                             ListValidator {                                 strict: false,                                 item_validator: Some(                                     Str(                                         StrValidator {                                             strict: false,                                             coerce_numbers_to_str: false,                                         },                                     ),                                 ),                                 min_length: None,                                 max_length: None,                                 name: OnceLock(                                     <uninit>,                                 ),                             },                         ),                         frozen: false,                     },                     Field {                         name: "output_unit",                         lookup_key: Simple {                             key: "output_unit",                             py_key: Py(                                 0x00007fffe14f4170,                             ),                             path: LookupPath(                                 [                                     S(                                         "output_unit",                                         Py(                                             0x00007fffe14f4170,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe14f4170,                         ),                         validator: LaxOrStrict(                             LaxOrStrictValidator {                                 strict: false,                                 lax_validator: Chain(                                     ChainValidator {                                         steps: [                                             Str(                                                 StrValidator {                                                     strict: false,                                                     coerce_numbers_to_str: false,                                                 },                                             ),                                             FunctionPlain(                                                 FunctionPlainValidator {                                                     func: Py(                                                         0x00007fffe0e550d0,                                                     ),                                                     config: Py(                                                         0x00007fffe0df8840,                                                     ),                                                     name: "function-plain[to_enum()]",                                                     field_name: None,                                                     info_arg: false,                                                 },                                             ),                                         ],                                         name: "chain[str,function-plain[to_enum()]]",                                     },                                 ),                                 strict_validator: JsonOrPython(                                     JsonOrPython {                                         json: FunctionAfter(                                             FunctionAfterValidator {                                                 validator: Str(                                                     StrValidator {                                                         strict: false,                                                         coerce_numbers_to_str: false,                                                     },                                                 ),                                                 func: Py(                                                     0x00007fffe0e550d0,                                                 ),                                                 config: Py(                                                     0x00007fffe0df8840,                                                 ),                                                 name: "function-after[to_enum(), str]",                                                 field_name: None,                                                 info_arg: false,                                             },                                         ),                                         python: IsInstance(                                             IsInstanceValidator {                                                 class: Py(                                                     0x0000555556b3f970,                                                 ),                                                 class_repr: "UnitArea",                                                 name: "is-instance[UnitArea]",                                             },                                         ),                                         name: "json-or-python[json=function-after[to_enum(), str],python=is-instance[UnitArea]]",                                     },                                 ),                                 name: "lax-or-strict[lax=chain[str,function-plain[to_enum()]],strict=json-or-python[json=function-after[to_enum(), str],python=is-instance[UnitArea]]]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "source_unit",                         lookup_key: Simple {                             key: "source_unit",                             py_key: Py(                                 0x00007fffe10dd370,                             ),                             path: LookupPath(                                 [                                     S(                                         "source_unit",                                         Py(                                             0x00007fffe10dd370,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe10dd370,                         ),                         validator: LaxOrStrict(                             LaxOrStrictValidator {                                 strict: false,                                 lax_validator: Chain(                                     ChainValidator {                                         steps: [                                             Str(                                                 StrValidator {                                                     strict: false,                                                     coerce_numbers_to_str: false,                                                 },                                             ),                                             FunctionPlain(                                                 FunctionPlainValidator {                                                     func: Py(                                                         0x00007fffe0e55280,                                                     ),                                                     config: Py(                                                         0x00007fffe0df8840,                                                     ),                                                     name: "function-plain[to_enum()]",                                                     field_name: None,                                                     info_arg: false,                                                 },                                             ),                                         ],                                         name: "chain[str,function-plain[to_enum()]]",                                     },                                 ),                                 strict_validator: JsonOrPython(                                     JsonOrPython {                                         json: FunctionAfter(                                             FunctionAfterValidator {                                                 validator: Str(                                                     StrValidator {                                                         strict: false,                                                         coerce_numbers_to_str: false,                                                     },                                                 ),                                                 func: Py(                                                     0x00007fffe0e55280,                                                 ),                                                 config: Py(                                                     0x00007fffe0df8840,                                                 ),                                                 name: "function-after[to_enum(), str]",                                                 field_name: None,                                                 info_arg: false,                                             },                                         ),                                         python: IsInstance(                                             IsInstanceValidator {                                                 class: Py(                                                     0x0000555556aac630,                                                 ),                                                 class_repr: "UnitLength",                                                 name: "is-instance[UnitLength]",                                             },                                         ),                                         name: "json-or-python[json=function-after[to_enum(), str],python=is-instance[UnitLength]]",                                     },                                 ),                                 name: "lax-or-strict[lax=chain[str,function-plain[to_enum()]],strict=json-or-python[json=function-after[to_enum(), str],python=is-instance[UnitLength]]]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe1c7bdb0,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "surface_area": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe1c7bdb0,                                                 ),                                             ],                                         },                                         expected_repr: "'surface_area'",                                         name: "literal['surface_area']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['surface_area']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "surface_area",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555557000960,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "surface_area",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, entity_ids: List[str], output_unit: kittycad.models.unit_area.UnitArea, source_unit: kittycad.models.unit_length.UnitLength, type: Literal['surface_area'] = 'surface_area') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

entity_ids: List[str][source]
classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'entity_ids': FieldInfo(annotation=List[str], required=True), 'output_unit': FieldInfo(annotation=UnitArea, required=True), 'source_unit': FieldInfo(annotation=UnitLength, required=True), 'type': FieldInfo(annotation=Literal['surface_area'], required=False, default='surface_area')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

output_unit: UnitArea[source]
classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

source_unit: UnitLength[source]
type: Literal['surface_area'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.take_snapshot(**data)[source][source]

Take a snapshot.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'format': <enum 'ImageFormat'>, 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'type': typing.Literal['take_snapshot']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'format': FieldInfo(annotation=ImageFormat, required=True), 'type': FieldInfo(annotation=Literal['take_snapshot'], required=False, default='take_snapshot')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.take_snapshot'>, 'config': {'title': 'take_snapshot'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.take_snapshot'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.take_snapshot'>>]}, 'ref': 'kittycad.models.modeling_cmd.take_snapshot:93825019788560', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'format': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'lax_schema': {'steps': [{'type': 'str'}, {'type': 'function-plain', 'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}}], 'type': 'chain'}, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_functions': [<function get_enum_core_schema.<locals>.get_json_schema>]}, 'ref': 'kittycad.models.image_format.ImageFormat:93825018070704', 'strict_schema': {'json_schema': {'function': {'function': <function get_enum_core_schema.<locals>.to_enum>, 'type': 'no-info'}, 'schema': {'type': 'str'}, 'type': 'function-after'}, 'python_schema': {'cls': <enum 'ImageFormat'>, 'type': 'is-instance'}, 'type': 'json-or-python'}, 'type': 'lax-or-strict'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'take_snapshot', 'schema': {'expected': ['take_snapshot'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'take_snapshot', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_control_points': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_fade': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_set_opacity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'get_entity_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entities': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_plane': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_click': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'new_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_bring_to_front': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_visible': <pydantic._internal._model_construction._PydanticWeakRef object>, 'plane_set_color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'send_object': <pydantic._internal._model_construction._PydanticWeakRef object>, 'set_tool': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_disable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_enable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid2d_add_hole': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_edge_faces': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_opposite_edges': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_next_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_opposite_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_prev_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'update_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556f9bd10,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "format": SerField {                         key_py: Py(                             0x00007fffff932bf0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             JsonOrPython(                                 JsonOrPythonSerializer {                                     json: Str(                                         StrSerializer,                                     ),                                     python: Any(                                         AnySerializer,                                     ),                                     name: "json-or-python[json=str, python=any]",                                 },                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe1c7b470,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "take_snapshot",                                             },                                             expected_py: None,                                             name: "literal['take_snapshot']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 2,             },         ),         has_extra: false,         root_model: false,         name: "take_snapshot",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="take_snapshot", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "format",                         lookup_key: Simple {                             key: "format",                             py_key: Py(                                 0x00007fffff932bf0,                             ),                             path: LookupPath(                                 [                                     S(                                         "format",                                         Py(                                             0x00007fffff932bf0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff932bf0,                         ),                         validator: LaxOrStrict(                             LaxOrStrictValidator {                                 strict: false,                                 lax_validator: Chain(                                     ChainValidator {                                         steps: [                                             Str(                                                 StrValidator {                                                     strict: false,                                                     coerce_numbers_to_str: false,                                                 },                                             ),                                             FunctionPlain(                                                 FunctionPlainValidator {                                                     func: Py(                                                         0x00007fffe0f4f700,                                                     ),                                                     config: Py(                                                         0x00007fffe0ed7880,                                                     ),                                                     name: "function-plain[to_enum()]",                                                     field_name: None,                                                     info_arg: false,                                                 },                                             ),                                         ],                                         name: "chain[str,function-plain[to_enum()]]",                                     },                                 ),                                 strict_validator: JsonOrPython(                                     JsonOrPython {                                         json: FunctionAfter(                                             FunctionAfterValidator {                                                 validator: Str(                                                     StrValidator {                                                         strict: false,                                                         coerce_numbers_to_str: false,                                                     },                                                 ),                                                 func: Py(                                                     0x00007fffe0f4f700,                                                 ),                                                 config: Py(                                                     0x00007fffe0ed7880,                                                 ),                                                 name: "function-after[to_enum(), str]",                                                 field_name: None,                                                 info_arg: false,                                             },                                         ),                                         python: IsInstance(                                             IsInstanceValidator {                                                 class: Py(                                                     0x0000555556df86b0,                                                 ),                                                 class_repr: "ImageFormat",                                                 name: "is-instance[ImageFormat]",                                             },                                         ),                                         name: "json-or-python[json=function-after[to_enum(), str],python=is-instance[ImageFormat]]",                                     },                                 ),                                 name: "lax-or-strict[lax=chain[str,function-plain[to_enum()]],strict=json-or-python[json=function-after[to_enum(), str],python=is-instance[ImageFormat]]]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe1c7b470,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "take_snapshot": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe1c7b470,                                                 ),                                             ],                                         },                                         expected_repr: "'take_snapshot'",                                         name: "literal['take_snapshot']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['take_snapshot']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "take_snapshot",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556f9bd10,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "take_snapshot",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, format: kittycad.models.image_format.ImageFormat, type: Literal['take_snapshot'] = 'take_snapshot') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

format: ImageFormat[source]
classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'format': FieldInfo(annotation=ImageFormat, required=True), 'type': FieldInfo(annotation=Literal['take_snapshot'], required=False, default='take_snapshot')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['take_snapshot'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.update_annotation(**data)[source][source]

Update an annotation

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'annotation_id': <class 'str'>, 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'options': <class 'kittycad.models.annotation_options.AnnotationOptions'>, 'type': typing.Literal['update_annotation']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'annotation_id': FieldInfo(annotation=str, required=True), 'options': FieldInfo(annotation=AnnotationOptions, required=True), 'type': FieldInfo(annotation=Literal['update_annotation'], required=False, default='update_annotation')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'definitions': [{'type': 'lax-or-strict', 'lax_schema': {'type': 'chain', 'steps': [{'type': 'str'}, {'type': 'function-plain', 'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}}]}, 'strict_schema': {'type': 'json-or-python', 'json_schema': {'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}, 'schema': {'type': 'str'}, 'type': 'function-after'}, 'python_schema': {'type': 'is-instance', 'cls': <enum 'AnnotationLineEnd'>}}, 'ref': 'kittycad.models.annotation_line_end.AnnotationLineEnd:93825014183648', 'metadata': {'pydantic_js_functions': [<function get_enum_core_schema.<locals>.get_json_schema>], 'pydantic.internal.needs_apply_discriminated_union': False}}], 'schema': {'cls': <class 'kittycad.models.modeling_cmd.update_annotation'>, 'config': {'title': 'update_annotation'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.update_annotation'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.update_annotation'>>]}, 'ref': 'kittycad.models.modeling_cmd.update_annotation:93825019354144', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'annotation_id': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'model-field'}, 'options': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'cls': <class 'kittycad.models.annotation_options.AnnotationOptions'>, 'config': {'title': 'AnnotationOptions'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.annotation_options.AnnotationOptions'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.annotation_options.AnnotationOptions'>>]}, 'ref': 'kittycad.models.annotation_options.AnnotationOptions:93825014241216', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'color': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': None, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'schema': {'cls': <class 'kittycad.models.color.Color'>, 'config': {'title': 'Color'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.color.Color'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.color.Color'>>]}, 'ref': 'kittycad.models.color.Color:93825013450848', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'a': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}, 'b': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}, 'g': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}, 'r': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}}, 'model_name': 'Color', 'type': 'model-fields'}, 'type': 'model'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'line_ends': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': None, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'schema': {'cls': <class 'kittycad.models.annotation_line_end_options.AnnotationLineEndOptions'>, 'config': {'title': 'AnnotationLineEndOptions'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.annotation_line_end_options.AnnotationLineEndOptions'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.annotation_line_end_options.AnnotationLineEndOptions'>>]}, 'ref': 'kittycad.models.annotation_line_end_options.AnnotationLineEndOptions:93825014184640', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'end': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'schema_ref': 'kittycad.models.annotation_line_end.AnnotationLineEnd:93825014183648', 'type': 'definition-ref'}, 'type': 'model-field'}, 'start': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'schema_ref': 'kittycad.models.annotation_line_end.AnnotationLineEnd:93825014183648', 'type': 'definition-ref'}, 'type': 'model-field'}}, 'model_name': 'AnnotationLineEndOptions', 'type': 'model-fields'}, 'type': 'model'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'line_width': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': None, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'position': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': None, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'schema': {'cls': <class 'kittycad.models.point3d.Point3d'>, 'config': {'title': 'Point3d'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.point3d.Point3d'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.point3d.Point3d'>>]}, 'ref': 'kittycad.models.point3d.Point3d:93825014233264', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'x': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}, 'y': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}, 'z': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'float'}, 'type': 'model-field'}}, 'model_name': 'Point3d', 'type': 'model-fields'}, 'type': 'model'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'text': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': None, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'schema': {'cls': <class 'kittycad.models.annotation_text_options.AnnotationTextOptions'>, 'config': {'title': 'AnnotationTextOptions'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.annotation_text_options.AnnotationTextOptions'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.annotation_text_options.AnnotationTextOptions'>>]}, 'ref': 'kittycad.models.annotation_text_options.AnnotationTextOptions:93825014200064', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'point_size': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'int'}, 'type': 'model-field'}, 'text': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'type': 'model-field'}, 'x': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'lax_schema': {'steps': [{'type': 'str'}, {'type': 'function-plain', 'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}}], 'type': 'chain'}, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_functions': [<function get_enum_core_schema.<locals>.get_json_schema>]}, 'ref': 'kittycad.models.annotation_text_alignment_x.AnnotationTextAlignmentX:93825014201904', 'strict_schema': {'json_schema': {'function': {'function': <function get_enum_core_schema.<locals>.to_enum>, 'type': 'no-info'}, 'schema': {'type': 'str'}, 'type': 'function-after'}, 'python_schema': {'cls': <enum 'AnnotationTextAlignmentX'>, 'type': 'is-instance'}, 'type': 'json-or-python'}, 'type': 'lax-or-strict'}, 'type': 'model-field'}, 'y': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'lax_schema': {'steps': [{'type': 'str'}, {'type': 'function-plain', 'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}}], 'type': 'chain'}, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_functions': [<function get_enum_core_schema.<locals>.get_json_schema>]}, 'ref': 'kittycad.models.annotation_text_alignment_y.AnnotationTextAlignmentY:93825014197936', 'strict_schema': {'json_schema': {'function': {'function': <function get_enum_core_schema.<locals>.to_enum>, 'type': 'no-info'}, 'schema': {'type': 'str'}, 'type': 'function-after'}, 'python_schema': {'cls': <enum 'AnnotationTextAlignmentY'>, 'type': 'is-instance'}, 'type': 'json-or-python'}, 'type': 'lax-or-strict'}, 'type': 'model-field'}}, 'model_name': 'AnnotationTextOptions', 'type': 'model-fields'}, 'type': 'model'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'AnnotationOptions', 'type': 'model-fields'}, 'type': 'model'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'update_annotation', 'schema': {'expected': ['update_annotation'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'update_annotation', 'type': 'model-fields'}, 'type': 'model'}, 'type': 'definitions'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entities': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'new_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556f31c20,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007fffe113e350,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "update_annotation",                                             },                                             expected_py: None,                                             name: "literal['update_annotation']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                     "annotation_id": SerField {                         key_py: Py(                             0x00007fffe1082570,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Str(                                 StrSerializer,                             ),                         ),                         required: true,                     },                     "options": SerField {                         key_py: Py(                             0x00007fffff67d970,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             Model(                                 ModelSerializer {                                     class: Py(                                         0x0000555556a517c0,                                     ),                                     serializer: Fields(                                         GeneralFieldsSerializer {                                             fields: {                                                 "color": SerField {                                                     key_py: Py(                                                         0x00007fffff6e21b0,                                                     ),                                                     alias: None,                                                     alias_py: None,                                                     serializer: Some(                                                         WithDefault(                                                             WithDefaultSerializer {                                                                 default: Default(                                                                     Py(                                                                         0x00007ffffff85420,                                                                     ),                                                                 ),                                                                 serializer: Nullable(                                                                     NullableSerializer {                                                                         serializer: Model(                                                                             ModelSerializer {                                                                                 class: Py(                                                                                     0x0000555556990860,                                                                                 ),                                                                                 serializer: Fields(                                                                                     GeneralFieldsSerializer {                                                                                         fields: {                                                                                             "a": SerField {                                                                                                 key_py: Py(                                                                                                     0x00007fffff82fa70,                                                                                                 ),                                                                                                 alias: None,                                                                                                 alias_py: None,                                                                                                 serializer: Some(                                                                                                     Float(                                                                                                         FloatSerializer {                                                                                                             inf_nan_mode: Null,                                                                                                         },                                                                                                     ),                                                                                                 ),                                                                                                 required: true,                                                                                             },                                                                                             "g": SerField {                                                                                                 key_py: Py(                                                                                                     0x00007fffff858bb0,                                                                                                 ),                                                                                                 alias: None,                                                                                                 alias_py: None,                                                                                                 serializer: Some(                                                                                                     Float(                                                                                                         FloatSerializer {                                                                                                             inf_nan_mode: Null,                                                                                                         },                                                                                                     ),                                                                                                 ),                                                                                                 required: true,                                                                                             },                                                                                             "b": SerField {                                                                                                 key_py: Py(                                                                                                     0x00007fffff86b330,                                                                                                 ),                                                                                                 alias: None,                                                                                                 alias_py: None,                                                                                                 serializer: Some(                                                                                                     Float(                                                                                                         FloatSerializer {                                                                                                             inf_nan_mode: Null,                                                                                                         },                                                                                                     ),                                                                                                 ),                                                                                                 required: true,                                                                                             },                                                                                             "r": SerField {                                                                                                 key_py: Py(                                                                                                     0x00007fffff89d4b0,                                                                                                 ),                                                                                                 alias: None,                                                                                                 alias_py: None,                                                                                                 serializer: Some(                                                                                                     Float(                                                                                                         FloatSerializer {                                                                                                             inf_nan_mode: Null,                                                                                                         },                                                                                                     ),                                                                                                 ),                                                                                                 required: true,                                                                                             },                                                                                         },                                                                                         computed_fields: Some(                                                                                             ComputedFields(                                                                                                 [],                                                                                             ),                                                                                         ),                                                                                         mode: SimpleDict,                                                                                         extra_serializer: None,                                                                                         filter: SchemaFilter {                                                                                             include: None,                                                                                             exclude: None,                                                                                         },                                                                                         required_fields: 4,                                                                                     },                                                                                 ),                                                                                 has_extra: false,                                                                                 root_model: false,                                                                                 name: "Color",                                                                             },                                                                         ),                                                                     },                                                                 ),                                                             },                                                         ),                                                     ),                                                     required: true,                                                 },                                                 "text": SerField {                                                     key_py: Py(                                                         0x00007fffff9529b0,                                                     ),                                                     alias: None,                                                     alias_py: None,                                                     serializer: Some(                                                         WithDefault(                                                             WithDefaultSerializer {                                                                 default: Default(                                                                     Py(                                                                         0x00007ffffff85420,                                                                     ),                                                                 ),                                                                 serializer: Nullable(                                                                     NullableSerializer {                                                                         serializer: Model(                                                                             ModelSerializer {                                                                                 class: Py(                                                                                     0x0000555556a47700,                                                                                 ),                                                                                 serializer: Fields(                                                                                     GeneralFieldsSerializer {                                                                                         fields: {                                                                                             "text": SerField {                                                                                                 key_py: Py(                                                                                                     0x00007fffff9529b0,                                                                                                 ),                                                                                                 alias: None,                                                                                                 alias_py: None,                                                                                                 serializer: Some(                                                                                                     Str(                                                                                                         StrSerializer,                                                                                                     ),                                                                                                 ),                                                                                                 required: true,                                                                                             },                                                                                             "y": SerField {                                                                                                 key_py: Py(                                                                                                     0x00007fffff72a730,                                                                                                 ),                                                                                                 alias: None,                                                                                                 alias_py: None,                                                                                                 serializer: Some(                                                                                                     JsonOrPython(                                                                                                         JsonOrPythonSerializer {                                                                                                             json: Str(                                                                                                                 StrSerializer,                                                                                                             ),                                                                                                             python: Any(                                                                                                                 AnySerializer,                                                                                                             ),                                                                                                             name: "json-or-python[json=str, python=any]",                                                                                                         },                                                                                                     ),                                                                                                 ),                                                                                                 required: true,                                                                                             },                                                                                             "x": SerField {                                                                                                 key_py: Py(                                                                                                     0x00007fffff8fe870,                                                                                                 ),                                                                                                 alias: None,                                                                                                 alias_py: None,                                                                                                 serializer: Some(                                                                                                     JsonOrPython(                                                                                                         JsonOrPythonSerializer {                                                                                                             json: Str(                                                                                                                 StrSerializer,                                                                                                             ),                                                                                                             python: Any(                                                                                                                 AnySerializer,                                                                                                             ),                                                                                                             name: "json-or-python[json=str, python=any]",                                                                                                         },                                                                                                     ),                                                                                                 ),                                                                                                 required: true,                                                                                             },                                                                                             "point_size": SerField {                                                                                                 key_py: Py(                                                                                                     0x00007fffe12d3a70,                                                                                                 ),                                                                                                 alias: None,                                                                                                 alias_py: None,                                                                                                 serializer: Some(                                                                                                     Int(                                                                                                         IntSerializer,                                                                                                     ),                                                                                                 ),                                                                                                 required: true,                                                                                             },                                                                                         },                                                                                         computed_fields: Some(                                                                                             ComputedFields(                                                                                                 [],                                                                                             ),                                                                                         ),                                                                                         mode: SimpleDict,                                                                                         extra_serializer: None,                                                                                         filter: SchemaFilter {                                                                                             include: None,                                                                                             exclude: None,                                                                                         },                                                                                         required_fields: 4,                                                                                     },                                                                                 ),                                                                                 has_extra: false,                                                                                 root_model: false,                                                                                 name: "AnnotationTextOptions",                                                                             },                                                                         ),                                                                     },                                                                 ),                                                             },                                                         ),                                                     ),                                                     required: true,                                                 },                                                 "line_ends": SerField {                                                     key_py: Py(                                                         0x00007fffe20b14b0,                                                     ),                                                     alias: None,                                                     alias_py: None,                                                     serializer: Some(                                                         WithDefault(                                                             WithDefaultSerializer {                                                                 default: Default(                                                                     Py(                                                                         0x00007ffffff85420,                                                                     ),                                                                 ),                                                                 serializer: Nullable(                                                                     NullableSerializer {                                                                         serializer: Model(                                                                             ModelSerializer {                                                                                 class: Py(                                                                                     0x0000555556a43ac0,                                                                                 ),                                                                                 serializer: Fields(                                                                                     GeneralFieldsSerializer {                                                                                         fields: {                                                                                             "end": SerField {                                                                                                 key_py: Py(                                                                                                     0x00007fffff952eb0,                                                                                                 ),                                                                                                 alias: None,                                                                                                 alias_py: None,                                                                                                 serializer: Some(                                                                                                     Recursive(                                                                                                         DefinitionRefSerializer {                                                                                                             definition: "kittycad.models.annotation_line_end.AnnotationLineEnd:93825014183648",                                                                                                         },                                                                                                     ),                                                                                                 ),                                                                                                 required: true,                                                                                             },                                                                                             "start": SerField {                                                                                                 key_py: Py(                                                                                                     0x00007fffff929c30,                                                                                                 ),                                                                                                 alias: None,                                                                                                 alias_py: None,                                                                                                 serializer: Some(                                                                                                     Recursive(                                                                                                         DefinitionRefSerializer {                                                                                                             definition: "kittycad.models.annotation_line_end.AnnotationLineEnd:93825014183648",                                                                                                         },                                                                                                     ),                                                                                                 ),                                                                                                 required: true,                                                                                             },                                                                                         },                                                                                         computed_fields: Some(                                                                                             ComputedFields(                                                                                                 [],                                                                                             ),                                                                                         ),                                                                                         mode: SimpleDict,                                                                                         extra_serializer: None,                                                                                         filter: SchemaFilter {                                                                                             include: None,                                                                                             exclude: None,                                                                                         },                                                                                         required_fields: 2,                                                                                     },                                                                                 ),                                                                                 has_extra: false,                                                                                 root_model: false,                                                                                 name: "AnnotationLineEndOptions",                                                                             },                                                                         ),                                                                     },                                                                 ),                                                             },                                                         ),                                                     ),                                                     required: true,                                                 },                                                 "line_width": SerField {                                                     key_py: Py(                                                         0x00007ffffa112cf0,                                                     ),                                                     alias: None,                                                     alias_py: None,                                                     serializer: Some(                                                         WithDefault(                                                             WithDefaultSerializer {                                                                 default: Default(                                                                     Py(                                                                         0x00007ffffff85420,                                                                     ),                                                                 ),                                                                 serializer: Nullable(                                                                     NullableSerializer {                                                                         serializer: Float(                                                                             FloatSerializer {                                                                                 inf_nan_mode: Null,                                                                             },                                                                         ),                                                                     },                                                                 ),                                                             },                                                         ),                                                     ),                                                     required: true,                                                 },                                                 "position": SerField {                                                     key_py: Py(                                                         0x00007fffff116db0,                                                     ),                                                     alias: None,                                                     alias_py: None,                                                     serializer: Some(                                                         WithDefault(                                                             WithDefaultSerializer {                                                                 default: Default(                                                                     Py(                                                                         0x00007ffffff85420,                                                                     ),                                                                 ),                                                                 serializer: Nullable(                                                                     NullableSerializer {                                                                         serializer: Model(                                                                             ModelSerializer {                                                                                 class: Py(                                                                                     0x0000555556a4f8b0,                                                                                 ),                                                                                 serializer: Fields(                                                                                     GeneralFieldsSerializer {                                                                                         fields: {                                                                                             "x": SerField {                                                                                                 key_py: Py(                                                                                                     0x00007fffff8fe870,                                                                                                 ),                                                                                                 alias: None,                                                                                                 alias_py: None,                                                                                                 serializer: Some(                                                                                                     Float(                                                                                                         FloatSerializer {                                                                                                             inf_nan_mode: Null,                                                                                                         },                                                                                                     ),                                                                                                 ),                                                                                                 required: true,                                                                                             },                                                                                             "z": SerField {                                                                                                 key_py: Py(                                                                                                     0x00007fffff72a770,                                                                                                 ),                                                                                                 alias: None,                                                                                                 alias_py: None,                                                                                                 serializer: Some(                                                                                                     Float(                                                                                                         FloatSerializer {                                                                                                             inf_nan_mode: Null,                                                                                                         },                                                                                                     ),                                                                                                 ),                                                                                                 required: true,                                                                                             },                                                                                             "y": SerField {                                                                                                 key_py: Py(                                                                                                     0x00007fffff72a730,                                                                                                 ),                                                                                                 alias: None,                                                                                                 alias_py: None,                                                                                                 serializer: Some(                                                                                                     Float(                                                                                                         FloatSerializer {                                                                                                             inf_nan_mode: Null,                                                                                                         },                                                                                                     ),                                                                                                 ),                                                                                                 required: true,                                                                                             },                                                                                         },                                                                                         computed_fields: Some(                                                                                             ComputedFields(                                                                                                 [],                                                                                             ),                                                                                         ),                                                                                         mode: SimpleDict,                                                                                         extra_serializer: None,                                                                                         filter: SchemaFilter {                                                                                             include: None,                                                                                             exclude: None,                                                                                         },                                                                                         required_fields: 3,                                                                                     },                                                                                 ),                                                                                 has_extra: false,                                                                                 root_model: false,                                                                                 name: "Point3d",                                                                             },                                                                         ),                                                                     },                                                                 ),                                                             },                                                         ),                                                     ),                                                     required: true,                                                 },                                             },                                             computed_fields: Some(                                                 ComputedFields(                                                     [],                                                 ),                                             ),                                             mode: SimpleDict,                                             extra_serializer: None,                                             filter: SchemaFilter {                                                 include: None,                                                 exclude: None,                                             },                                             required_fields: 5,                                         },                                     ),                                     has_extra: false,                                     root_model: false,                                     name: "AnnotationOptions",                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 3,             },         ),         has_extra: false,         root_model: false,         name: "update_annotation",     }, ), definitions=[JsonOrPython(JsonOrPythonSerializer { json: Str(StrSerializer), python: Any(AnySerializer), name: "json-or-python[json=str, python=any]" })])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="update_annotation", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "annotation_id",                         lookup_key: Simple {                             key: "annotation_id",                             py_key: Py(                                 0x00007fffe1082570,                             ),                             path: LookupPath(                                 [                                     S(                                         "annotation_id",                                         Py(                                             0x00007fffe1082570,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe1082570,                         ),                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "options",                         lookup_key: Simple {                             key: "options",                             py_key: Py(                                 0x00007fffff67d970,                             ),                             path: LookupPath(                                 [                                     S(                                         "options",                                         Py(                                             0x00007fffff67d970,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff67d970,                         ),                         validator: Model(                             ModelValidator {                                 revalidate: Never,                                 validator: ModelFields(                                     ModelFieldsValidator {                                         fields: [                                             Field {                                                 name: "color",                                                 lookup_key: Simple {                                                     key: "color",                                                     py_key: Py(                                                         0x00007fffff6e21b0,                                                     ),                                                     path: LookupPath(                                                         [                                                             S(                                                                 "color",                                                                 Py(                                                                     0x00007fffff6e21b0,                                                                 ),                                                             ),                                                         ],                                                     ),                                                 },                                                 name_py: Py(                                                     0x00007fffff6e21b0,                                                 ),                                                 validator: WithDefault(                                                     WithDefaultValidator {                                                         default: Default(                                                             Py(                                                                 0x00007ffffff85420,                                                             ),                                                         ),                                                         on_error: Raise,                                                         validator: Nullable(                                                             NullableValidator {                                                                 validator: Model(                                                                     ModelValidator {                                                                         revalidate: Never,                                                                         validator: ModelFields(                                                                             ModelFieldsValidator {                                                                                 fields: [                                                                                     Field {                                                                                         name: "a",                                                                                         lookup_key: Simple {                                                                                             key: "a",                                                                                             py_key: Py(                                                                                                 0x00007fffff82fa70,                                                                                             ),                                                                                             path: LookupPath(                                                                                                 [                                                                                                     S(                                                                                                         "a",                                                                                                         Py(                                                                                                             0x00007fffff82fa70,                                                                                                         ),                                                                                                     ),                                                                                                 ],                                                                                             ),                                                                                         },                                                                                         name_py: Py(                                                                                             0x00007fffff82fa70,                                                                                         ),                                                                                         validator: Float(                                                                                             FloatValidator {                                                                                                 strict: false,                                                                                                 allow_inf_nan: true,                                                                                             },                                                                                         ),                                                                                         frozen: false,                                                                                     },                                                                                     Field {                                                                                         name: "b",                                                                                         lookup_key: Simple {                                                                                             key: "b",                                                                                             py_key: Py(                                                                                                 0x00007fffff86b330,                                                                                             ),                                                                                             path: LookupPath(                                                                                                 [                                                                                                     S(                                                                                                         "b",                                                                                                         Py(                                                                                                             0x00007fffff86b330,                                                                                                         ),                                                                                                     ),                                                                                                 ],                                                                                             ),                                                                                         },                                                                                         name_py: Py(                                                                                             0x00007fffff86b330,                                                                                         ),                                                                                         validator: Float(                                                                                             FloatValidator {                                                                                                 strict: false,                                                                                                 allow_inf_nan: true,                                                                                             },                                                                                         ),                                                                                         frozen: false,                                                                                     },                                                                                     Field {                                                                                         name: "g",                                                                                         lookup_key: Simple {                                                                                             key: "g",                                                                                             py_key: Py(                                                                                                 0x00007fffff858bb0,                                                                                             ),                                                                                             path: LookupPath(                                                                                                 [                                                                                                     S(                                                                                                         "g",                                                                                                         Py(                                                                                                             0x00007fffff858bb0,                                                                                                         ),                                                                                                     ),                                                                                                 ],                                                                                             ),                                                                                         },                                                                                         name_py: Py(                                                                                             0x00007fffff858bb0,                                                                                         ),                                                                                         validator: Float(                                                                                             FloatValidator {                                                                                                 strict: false,                                                                                                 allow_inf_nan: true,                                                                                             },                                                                                         ),                                                                                         frozen: false,                                                                                     },                                                                                     Field {                                                                                         name: "r",                                                                                         lookup_key: Simple {                                                                                             key: "r",                                                                                             py_key: Py(                                                                                                 0x00007fffff89d4b0,                                                                                             ),                                                                                             path: LookupPath(                                                                                                 [                                                                                                     S(                                                                                                         "r",                                                                                                         Py(                                                                                                             0x00007fffff89d4b0,                                                                                                         ),                                                                                                     ),                                                                                                 ],                                                                                             ),                                                                                         },                                                                                         name_py: Py(                                                                                             0x00007fffff89d4b0,                                                                                         ),                                                                                         validator: Float(                                                                                             FloatValidator {                                                                                                 strict: false,                                                                                                 allow_inf_nan: true,                                                                                             },                                                                                         ),                                                                                         frozen: false,                                                                                     },                                                                                 ],                                                                                 model_name: "Color",                                                                                 extra_behavior: Ignore,                                                                                 extras_validator: None,                                                                                 strict: false,                                                                                 from_attributes: false,                                                                                 loc_by_alias: true,                                                                             },                                                                         ),                                                                         class: Py(                                                                             0x0000555556990860,                                                                         ),                                                                         post_init: None,                                                                         frozen: false,                                                                         custom_init: false,                                                                         root_model: false,                                                                         name: "Color",                                                                     },                                                                 ),                                                                 name: "nullable[Color]",                                                             },                                                         ),                                                         validate_default: false,                                                         copy_default: false,                                                         name: "default[nullable[Color]]",                                                     },                                                 ),                                                 frozen: false,                                             },                                             Field {                                                 name: "line_ends",                                                 lookup_key: Simple {                                                     key: "line_ends",                                                     py_key: Py(                                                         0x00007fffe20b14b0,                                                     ),                                                     path: LookupPath(                                                         [                                                             S(                                                                 "line_ends",                                                                 Py(                                                                     0x00007fffe20b14b0,                                                                 ),                                                             ),                                                         ],                                                     ),                                                 },                                                 name_py: Py(                                                     0x00007fffe20b14b0,                                                 ),                                                 validator: WithDefault(                                                     WithDefaultValidator {                                                         default: Default(                                                             Py(                                                                 0x00007ffffff85420,                                                             ),                                                         ),                                                         on_error: Raise,                                                         validator: Nullable(                                                             NullableValidator {                                                                 validator: Model(                                                                     ModelValidator {                                                                         revalidate: Never,                                                                         validator: ModelFields(                                                                             ModelFieldsValidator {                                                                                 fields: [                                                                                     Field {                                                                                         name: "end",                                                                                         lookup_key: Simple {                                                                                             key: "end",                                                                                             py_key: Py(                                                                                                 0x00007fffff952eb0,                                                                                             ),                                                                                             path: LookupPath(                                                                                                 [                                                                                                     S(                                                                                                         "end",                                                                                                         Py(                                                                                                             0x00007fffff952eb0,                                                                                                         ),                                                                                                     ),                                                                                                 ],                                                                                             ),                                                                                         },                                                                                         name_py: Py(                                                                                             0x00007fffff952eb0,                                                                                         ),                                                                                         validator: DefinitionRef(                                                                                             DefinitionRefValidator {                                                                                                 definition: "kittycad.models.annotation_line_end.AnnotationLineEnd:93825014183648",                                                                                             },                                                                                         ),                                                                                         frozen: false,                                                                                     },                                                                                     Field {                                                                                         name: "start",                                                                                         lookup_key: Simple {                                                                                             key: "start",                                                                                             py_key: Py(                                                                                                 0x00007fffff929c30,                                                                                             ),                                                                                             path: LookupPath(                                                                                                 [                                                                                                     S(                                                                                                         "start",                                                                                                         Py(                                                                                                             0x00007fffff929c30,                                                                                                         ),                                                                                                     ),                                                                                                 ],                                                                                             ),                                                                                         },                                                                                         name_py: Py(                                                                                             0x00007fffff929c30,                                                                                         ),                                                                                         validator: DefinitionRef(                                                                                             DefinitionRefValidator {                                                                                                 definition: "kittycad.models.annotation_line_end.AnnotationLineEnd:93825014183648",                                                                                             },                                                                                         ),                                                                                         frozen: false,                                                                                     },                                                                                 ],                                                                                 model_name: "AnnotationLineEndOptions",                                                                                 extra_behavior: Ignore,                                                                                 extras_validator: None,                                                                                 strict: false,                                                                                 from_attributes: false,                                                                                 loc_by_alias: true,                                                                             },                                                                         ),                                                                         class: Py(                                                                             0x0000555556a43ac0,                                                                         ),                                                                         post_init: None,                                                                         frozen: false,                                                                         custom_init: false,                                                                         root_model: false,                                                                         name: "AnnotationLineEndOptions",                                                                     },                                                                 ),                                                                 name: "nullable[AnnotationLineEndOptions]",                                                             },                                                         ),                                                         validate_default: false,                                                         copy_default: false,                                                         name: "default[nullable[AnnotationLineEndOptions]]",                                                     },                                                 ),                                                 frozen: false,                                             },                                             Field {                                                 name: "line_width",                                                 lookup_key: Simple {                                                     key: "line_width",                                                     py_key: Py(                                                         0x00007ffffa112cf0,                                                     ),                                                     path: LookupPath(                                                         [                                                             S(                                                                 "line_width",                                                                 Py(                                                                     0x00007ffffa112cf0,                                                                 ),                                                             ),                                                         ],                                                     ),                                                 },                                                 name_py: Py(                                                     0x00007ffffa112cf0,                                                 ),                                                 validator: WithDefault(                                                     WithDefaultValidator {                                                         default: Default(                                                             Py(                                                                 0x00007ffffff85420,                                                             ),                                                         ),                                                         on_error: Raise,                                                         validator: Nullable(                                                             NullableValidator {                                                                 validator: Float(                                                                     FloatValidator {                                                                         strict: false,                                                                         allow_inf_nan: true,                                                                     },                                                                 ),                                                                 name: "nullable[float]",                                                             },                                                         ),                                                         validate_default: false,                                                         copy_default: false,                                                         name: "default[nullable[float]]",                                                     },                                                 ),                                                 frozen: false,                                             },                                             Field {                                                 name: "position",                                                 lookup_key: Simple {                                                     key: "position",                                                     py_key: Py(                                                         0x00007fffff116db0,                                                     ),                                                     path: LookupPath(                                                         [                                                             S(                                                                 "position",                                                                 Py(                                                                     0x00007fffff116db0,                                                                 ),                                                             ),                                                         ],                                                     ),                                                 },                                                 name_py: Py(                                                     0x00007fffff116db0,                                                 ),                                                 validator: WithDefault(                                                     WithDefaultValidator {                                                         default: Default(                                                             Py(                                                                 0x00007ffffff85420,                                                             ),                                                         ),                                                         on_error: Raise,                                                         validator: Nullable(                                                             NullableValidator {                                                                 validator: Model(                                                                     ModelValidator {                                                                         revalidate: Never,                                                                         validator: ModelFields(                                                                             ModelFieldsValidator {                                                                                 fields: [                                                                                     Field {                                                                                         name: "x",                                                                                         lookup_key: Simple {                                                                                             key: "x",                                                                                             py_key: Py(                                                                                                 0x00007fffff8fe870,                                                                                             ),                                                                                             path: LookupPath(                                                                                                 [                                                                                                     S(                                                                                                         "x",                                                                                                         Py(                                                                                                             0x00007fffff8fe870,                                                                                                         ),                                                                                                     ),                                                                                                 ],                                                                                             ),                                                                                         },                                                                                         name_py: Py(                                                                                             0x00007fffff8fe870,                                                                                         ),                                                                                         validator: Float(                                                                                             FloatValidator {                                                                                                 strict: false,                                                                                                 allow_inf_nan: true,                                                                                             },                                                                                         ),                                                                                         frozen: false,                                                                                     },                                                                                     Field {                                                                                         name: "y",                                                                                         lookup_key: Simple {                                                                                             key: "y",                                                                                             py_key: Py(                                                                                                 0x00007fffff72a730,                                                                                             ),                                                                                             path: LookupPath(                                                                                                 [                                                                                                     S(                                                                                                         "y",                                                                                                         Py(                                                                                                             0x00007fffff72a730,                                                                                                         ),                                                                                                     ),                                                                                                 ],                                                                                             ),                                                                                         },                                                                                         name_py: Py(                                                                                             0x00007fffff72a730,                                                                                         ),                                                                                         validator: Float(                                                                                             FloatValidator {                                                                                                 strict: false,                                                                                                 allow_inf_nan: true,                                                                                             },                                                                                         ),                                                                                         frozen: false,                                                                                     },                                                                                     Field {                                                                                         name: "z",                                                                                         lookup_key: Simple {                                                                                             key: "z",                                                                                             py_key: Py(                                                                                                 0x00007fffff72a770,                                                                                             ),                                                                                             path: LookupPath(                                                                                                 [                                                                                                     S(                                                                                                         "z",                                                                                                         Py(                                                                                                             0x00007fffff72a770,                                                                                                         ),                                                                                                     ),                                                                                                 ],                                                                                             ),                                                                                         },                                                                                         name_py: Py(                                                                                             0x00007fffff72a770,                                                                                         ),                                                                                         validator: Float(                                                                                             FloatValidator {                                                                                                 strict: false,                                                                                                 allow_inf_nan: true,                                                                                             },                                                                                         ),                                                                                         frozen: false,                                                                                     },                                                                                 ],                                                                                 model_name: "Point3d",                                                                                 extra_behavior: Ignore,                                                                                 extras_validator: None,                                                                                 strict: false,                                                                                 from_attributes: false,                                                                                 loc_by_alias: true,                                                                             },                                                                         ),                                                                         class: Py(                                                                             0x0000555556a4f8b0,                                                                         ),                                                                         post_init: None,                                                                         frozen: false,                                                                         custom_init: false,                                                                         root_model: false,                                                                         name: "Point3d",                                                                     },                                                                 ),                                                                 name: "nullable[Point3d]",                                                             },                                                         ),                                                         validate_default: false,                                                         copy_default: false,                                                         name: "default[nullable[Point3d]]",                                                     },                                                 ),                                                 frozen: false,                                             },                                             Field {                                                 name: "text",                                                 lookup_key: Simple {                                                     key: "text",                                                     py_key: Py(                                                         0x00007fffff9529b0,                                                     ),                                                     path: LookupPath(                                                         [                                                             S(                                                                 "text",                                                                 Py(                                                                     0x00007fffff9529b0,                                                                 ),                                                             ),                                                         ],                                                     ),                                                 },                                                 name_py: Py(                                                     0x00007fffff9529b0,                                                 ),                                                 validator: WithDefault(                                                     WithDefaultValidator {                                                         default: Default(                                                             Py(                                                                 0x00007ffffff85420,                                                             ),                                                         ),                                                         on_error: Raise,                                                         validator: Nullable(                                                             NullableValidator {                                                                 validator: Model(                                                                     ModelValidator {                                                                         revalidate: Never,                                                                         validator: ModelFields(                                                                             ModelFieldsValidator {                                                                                 fields: [                                                                                     Field {                                                                                         name: "point_size",                                                                                         lookup_key: Simple {                                                                                             key: "point_size",                                                                                             py_key: Py(                                                                                                 0x00007fffe12d3a70,                                                                                             ),                                                                                             path: LookupPath(                                                                                                 [                                                                                                     S(                                                                                                         "point_size",                                                                                                         Py(                                                                                                             0x00007fffe12d3a70,                                                                                                         ),                                                                                                     ),                                                                                                 ],                                                                                             ),                                                                                         },                                                                                         name_py: Py(                                                                                             0x00007fffe12d3a70,                                                                                         ),                                                                                         validator: Int(                                                                                             IntValidator {                                                                                                 strict: false,                                                                                             },                                                                                         ),                                                                                         frozen: false,                                                                                     },                                                                                     Field {                                                                                         name: "text",                                                                                         lookup_key: Simple {                                                                                             key: "text",                                                                                             py_key: Py(                                                                                                 0x00007fffff9529b0,                                                                                             ),                                                                                             path: LookupPath(                                                                                                 [                                                                                                     S(                                                                                                         "text",                                                                                                         Py(                                                                                                             0x00007fffff9529b0,                                                                                                         ),                                                                                                     ),                                                                                                 ],                                                                                             ),                                                                                         },                                                                                         name_py: Py(                                                                                             0x00007fffff9529b0,                                                                                         ),                                                                                         validator: Str(                                                                                             StrValidator {                                                                                                 strict: false,                                                                                                 coerce_numbers_to_str: false,                                                                                             },                                                                                         ),                                                                                         frozen: false,                                                                                     },                                                                                     Field {                                                                                         name: "x",                                                                                         lookup_key: Simple {                                                                                             key: "x",                                                                                             py_key: Py(                                                                                                 0x00007fffff8fe870,                                                                                             ),                                                                                             path: LookupPath(                                                                                                 [                                                                                                     S(                                                                                                         "x",                                                                                                         Py(                                                                                                             0x00007fffff8fe870,                                                                                                         ),                                                                                                     ),                                                                                                 ],                                                                                             ),                                                                                         },                                                                                         name_py: Py(                                                                                             0x00007fffff8fe870,                                                                                         ),                                                                                         validator: LaxOrStrict(                                                                                             LaxOrStrictValidator {                                                                                                 strict: false,                                                                                                 lax_validator: Chain(                                                                                                     ChainValidator {                                                                                                         steps: [                                                                                                             Str(                                                                                                                 StrValidator {                                                                                                                     strict: false,                                                                                                                     coerce_numbers_to_str: false,                                                                                                                 },                                                                                                             ),                                                                                                             FunctionPlain(                                                                                                                 FunctionPlainValidator {                                                                                                                     func: Py(                                                                                                                         0x00007fffe149d160,                                                                                                                     ),                                                                                                                     config: Py(                                                                                                                         0x00007fffe0fb6480,                                                                                                                     ),                                                                                                                     name: "function-plain[to_enum()]",                                                                                                                     field_name: None,                                                                                                                     info_arg: false,                                                                                                                 },                                                                                                             ),                                                                                                         ],                                                                                                         name: "chain[str,function-plain[to_enum()]]",                                                                                                     },                                                                                                 ),                                                                                                 strict_validator: JsonOrPython(                                                                                                     JsonOrPython {                                                                                                         json: FunctionAfter(                                                                                                             FunctionAfterValidator {                                                                                                                 validator: Str(                                                                                                                     StrValidator {                                                                                                                         strict: false,                                                                                                                         coerce_numbers_to_str: false,                                                                                                                     },                                                                                                                 ),                                                                                                                 func: Py(                                                                                                                     0x00007fffe149d160,                                                                                                                 ),                                                                                                                 config: Py(                                                                                                                     0x00007fffe0fb6480,                                                                                                                 ),                                                                                                                 name: "function-after[to_enum(), str]",                                                                                                                 field_name: None,                                                                                                                 info_arg: false,                                                                                                             },                                                                                                         ),                                                                                                         python: IsInstance(                                                                                                             IsInstanceValidator {                                                                                                                 class: Py(                                                                                                                     0x0000555556a47e30,                                                                                                                 ),                                                                                                                 class_repr: "AnnotationTextAlignmentX",                                                                                                                 name: "is-instance[AnnotationTextAlignmentX]",                                                                                                             },                                                                                                         ),                                                                                                         name: "json-or-python[json=function-after[to_enum(), str],python=is-instance[AnnotationTextAlignmentX]]",                                                                                                     },                                                                                                 ),                                                                                                 name: "lax-or-strict[lax=chain[str,function-plain[to_enum()]],strict=json-or-python[json=function-after[to_enum(), str],python=is-instance[AnnotationTextAlignmentX]]]",                                                                                             },                                                                                         ),                                                                                         frozen: false,                                                                                     },                                                                                     Field {                                                                                         name: "y",                                                                                         lookup_key: Simple {                                                                                             key: "y",                                                                                             py_key: Py(                                                                                                 0x00007fffff72a730,                                                                                             ),                                                                                             path: LookupPath(                                                                                                 [                                                                                                     S(                                                                                                         "y",                                                                                                         Py(                                                                                                             0x00007fffff72a730,                                                                                                         ),                                                                                                     ),                                                                                                 ],                                                                                             ),                                                                                         },                                                                                         name_py: Py(                                                                                             0x00007fffff72a730,                                                                                         ),                                                                                         validator: LaxOrStrict(                                                                                             LaxOrStrictValidator {                                                                                                 strict: false,                                                                                                 lax_validator: Chain(                                                                                                     ChainValidator {                                                                                                         steps: [                                                                                                             Str(                                                                                                                 StrValidator {                                                                                                                     strict: false,                                                                                                                     coerce_numbers_to_str: false,                                                                                                                 },                                                                                                             ),                                                                                                             FunctionPlain(                                                                                                                 FunctionPlainValidator {                                                                                                                     func: Py(                                                                                                                         0x00007fffe149d5e0,                                                                                                                     ),                                                                                                                     config: Py(                                                                                                                         0x00007fffe0fb6480,                                                                                                                     ),                                                                                                                     name: "function-plain[to_enum()]",                                                                                                                     field_name: None,                                                                                                                     info_arg: false,                                                                                                                 },                                                                                                             ),                                                                                                         ],                                                                                                         name: "chain[str,function-plain[to_enum()]]",                                                                                                     },                                                                                                 ),                                                                                                 strict_validator: JsonOrPython(                                                                                                     JsonOrPython {                                                                                                         json: FunctionAfter(                                                                                                             FunctionAfterValidator {                                                                                                                 validator: Str(                                                                                                                     StrValidator {                                                                                                                         strict: false,                                                                                                                         coerce_numbers_to_str: false,                                                                                                                     },                                                                                                                 ),                                                                                                                 func: Py(                                                                                                                     0x00007fffe149d5e0,                                                                                                                 ),                                                                                                                 config: Py(                                                                                                                     0x00007fffe0fb6480,                                                                                                                 ),                                                                                                                 name: "function-after[to_enum(), str]",                                                                                                                 field_name: None,                                                                                                                 info_arg: false,                                                                                                             },                                                                                                         ),                                                                                                         python: IsInstance(                                                                                                             IsInstanceValidator {                                                                                                                 class: Py(                                                                                                                     0x0000555556a46eb0,                                                                                                                 ),                                                                                                                 class_repr: "AnnotationTextAlignmentY",                                                                                                                 name: "is-instance[AnnotationTextAlignmentY]",                                                                                                             },                                                                                                         ),                                                                                                         name: "json-or-python[json=function-after[to_enum(), str],python=is-instance[AnnotationTextAlignmentY]]",                                                                                                     },                                                                                                 ),                                                                                                 name: "lax-or-strict[lax=chain[str,function-plain[to_enum()]],strict=json-or-python[json=function-after[to_enum(), str],python=is-instance[AnnotationTextAlignmentY]]]",                                                                                             },                                                                                         ),                                                                                         frozen: false,                                                                                     },                                                                                 ],                                                                                 model_name: "AnnotationTextOptions",                                                                                 extra_behavior: Ignore,                                                                                 extras_validator: None,                                                                                 strict: false,                                                                                 from_attributes: false,                                                                                 loc_by_alias: true,                                                                             },                                                                         ),                                                                         class: Py(                                                                             0x0000555556a47700,                                                                         ),                                                                         post_init: None,                                                                         frozen: false,                                                                         custom_init: false,                                                                         root_model: false,                                                                         name: "AnnotationTextOptions",                                                                     },                                                                 ),                                                                 name: "nullable[AnnotationTextOptions]",                                                             },                                                         ),                                                         validate_default: false,                                                         copy_default: false,                                                         name: "default[nullable[AnnotationTextOptions]]",                                                     },                                                 ),                                                 frozen: false,                                             },                                         ],                                         model_name: "AnnotationOptions",                                         extra_behavior: Ignore,                                         extras_validator: None,                                         strict: false,                                         from_attributes: false,                                         loc_by_alias: true,                                     },                                 ),                                 class: Py(                                     0x0000555556a517c0,                                 ),                                 post_init: None,                                 frozen: false,                                 custom_init: false,                                 root_model: false,                                 name: "AnnotationOptions",                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007fffe113e350,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "update_annotation": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007fffe113e350,                                                 ),                                             ],                                         },                                         expected_repr: "'update_annotation'",                                         name: "literal['update_annotation']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['update_annotation']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "update_annotation",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556f31c20,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "update_annotation",     }, ), definitions=[LaxOrStrict(LaxOrStrictValidator { strict: false, lax_validator: Chain(ChainValidator { steps: [Str(StrValidator { strict: false, coerce_numbers_to_str: false }), FunctionPlain(FunctionPlainValidator { func: Py(0x7fffe12e49d0), config: Py(0x7fffe0fa2fc0), name: "function-plain[to_enum()]", field_name: None, info_arg: false })], name: "chain[str,function-plain[to_enum()]]" }), strict_validator: JsonOrPython(JsonOrPython { json: FunctionAfter(FunctionAfterValidator { validator: Str(StrValidator { strict: false, coerce_numbers_to_str: false }), func: Py(0x7fffe12e49d0), config: Py(0x7fffe0fa2fc0), name: "function-after[to_enum(), str]", field_name: None, info_arg: false }), python: IsInstance(IsInstanceValidator { class: Py(0x555556a436e0), class_repr: "AnnotationLineEnd", name: "is-instance[AnnotationLineEnd]" }), name: "json-or-python[json=function-after[to_enum(), str],python=is-instance[AnnotationLineEnd]]" }), name: "lax-or-strict[lax=chain[str,function-plain[to_enum()]],strict=json-or-python[json=function-after[to_enum(), str],python=is-instance[AnnotationLineEnd]]]" })])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, annotation_id: str, options: kittycad.models.annotation_options.AnnotationOptions, type: Literal['update_annotation'] = 'update_annotation') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

annotation_id: str[source]
classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'annotation_id': FieldInfo(annotation=str, required=True), 'options': FieldInfo(annotation=AnnotationOptions, required=True), 'type': FieldInfo(annotation=Literal['update_annotation'], required=False, default='update_annotation')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

options: AnnotationOptions[source]
classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

type: Literal['update_annotation'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model

class kittycad.models.modeling_cmd.volume(**data)[source][source]

Get the volume of entities in the scene or the default scene.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__abstractmethods__ = frozenset({})[source]
__annotations__ = {'__class_vars__': 'ClassVar[set[str]]', '__private_attributes__': 'ClassVar[dict[str, ModelPrivateAttr]]', '__pydantic_complete__': 'ClassVar[bool]', '__pydantic_core_schema__': 'ClassVar[CoreSchema]', '__pydantic_custom_init__': 'ClassVar[bool]', '__pydantic_decorators__': 'ClassVar[_decorators.DecoratorInfos]', '__pydantic_extra__': 'dict[str, Any] | None', '__pydantic_fields_set__': 'set[str]', '__pydantic_generic_metadata__': 'ClassVar[_generics.PydanticGenericMetadata]', '__pydantic_parent_namespace__': 'ClassVar[dict[str, Any] | None]', '__pydantic_post_init__': "ClassVar[None | Literal['model_post_init']]", '__pydantic_private__': 'dict[str, Any] | None', '__pydantic_root_model__': 'ClassVar[bool]', '__pydantic_serializer__': 'ClassVar[SchemaSerializer]', '__pydantic_validator__': 'ClassVar[SchemaValidator]', '__signature__': 'ClassVar[Signature]', 'entity_ids': typing.List[str], 'model_config': 'ClassVar[ConfigDict]', 'model_fields': 'ClassVar[dict[str, FieldInfo]]', 'output_unit': <enum 'UnitVolume'>, 'source_unit': <enum 'UnitLength'>, 'type': typing.Literal['volume']}[source]
classmethod __class_getitem__(typevar_values)[source]
__class_vars__: ClassVar[set[str]] = {}[source]
__copy__()[source]

Returns a shallow copy of the model.

Return type:

Model

__deepcopy__(memo=None)[source]

Returns a deep copy of the model.

Return type:

Model

__delattr__(item)[source]

Implement delattr(self, name).

Return type:

Any

__dict__[source]
__eq__(other)[source]

Return self==value.

Return type:

bool

__fields__ = {'entity_ids': FieldInfo(annotation=List[str], required=True), 'output_unit': FieldInfo(annotation=UnitVolume, required=True), 'source_unit': FieldInfo(annotation=UnitLength, required=True), 'type': FieldInfo(annotation=Literal['volume'], required=False, default='volume')}[source]
property __fields_set__: set[str][source]
classmethod __get_pydantic_core_schema__(_BaseModel__source, _BaseModel__handler)[source]

Hook into generating the model’s CoreSchema.

Parameters:
  • __source – The class we are generating a schema for. This will generally be the same as the cls argument if this is a classmethod.

  • __handler – Call into Pydantic’s internal JSON schema generation. A callable that calls into Pydantic’s internal CoreSchema generation logic.

Return type:

Union[AnySchema, NoneSchema, BoolSchema, IntSchema, FloatSchema, DecimalSchema, StringSchema, BytesSchema, DateSchema, TimeSchema, DatetimeSchema, TimedeltaSchema, LiteralSchema, IsInstanceSchema, IsSubclassSchema, CallableSchema, ListSchema, TuplePositionalSchema, TupleVariableSchema, SetSchema, FrozenSetSchema, GeneratorSchema, DictSchema, AfterValidatorFunctionSchema, BeforeValidatorFunctionSchema, WrapValidatorFunctionSchema, PlainValidatorFunctionSchema, WithDefaultSchema, NullableSchema, UnionSchema, TaggedUnionSchema, ChainSchema, LaxOrStrictSchema, JsonOrPythonSchema, TypedDictSchema, ModelFieldsSchema, ModelSchema, DataclassArgsSchema, DataclassSchema, ArgumentsSchema, CallSchema, CustomErrorSchema, JsonSchema, UrlSchema, MultiHostUrlSchema, DefinitionsSchema, DefinitionReferenceSchema, UuidSchema]

Returns:

A pydantic-core CoreSchema.

classmethod __get_pydantic_json_schema__(_BaseModel__core_schema, _BaseModel__handler)[source]

Hook into generating the model’s JSON schema.

Parameters:
  • __core_schema – A pydantic-core CoreSchema. You can ignore this argument and call the handler with a new CoreSchema, wrap this CoreSchema ({‘type’: ‘nullable’, ‘schema’: current_schema}), or just call the handler with the original schema.

  • __handler – Call into Pydantic’s internal JSON schema generation. This will raise a pydantic.errors.PydanticInvalidForJsonSchema if JSON schema generation fails. Since this gets called by BaseModel.model_json_schema you can override the schema_generator argument to that function to change JSON schema generation globally for a type.

Return type:

Dict[str, Any]

Returns:

A JSON schema, as a Python object.

__getattr__(item)[source]
Return type:

Any

__getstate__()[source]
Return type:

dict[Any, Any]

__hash__ = None[source]
__init__(**data)[source]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

__iter__()[source]

So dict(model) works.

Return type:

TupleGenerator

__module__ = 'kittycad.models.modeling_cmd'[source]
__pretty__(fmt, **kwargs)[source]

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

Return type:

Generator[Any, None, None]

__private_attributes__: ClassVar[dict[str, ModelPrivateAttr]] = {}[source]
__pydantic_complete__: ClassVar[bool] = True[source]
__pydantic_core_schema__: ClassVar[CoreSchema] = {'cls': <class 'kittycad.models.modeling_cmd.volume'>, 'config': {'title': 'volume'}, 'custom_init': False, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_annotation_functions': [], 'pydantic_js_functions': [functools.partial(<function modify_model_json_schema>, cls=<class 'kittycad.models.modeling_cmd.volume'>), <bound method BaseModel.__get_pydantic_json_schema__ of <class 'kittycad.models.modeling_cmd.volume'>>]}, 'ref': 'kittycad.models.modeling_cmd.volume:93825020105232', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'entity_ids': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'items_schema': {'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'str'}, 'strict': False, 'type': 'list'}, 'type': 'model-field'}, 'output_unit': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'lax_schema': {'steps': [{'type': 'str'}, {'type': 'function-plain', 'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}}], 'type': 'chain'}, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_functions': [<function get_enum_core_schema.<locals>.get_json_schema>]}, 'ref': 'kittycad.models.unit_volume.UnitVolume:93825015377696', 'strict_schema': {'json_schema': {'function': {'function': <function get_enum_core_schema.<locals>.to_enum>, 'type': 'no-info'}, 'schema': {'type': 'str'}, 'type': 'function-after'}, 'python_schema': {'cls': <enum 'UnitVolume'>, 'type': 'is-instance'}, 'type': 'json-or-python'}, 'type': 'lax-or-strict'}, 'type': 'model-field'}, 'source_unit': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'lax_schema': {'steps': [{'type': 'str'}, {'type': 'function-plain', 'function': {'type': 'no-info', 'function': <function get_enum_core_schema.<locals>.to_enum>}}], 'type': 'chain'}, 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False, 'pydantic_js_functions': [<function get_enum_core_schema.<locals>.get_json_schema>]}, 'ref': 'kittycad.models.unit_length.UnitLength:93825014613552', 'strict_schema': {'json_schema': {'function': {'function': <function get_enum_core_schema.<locals>.to_enum>, 'type': 'no-info'}, 'schema': {'type': 'str'}, 'type': 'function-after'}, 'python_schema': {'cls': <enum 'UnitLength'>, 'type': 'is-instance'}, 'type': 'json-or-python'}, 'type': 'lax-or-strict'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_annotation_functions': [<function get_json_schema_update_func.<locals>.json_schema_update_func>], 'pydantic_js_functions': []}, 'schema': {'default': 'volume', 'schema': {'expected': ['volume'], 'metadata': {'pydantic.internal.needs_apply_discriminated_union': False}, 'type': 'literal'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'volume', 'type': 'model-fields'}, 'type': 'model'}[source]
__pydantic_custom_init__: ClassVar[bool] = False[source]
__pydantic_decorators__: ClassVar[_decorators.DecoratorInfos] = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})[source]
__pydantic_extra__: dict[str, Any] | None[source]
__pydantic_fields_set__: set[str][source]
__pydantic_generic_metadata__: ClassVar[_generics.PydanticGenericMetadata] = {'args': (), 'origin': None, 'parameters': ()}[source]
classmethod __pydantic_init_subclass__(**kwargs)[source]

This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized. In particular, attributes like model_fields will be present when this is called.

This is necessary because __init_subclass__ will always be called by type.__new__, and it would require a prohibitively large refactor to the ModelMetaclass to ensure that type.__new__ was called in such a manner that the class would already be sufficiently initialized.

This will receive the same kwargs that would be passed to the standard __init_subclass__, namely, any kwargs passed to the class definition that aren’t used internally by pydantic.

Parameters:

**kwargs (Any) – Any keyword arguments passed to the class definition that aren’t used internally by pydantic.

Return type:

None

__pydantic_parent_namespace__: ClassVar[dict[str, Any] | None] = {'Annotated': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationOptions': <pydantic._internal._model_construction._PydanticWeakRef object>, 'AnnotationType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'BaseModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'CameraDragInteractionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Field': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImageFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ImportFile': <pydantic._internal._model_construction._PydanticWeakRef object>, 'InputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'List': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Literal': <pydantic._internal._model_construction._PydanticWeakRef object>, 'ModelingCmdId': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Optional': <pydantic._internal._model_construction._PydanticWeakRef object>, 'OutputFormat': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintBound': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathComponentConstraintType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'PathSegment': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point2d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Point3d': <pydantic._internal._model_construction._PydanticWeakRef object>, 'RootModel': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneSelectionType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'SceneToolType': <pydantic._internal._model_construction._PydanticWeakRef object>, 'Union': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitArea': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitDensity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitLength': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitMass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'UnitVolume': <pydantic._internal._model_construction._PydanticWeakRef object>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/user/src/kittycad/models/__pycache__/modeling_cmd.cpython-39.pyc', '__doc__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__file__': '/home/user/src/kittycad/models/modeling_cmd.py', '__loader__': <pydantic._internal._model_construction._PydanticWeakRef object>, '__name__': 'kittycad.models.modeling_cmd', '__package__': 'kittycad.models', '__spec__': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'camera_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'close_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_control_points': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_end_points': <pydantic._internal._model_construction._PydanticWeakRef object>, 'curve_get_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_disable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_enable_sketch_mode': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_focus_on': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_look_at': <pydantic._internal._model_construction._PydanticWeakRef object>, 'default_camera_zoom': <pydantic._internal._model_construction._PydanticWeakRef object>, 'density': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_enter': <pydantic._internal._model_construction._PydanticWeakRef object>, 'edit_mode_exit': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_fade': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_all_child_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_child_uuid': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_num_children': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_get_parent_id': <pydantic._internal._model_construction._PydanticWeakRef object>, 'entity_set_opacity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'export': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extend_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'extrude': <pydantic._internal._model_construction._PydanticWeakRef object>, 'get_entity_type': <pydantic._internal._model_construction._PydanticWeakRef object>, 'handle_mouse_drag_end': <pydantic._internal._model_construction._PydanticWeakRef object>, 'handle_mouse_drag_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'handle_mouse_drag_start': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entities': <pydantic._internal._model_construction._PydanticWeakRef object>, 'highlight_set_entity': <pydantic._internal._model_construction._PydanticWeakRef object>, 'import_files': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_axes_gizmo': <pydantic._internal._model_construction._PydanticWeakRef object>, 'make_plane': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mass': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_click': <pydantic._internal._model_construction._PydanticWeakRef object>, 'mouse_move': <pydantic._internal._model_construction._PydanticWeakRef object>, 'move_path_pen': <pydantic._internal._model_construction._PydanticWeakRef object>, 'new_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_bring_to_front': <pydantic._internal._model_construction._PydanticWeakRef object>, 'object_visible': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_curve_uuids_for_vertices': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_info': <pydantic._internal._model_construction._PydanticWeakRef object>, 'path_get_vertex_uuids': <pydantic._internal._model_construction._PydanticWeakRef object>, 'plane_intersect_and_project': <pydantic._internal._model_construction._PydanticWeakRef object>, 'plane_set_color': <pydantic._internal._model_construction._PydanticWeakRef object>, 'reconfigure_stream': <pydantic._internal._model_construction._PydanticWeakRef object>, 'remove_scene_objects': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_add': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_clear': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_get': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_remove': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_replace': <pydantic._internal._model_construction._PydanticWeakRef object>, 'select_with_point': <pydantic._internal._model_construction._PydanticWeakRef object>, 'send_object': <pydantic._internal._model_construction._PydanticWeakRef object>, 'set_tool': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_disable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'sketch_mode_enable': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid2d_add_hole': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_edge_faces': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_all_opposite_edges': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_next_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_opposite_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'solid3d_get_prev_adjacent_edge': <pydantic._internal._model_construction._PydanticWeakRef object>, 'start_path': <pydantic._internal._model_construction._PydanticWeakRef object>, 'take_snapshot': <pydantic._internal._model_construction._PydanticWeakRef object>, 'update_annotation': <pydantic._internal._model_construction._PydanticWeakRef object>}[source]
__pydantic_post_init__: ClassVar[None | Literal['model_post_init']] = None[source]
__pydantic_private__: dict[str, Any] | None[source]
__pydantic_root_model__: ClassVar[bool] = False[source]
__pydantic_serializer__: ClassVar[SchemaSerializer] = SchemaSerializer(serializer=Model(     ModelSerializer {         class: Py(             0x0000555556fe9210,         ),         serializer: Fields(             GeneralFieldsSerializer {                 fields: {                     "source_unit": SerField {                         key_py: Py(                             0x00007fffe10dd370,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             JsonOrPython(                                 JsonOrPythonSerializer {                                     json: Str(                                         StrSerializer,                                     ),                                     python: Any(                                         AnySerializer,                                     ),                                     name: "json-or-python[json=str, python=any]",                                 },                             ),                         ),                         required: true,                     },                     "type": SerField {                         key_py: Py(                             0x00007fffff8ebef0,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             WithDefault(                                 WithDefaultSerializer {                                     default: Default(                                         Py(                                             0x00007ffffdc0c230,                                         ),                                     ),                                     serializer: Literal(                                         LiteralSerializer {                                             expected_int: {},                                             expected_str: {                                                 "volume",                                             },                                             expected_py: None,                                             name: "literal['volume']",                                         },                                     ),                                 },                             ),                         ),                         required: true,                     },                     "entity_ids": SerField {                         key_py: Py(                             0x00007fffe118cc70,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             List(                                 ListSerializer {                                     item_serializer: Str(                                         StrSerializer,                                     ),                                     filter: SchemaFilter {                                         include: None,                                         exclude: None,                                     },                                     name: "list[str]",                                 },                             ),                         ),                         required: true,                     },                     "output_unit": SerField {                         key_py: Py(                             0x00007fffe14f4170,                         ),                         alias: None,                         alias_py: None,                         serializer: Some(                             JsonOrPython(                                 JsonOrPythonSerializer {                                     json: Str(                                         StrSerializer,                                     ),                                     python: Any(                                         AnySerializer,                                     ),                                     name: "json-or-python[json=str, python=any]",                                 },                             ),                         ),                         required: true,                     },                 },                 computed_fields: Some(                     ComputedFields(                         [],                     ),                 ),                 mode: SimpleDict,                 extra_serializer: None,                 filter: SchemaFilter {                     include: None,                     exclude: None,                 },                 required_fields: 4,             },         ),         has_extra: false,         root_model: false,         name: "volume",     }, ), definitions=[])[source]
__pydantic_validator__: ClassVar[SchemaValidator] = SchemaValidator(title="volume", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "entity_ids",                         lookup_key: Simple {                             key: "entity_ids",                             py_key: Py(                                 0x00007fffe118cc70,                             ),                             path: LookupPath(                                 [                                     S(                                         "entity_ids",                                         Py(                                             0x00007fffe118cc70,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe118cc70,                         ),                         validator: List(                             ListValidator {                                 strict: false,                                 item_validator: Some(                                     Str(                                         StrValidator {                                             strict: false,                                             coerce_numbers_to_str: false,                                         },                                     ),                                 ),                                 min_length: None,                                 max_length: None,                                 name: OnceLock(                                     <uninit>,                                 ),                             },                         ),                         frozen: false,                     },                     Field {                         name: "output_unit",                         lookup_key: Simple {                             key: "output_unit",                             py_key: Py(                                 0x00007fffe14f4170,                             ),                             path: LookupPath(                                 [                                     S(                                         "output_unit",                                         Py(                                             0x00007fffe14f4170,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe14f4170,                         ),                         validator: LaxOrStrict(                             LaxOrStrictValidator {                                 strict: false,                                 lax_validator: Chain(                                     ChainValidator {                                         steps: [                                             Str(                                                 StrValidator {                                                     strict: false,                                                     coerce_numbers_to_str: false,                                                 },                                             ),                                             FunctionPlain(                                                 FunctionPlainValidator {                                                     func: Py(                                                         0x00007fffe0e55670,                                                     ),                                                     config: Py(                                                         0x00007fffe0e51580,                                                     ),                                                     name: "function-plain[to_enum()]",                                                     field_name: None,                                                     info_arg: false,                                                 },                                             ),                                         ],                                         name: "chain[str,function-plain[to_enum()]]",                                     },                                 ),                                 strict_validator: JsonOrPython(                                     JsonOrPython {                                         json: FunctionAfter(                                             FunctionAfterValidator {                                                 validator: Str(                                                     StrValidator {                                                         strict: false,                                                         coerce_numbers_to_str: false,                                                     },                                                 ),                                                 func: Py(                                                     0x00007fffe0e55670,                                                 ),                                                 config: Py(                                                     0x00007fffe0e51580,                                                 ),                                                 name: "function-after[to_enum(), str]",                                                 field_name: None,                                                 info_arg: false,                                             },                                         ),                                         python: IsInstance(                                             IsInstanceValidator {                                                 class: Py(                                                     0x0000555556b66f20,                                                 ),                                                 class_repr: "UnitVolume",                                                 name: "is-instance[UnitVolume]",                                             },                                         ),                                         name: "json-or-python[json=function-after[to_enum(), str],python=is-instance[UnitVolume]]",                                     },                                 ),                                 name: "lax-or-strict[lax=chain[str,function-plain[to_enum()]],strict=json-or-python[json=function-after[to_enum(), str],python=is-instance[UnitVolume]]]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "source_unit",                         lookup_key: Simple {                             key: "source_unit",                             py_key: Py(                                 0x00007fffe10dd370,                             ),                             path: LookupPath(                                 [                                     S(                                         "source_unit",                                         Py(                                             0x00007fffe10dd370,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffe10dd370,                         ),                         validator: LaxOrStrict(                             LaxOrStrictValidator {                                 strict: false,                                 lax_validator: Chain(                                     ChainValidator {                                         steps: [                                             Str(                                                 StrValidator {                                                     strict: false,                                                     coerce_numbers_to_str: false,                                                 },                                             ),                                             FunctionPlain(                                                 FunctionPlainValidator {                                                     func: Py(                                                         0x00007fffe0e558b0,                                                     ),                                                     config: Py(                                                         0x00007fffe0e51580,                                                     ),                                                     name: "function-plain[to_enum()]",                                                     field_name: None,                                                     info_arg: false,                                                 },                                             ),                                         ],                                         name: "chain[str,function-plain[to_enum()]]",                                     },                                 ),                                 strict_validator: JsonOrPython(                                     JsonOrPython {                                         json: FunctionAfter(                                             FunctionAfterValidator {                                                 validator: Str(                                                     StrValidator {                                                         strict: false,                                                         coerce_numbers_to_str: false,                                                     },                                                 ),                                                 func: Py(                                                     0x00007fffe0e558b0,                                                 ),                                                 config: Py(                                                     0x00007fffe0e51580,                                                 ),                                                 name: "function-after[to_enum(), str]",                                                 field_name: None,                                                 info_arg: false,                                             },                                         ),                                         python: IsInstance(                                             IsInstanceValidator {                                                 class: Py(                                                     0x0000555556aac630,                                                 ),                                                 class_repr: "UnitLength",                                                 name: "is-instance[UnitLength]",                                             },                                         ),                                         name: "json-or-python[json=function-after[to_enum(), str],python=is-instance[UnitLength]]",                                     },                                 ),                                 name: "lax-or-strict[lax=chain[str,function-plain[to_enum()]],strict=json-or-python[json=function-after[to_enum(), str],python=is-instance[UnitLength]]]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "type",                         lookup_key: Simple {                             key: "type",                             py_key: Py(                                 0x00007fffff8ebef0,                             ),                             path: LookupPath(                                 [                                     S(                                         "type",                                         Py(                                             0x00007fffff8ebef0,                                         ),                                     ),                                 ],                             ),                         },                         name_py: Py(                             0x00007fffff8ebef0,                         ),                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x00007ffffdc0c230,                                     ),                                 ),                                 on_error: Raise,                                 validator: Literal(                                     LiteralValidator {                                         lookup: LiteralLookup {                                             expected_bool: None,                                             expected_int: None,                                             expected_str: Some(                                                 {                                                     "volume": 0,                                                 },                                             ),                                             expected_py: None,                                             values: [                                                 Py(                                                     0x00007ffffdc0c230,                                                 ),                                             ],                                         },                                         expected_repr: "'volume'",                                         name: "literal['volume']",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[literal['volume']]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "volume",                 extra_behavior: Ignore,                 extras_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,             },         ),         class: Py(             0x0000555556fe9210,         ),         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         name: "volume",     }, ), definitions=[])[source]
__repr__()[source]

Return repr(self).

Return type:

str

__repr_args__()[source]
__repr_name__()[source]

Name of the instance’s class, used in __repr__.

Return type:

str

__repr_str__(join_str)[source]
Return type:

str

__rich_repr__()[source]

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

__setattr__(name, value)[source]

Implement setattr(self, name, value).

Return type:

None

__setstate__(state)[source]
Return type:

None

__signature__: ClassVar[Signature] = <Signature (*, entity_ids: List[str], output_unit: kittycad.models.unit_volume.UnitVolume, source_unit: kittycad.models.unit_length.UnitLength, type: Literal['volume'] = 'volume') -> None>[source]
__slots__ = ('__dict__', '__pydantic_fields_set__', '__pydantic_extra__', '__pydantic_private__')[source]
__str__()[source]

Return str(self).

Return type:

str

_abc_impl = <_abc._abc_data object>[source]
_calculate_keys(*args, **kwargs)[source]
Return type:

Any

_check_frozen(name, value)[source]
Return type:

None

_copy_and_set_values(*args, **kwargs)[source]
Return type:

Any

classmethod _get_value(cls, *args, **kwargs)[source]
Return type:

Any

_iter(*args, **kwargs)[source]
Return type:

Any

classmethod construct(cls, _fields_set=None, **values)[source]
Return type:

Model

copy(*, include=None, exclude=None, update=None, deep=False)[source]

Returns a copy of the model.

!!! warning “Deprecated”

This method is now deprecated; use model_copy instead.

If you need include or exclude, use:

`py data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `

Parameters:
  • include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.

  • exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.

  • update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.

  • deep (bool) – If True, the values of fields that are Pydantic models will be deep copied.

Return type:

Model

Returns:

A copy of the model with included, excluded and updated fields as specified.

dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)[source]
Return type:

Dict[str, Any]

entity_ids: List[str][source]
classmethod from_orm(cls, obj)[source]
Return type:

Model

json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)[source]
Return type:

str

property model_computed_fields: dict[str, ComputedFieldInfo][source]

Get the computed fields of this model instance.

Returns:

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}[source]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod model_construct(_fields_set=None, **values)[source]

Creates a new instance of the Model class with validated data.

Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

Parameters:
  • _fields_set (set[str] | None) – The set of field names accepted for the Model instance.

  • values (Any) – Trusted or pre-validated data dictionary.

Return type:

Model

Returns:

A new instance of the Model class with validated data.

model_copy(*, update=None, deep=False)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

Returns a copy of the model.

Parameters:
  • update (dict[str, Any] | None) – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.

  • deep (bool) – Set to True to make a deep copy of the model.

Return type:

Model

Returns:

New model instance.

model_dump(*, mode='python', include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Parameters:
  • mode – The mode in which to_python should run. If mode is ‘json’, the dictionary will only contain JSON serializable types. If mode is ‘python’, the dictionary may contain any Python objects.

  • include – A list of fields to include in the output.

  • exclude – A list of fields to exclude from the output.

  • by_alias – Whether to use the field’s alias in the dictionary key if defined.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that are set to their default value from the output.

  • exclude_none – Whether to exclude fields that have a value of None from the output.

  • round_trip – Whether to enable serialization and deserialization round-trip support.

  • warnings – Whether to log warnings when invalid fields are encountered.

Returns:

A dictionary representation of the model.

model_dump_json(*, indent=None, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic’s to_json method.

Parameters:
  • indent – Indentation to use in the JSON output. If None is passed, the output will be compact.

  • include – Field(s) to include in the JSON output. Can take either a string or set of strings.

  • exclude – Field(s) to exclude from the JSON output. Can take either a string or set of strings.

  • by_alias – Whether to serialize using field aliases.

  • exclude_unset – Whether to exclude fields that have not been explicitly set.

  • exclude_defaults – Whether to exclude fields that have the default value.

  • exclude_none – Whether to exclude fields that have a value of None.

  • round_trip – Whether to use serialization/deserialization between JSON and class instance.

  • warnings – Whether to show any warnings that occurred during serialization.

Returns:

A JSON string representation of the model.

property model_extra[source]

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[dict[str, FieldInfo]] = {'entity_ids': FieldInfo(annotation=List[str], required=True), 'output_unit': FieldInfo(annotation=UnitVolume, required=True), 'source_unit': FieldInfo(annotation=UnitLength, required=True), 'type': FieldInfo(annotation=Literal['volume'], required=False, default='volume')}[source]

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property model_fields_set: set[str][source]

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')[source]

Generates a JSON schema for a model class.

Parameters:
  • by_alias (bool) – Whether to use attribute aliases or not.

  • ref_template (str) – The reference template.

  • schema_generator (type[GenerateJsonSchema]) – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications

  • mode (Literal['validation', 'serialization']) – The mode in which to generate the schema.

Return type:

dict[str, Any]

Returns:

The JSON schema for the given model class.

classmethod model_parametrized_name(params)[source]

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Parameters:

params (tuple[type[Any], ...]) – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.

Return type:

str

Returns:

String representing the new class where params are passed to cls as type variables.

Raises:

TypeError – Raised when trying to generate concrete names for non-generic models.

model_post_init(_BaseModel__context)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

Return type:

None

classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)[source]

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.

Parameters:
  • force – Whether to force the rebuilding of the model schema, defaults to False.

  • raise_errors – Whether to raise errors, defaults to True.

  • _parent_namespace_depth – The depth level of the parent namespace, defaults to 2.

  • _types_namespace – The types namespace, defaults to None.

Returns:

Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.

classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)[source]

Validate a pydantic model instance.

Parameters:
  • obj (Any) – The object to validate.

  • strict (bool | None) – Whether to raise an exception on invalid fields.

  • from_attributes (bool | None) – Whether to extract data from object attributes.

  • context (dict[str, Any] | None) – Additional context to pass to the validator.

Raises:

ValidationError – If the object could not be validated.

Return type:

Model

Returns:

The validated model instance.

classmethod model_validate_json(json_data, *, strict=None, context=None)[source]

Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Parameters:
  • json_data (str | bytes | bytearray) – The JSON data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

Raises:

ValueError – If json_data is not a JSON string.

classmethod model_validate_strings(obj, *, strict=None, context=None)[source]

Validate the given object contains string data against the Pydantic model.

Parameters:
  • obj (Any) – The object contains string data to validate.

  • strict (bool | None) – Whether to enforce types strictly.

  • context (dict[str, Any] | None) – Extra variables to pass to the validator.

Return type:

Model

Returns:

The validated Pydantic model.

output_unit: UnitVolume[source]
classmethod parse_file(cls, path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod parse_obj(cls, obj)[source]
Return type:

Model

classmethod parse_raw(cls, b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)[source]
Return type:

Model

classmethod schema(cls, by_alias=True, ref_template='#/$defs/{model}')[source]
Return type:

Dict[str, Any]

classmethod schema_json(cls, *, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)[source]
Return type:

str

source_unit: UnitLength[source]
type: Literal['volume'][source]
classmethod update_forward_refs(cls, **localns)[source]
Return type:

None

classmethod validate(cls, value)[source]
Return type:

Model