kittycad.api.modeling.modeling_commands_ws
Functions
|
Pass those commands to the engine via websocket, and pass responses back to the client. |
|
Pass those commands to the engine via websocket, and pass responses back to the client. |
Classes
|
A websocket connection to the API endpoint. |
- class kittycad.api.modeling.modeling_commands_ws.WebSocket(fps, post_effect, show_grid, unlocked_framerate, video_res_height, video_res_width, webrtc, client, pool=None, replay=None)[source][source]
A websocket connection to the API endpoint.
- __dict__ = mappingproxy({'__module__': 'kittycad.api.modeling.modeling_commands_ws', '__annotations__': {'ws': <class 'websockets.sync.client.ClientConnection'>}, '__doc__': 'A websocket connection to the API endpoint.', '__init__': <function WebSocket.__init__>, '__enter__': <function WebSocket.__enter__>, '__exit__': <function WebSocket.__exit__>, '__iter__': <function WebSocket.__iter__>, 'send': <function WebSocket.send>, 'send_binary': <function WebSocket.send_binary>, 'recv': <function WebSocket.recv>, 'close': <function WebSocket.close>, '__dict__': <attribute '__dict__' of 'WebSocket' objects>, '__weakref__': <attribute '__weakref__' of 'WebSocket' objects>})[source]
- __init__(fps, post_effect, show_grid, unlocked_framerate, video_res_height, video_res_width, webrtc, client, pool=None, replay=None)[source][source]
- __iter__()[source][source]
Iterate on incoming messages.
The iterator calls
recv()
and yields messages in an infinite loop.It exits when the connection is closed normally. It raises a
ConnectionClosedError
exception after a protocol error or a network failure.- Return type:
Iterator
[RootModel[Union[SuccessWebSocketResponse, FailureWebSocketResponse]]
]
- kittycad.api.modeling.modeling_commands_ws._get_kwargs(fps, post_effect, show_grid, unlocked_framerate, video_res_height, video_res_width, webrtc, *, client, pool=None, replay=None)[source][source]
- async kittycad.api.modeling.modeling_commands_ws.asyncio(fps, post_effect, show_grid, unlocked_framerate, video_res_height, video_res_width, webrtc, *, client, pool=None, replay=None)[source][source]
Pass those commands to the engine via websocket, and pass responses back to the client. Basically, this is a websocket proxy between the frontend/client and the engine.
- Return type:
ClientConnection
- kittycad.api.modeling.modeling_commands_ws.sync(fps, post_effect, show_grid, unlocked_framerate, video_res_height, video_res_width, webrtc, *, client, pool=None, replay=None)[source][source]
Pass those commands to the engine via websocket, and pass responses back to the client. Basically, this is a websocket proxy between the frontend/client and the engine.
- Return type:
ClientConnection