diff --git a/generate/generate.py b/generate/generate.py index c03c6fdef..bed78ce52 100755 --- a/generate/generate.py +++ b/generate/generate.py @@ -269,7 +269,11 @@ def generateTypeAndExamplePython( ) = generateTypeAndExamplePython("", prop, data, None) example_imports = example_imports + prop_imports parameter_example = parameter_example + ( - "\n" + property_name + "=" + prop_example + ",\n" + "\n" + + clean_parameter_name(property_name) + + "=" + + prop_example + + ",\n" ) parameter_example = parameter_example + ")" @@ -298,6 +302,8 @@ def generateTypeAndExamplePython( break return generateTypeAndExamplePython(name, schema["oneOf"][0], data, None) + elif "allOf" in schema and len(schema["allOf"]) == 1: + return generateTypeAndExamplePython(name, schema["allOf"][0], data, None) elif "$ref" in schema: parameter_type = schema["$ref"].replace("#/components/schemas/", "") # Get the schema for the reference. @@ -381,14 +387,17 @@ from kittycad.types import Response if "nullable" in parameter["schema"] and parameter["schema"]["nullable"]: parameter_type = "Optional[" + parameter_type + "]" optional_args.append( - camel_to_snake(parameter_name) + clean_parameter_name(parameter_name) + "= None, # " + parameter_type + "\n" ) else: params_str += ( - camel_to_snake(parameter_name) + "=" + parameter_example + ",\n" + clean_parameter_name(parameter_name) + + "=" + + parameter_example + + ",\n" ) for optional_arg in optional_args: @@ -429,7 +438,9 @@ from kittycad.types import Response + endpoint_ref.replace("List[", "").replace("]", "") + "\n" ) - example_imports = example_imports + "from typing import Union, Any, Optional\n" + example_imports = ( + example_imports + "from typing import Union, Any, Optional, List\n" + ) example_variable = "result: " + response_type + " = " example_imports = example_imports + "from kittycad.types import Response\n" @@ -638,7 +649,7 @@ async def test_""" formatTemplate = ( formatTemplate + ", " - + parameter_name + + clean_parameter_name(parameter_name) + "=" + camel_to_snake(parameter_name) ) @@ -894,7 +905,7 @@ async def test_""" f.write("\tkwargs = _get_kwargs(\n") params = get_function_parameters(endpoint, request_body_type) for param in params: - f.write("\t\t" + param + "=" + param + ",\n") + f.write("\t\t" + clean_parameter_name(param) + "=" + param + ",\n") f.write("\t\tclient=client,\n") f.write("\t)\n") f.write("\n") @@ -973,7 +984,7 @@ async def test_""" f.write("\treturn sync_detailed(\n") params = get_function_parameters(endpoint, request_body_type) for param in params: - f.write("\t\t" + param + "=" + param + ",\n") + f.write("\t\t" + clean_parameter_name(param) + "=" + param + ",\n") f.write("\t\tclient=client,\n") f.write("\t).parsed\n") @@ -1042,7 +1053,7 @@ async def test_""" f.write("\tkwargs = _get_kwargs(\n") params = get_function_parameters(endpoint, request_body_type) for param in params: - f.write("\t\t" + param + "=" + param + ",\n") + f.write("\t\t" + clean_parameter_name(param) + "=" + param + ",\n") f.write("\t\tclient=client,\n") f.write("\t)\n") f.write("\n") @@ -1120,7 +1131,7 @@ async def test_""" f.write("\t\tawait asyncio_detailed(\n") params = get_function_parameters(endpoint, request_body_type) for param in params: - f.write("\t\t" + param + "=" + param + ",\n") + f.write("\t\t" + clean_parameter_name(param) + "=" + param + ",\n") f.write("\t\t\tclient=client,\n") f.write("\t\t)\n") f.write("\t).parsed\n") @@ -1439,8 +1450,14 @@ def generateObjectTypeCode(name: str, schema: dict, type_name: str, data: dict) # Iternate over the properties. for property_name in schema["properties"]: # Write the property. - f.write("\t\tif " + property_name + " is not UNSET:\n") - f.write("\t\t\tfield_dict['" + property_name + "'] = " + property_name + "\n") + f.write("\t\tif " + clean_parameter_name(property_name) + " is not UNSET:\n") + f.write( + "\t\t\tfield_dict['" + + property_name + + "'] = " + + clean_parameter_name(property_name) + + "\n" + ) f.write("\n") f.write("\t\treturn field_dict\n") @@ -1468,7 +1485,13 @@ def generateObjectTypeCode(name: str, schema: dict, type_name: str, data: dict) # Iternate over the properties. for property_name in schema["properties"]: # Write the property. - f.write("\t\t\t" + property_name + "= " + property_name + ",\n") + f.write( + "\t\t\t" + + clean_parameter_name(property_name) + + "= " + + clean_parameter_name(property_name) + + ",\n" + ) # Close the class. f.write("\t\t)\n") @@ -1531,25 +1554,51 @@ def renderTypeToDict(f, property_name: str, property_schema: dict, data: dict): ): f.write("\t\t" + property_name + ": Union[Unset, str] = UNSET\n") f.write( - "\t\tif not isinstance(self." + property_name + ", Unset):\n" + "\t\tif not isinstance(self." + + clean_parameter_name(property_name) + + ", Unset):\n" ) f.write( "\t\t\t" - + property_name + + clean_parameter_name(property_name) + " = self." - + property_name + + clean_parameter_name(property_name) + ".isoformat()\n" ) # return early return - f.write("\t\t" + property_name + " = self." + property_name + "\n") + f.write( + "\t\t" + + clean_parameter_name(property_name) + + " = self." + + clean_parameter_name(property_name) + + "\n" + ) elif property_type == "integer": - f.write("\t\t" + property_name + " = self." + property_name + "\n") + f.write( + "\t\t" + + clean_parameter_name(property_name) + + " = self." + + clean_parameter_name(property_name) + + "\n" + ) elif property_type == "number": - f.write("\t\t" + property_name + " = self." + property_name + "\n") + f.write( + "\t\t" + + clean_parameter_name(property_name) + + " = self." + + clean_parameter_name(property_name) + + "\n" + ) elif property_type == "boolean": - f.write("\t\t" + property_name + " = self." + property_name + "\n") + f.write( + "\t\t" + + clean_parameter_name(property_name) + + " = self." + + clean_parameter_name(property_name) + + "\n" + ) elif property_type == "array": if "items" in property_schema: if "$ref" in property_schema["items"]: @@ -1594,14 +1643,40 @@ def renderTypeToDict(f, property_name: str, property_schema: dict, data: dict): + property_type + "]] = UNSET\n" ) - f.write("\t\tif not isinstance(self." + property_name + ", Unset):\n") - f.write("\t\t\t" + property_name + " = self." + property_name + "\n") + f.write( + "\t\tif not isinstance(self." + + clean_parameter_name(property_name) + + ", Unset):\n" + ) + f.write( + "\t\t\t" + + clean_parameter_name(property_name) + + " = self." + + clean_parameter_name(property_name) + + "\n" + ) else: - f.write("\t\t" + property_name + " = self." + property_name + "\n") + f.write( + "\t\t" + + clean_parameter_name(property_name) + + " = self." + + clean_parameter_name(property_name) + + "\n" + ) elif "$ref" in property_schema: ref = property_schema["$ref"].replace("#/components/schemas/", "") - f.write("\t\tif not isinstance(self." + property_name + ", Unset):\n") - f.write("\t\t\t" + property_name + " = self." + property_name + "\n") + f.write( + "\t\tif not isinstance(self." + + clean_parameter_name(property_name) + + ", Unset):\n" + ) + f.write( + "\t\t\t" + + clean_parameter_name(property_name) + + " = self." + + clean_parameter_name(property_name) + + "\n" + ) elif "allOf" in property_schema: thing = property_schema["allOf"][0] if "$ref" in thing: @@ -1610,15 +1685,32 @@ def renderTypeToDict(f, property_name: str, property_schema: dict, data: dict): return renderTypeToDict( f, property_name, data["components"]["schemas"][ref], data ) - f.write("\t\tif not isinstance(self." + property_name + ", Unset):\n") - f.write("\t\t\t" + property_name + " = self." + property_name + "\n") + f.write( + "\t\tif not isinstance(self." + + clean_parameter_name(property_name) + + ", Unset):\n" + ) + f.write( + "\t\t\t" + + clean_parameter_name(property_name) + + " = self." + + clean_parameter_name(property_name) + + "\n" + ) else: raise Exception("unknown allOf type: ", property_schema) else: - f.write("\t\t" + property_name + " = self." + property_name + "\n") + f.write( + "\t\t" + + clean_parameter_name(property_name) + + " = self." + + clean_parameter_name(property_name) + + "\n" + ) def renderTypeInit(f, property_name: str, property_schema: dict, data: dict): + property_name = clean_parameter_name(property_name) if "type" in property_schema: property_type = property_schema["type"] @@ -1726,22 +1818,30 @@ def renderTypeFromDict(f, property_name: str, property_schema: dict, data: dict) ): f.write( "\t\t_" - + property_name + + clean_parameter_name(property_name) + ' = d.pop("' + property_name + '", UNSET)\n' ) f.write( - "\t\t" + property_name + ": Union[Unset, datetime.datetime]\n" + "\t\t" + + clean_parameter_name(property_name) + + ": Union[Unset, datetime.datetime]\n" + ) + f.write( + "\t\tif isinstance(_" + + clean_parameter_name(property_name) + + ", Unset):\n" + ) + f.write( + "\t\t\t" + clean_parameter_name(property_name) + " = UNSET\n" ) - f.write("\t\tif isinstance(_" + property_name + ", Unset):\n") - f.write("\t\t\t" + property_name + " = UNSET\n") f.write("\t\telse:\n") f.write( "\t\t\t" - + property_name + + clean_parameter_name(property_name) + " = isoparse(_" - + property_name + + clean_parameter_name(property_name) + ")\n" ) f.write("\n") @@ -1749,22 +1849,38 @@ def renderTypeFromDict(f, property_name: str, property_schema: dict, data: dict) return f.write( - "\t\t" + property_name + ' = d.pop("' + property_name + '", UNSET)\n' + "\t\t" + + clean_parameter_name(property_name) + + ' = d.pop("' + + property_name + + '", UNSET)\n' ) f.write("\n") elif property_type == "integer": f.write( - "\t\t" + property_name + ' = d.pop("' + property_name + '", UNSET)\n' + "\t\t" + + clean_parameter_name(property_name) + + ' = d.pop("' + + property_name + + '", UNSET)\n' ) f.write("\n") elif property_type == "number": f.write( - "\t\t" + property_name + ' = d.pop("' + property_name + '", UNSET)\n' + "\t\t" + + clean_parameter_name(property_name) + + ' = d.pop("' + + property_name + + '", UNSET)\n' ) f.write("\n") elif property_type == "boolean": f.write( - "\t\t" + property_name + ' = d.pop("' + property_name + '", UNSET)\n' + "\t\t" + + clean_parameter_name(property_name) + + ' = d.pop("' + + property_name + + '", UNSET)\n' ) f.write("\n") elif property_type == "array": @@ -1808,7 +1924,7 @@ def renderTypeFromDict(f, property_name: str, property_schema: dict, data: dict) f.write( "\t\t" - + property_name + + clean_parameter_name(property_name) + " = cast(List[" + property_type + '], d.pop("' @@ -1818,62 +1934,70 @@ def renderTypeFromDict(f, property_name: str, property_schema: dict, data: dict) f.write("\n") else: f.write( - "\t\t" + property_name + ' = d.pop("' + property_name + '", UNSET)\n' + "\t\t" + + clean_parameter_name(property_name) + + ' = d.pop("' + + property_name + + '", UNSET)\n' ) elif "$ref" in property_schema: ref = property_schema["$ref"].replace("#/components/schemas/", "") # Get the type for the reference. ref_schema = data["components"]["schemas"][ref] - f.write("\t\t_" + property_name + ' = d.pop("' + property_name + '", UNSET)\n') - f.write("\t\t" + property_name + ": Union[Unset, " + ref + "]\n") - f.write("\t\tif isinstance(_" + property_name + ", Unset):\n") - f.write("\t\t\t" + property_name + " = UNSET\n") + f.write( + "\t\t_" + + clean_parameter_name(property_name) + + ' = d.pop("' + + property_name + + '", UNSET)\n' + ) + f.write( + "\t\t" + + clean_parameter_name(property_name) + + ": Union[Unset, " + + ref + + "]\n" + ) + f.write( + "\t\tif isinstance(_" + clean_parameter_name(property_name) + ", Unset):\n" + ) + f.write("\t\t\t" + clean_parameter_name(property_name) + " = UNSET\n") f.write("\t\telse:\n") - nested_objects = False - if "oneOf" in ref_schema and len(ref_schema["oneOf"]) > 0: - # Check if the nested_object is a object. - for one_of in ref_schema["oneOf"]: - if "type" in one_of and one_of["type"] == "object": - nested_objects = True - break - if nested_objects: + if isNestedObjectOneOf(ref_schema): f.write( "\t\t\t" - + property_name + + clean_parameter_name(property_name) + " = _" - + property_name + + clean_parameter_name(property_name) + " # type: ignore[arg-type]\n" ) else: f.write( - "\t\t\t" + property_name + " = " + ref + "(_" + property_name + ")\n" + "\t\t\t" + + clean_parameter_name(property_name) + + " = " + + ref + + "(_" + + clean_parameter_name(property_name) + + ")\n" ) f.write("\n") elif "allOf" in property_schema: + if len(property_schema["allOf"]) != 1: + print(property_schema) + raise Exception("Unknown allOf") thing = property_schema["allOf"][0] - if "$ref" in thing: - ref = thing["$ref"].replace("#/components/schemas/", "") - if ref == "Uuid": - return renderTypeFromDict( - f, property_name, data["components"]["schemas"][ref], data - ) - f.write( - "\t\t_" + property_name + ' = d.pop("' + property_name + '", UNSET)\n' - ) - f.write("\t\t" + property_name + ": Union[Unset, " + ref + "]\n") - f.write("\t\tif isinstance(_" + property_name + ", Unset):\n") - f.write("\t\t\t" + property_name + " = UNSET\n") - f.write("\t\telse:\n") - f.write( - "\t\t\t" + property_name + " = " + ref + "(_" + property_name + ")\n" - ) - f.write("\n") - else: - raise Exception("unknown allOf type: ", property_schema) + renderTypeFromDict(f, property_name, thing, data) else: - f.write("\t\t" + property_name + ' = d.pop("' + property_name + '", UNSET)\n') + f.write( + "\t\t" + + clean_parameter_name(property_name) + + ' = d.pop("' + + property_name + + '", UNSET)\n' + ) def hasDateTime(schema: dict) -> bool: @@ -2089,6 +2213,10 @@ def to_camel_case(s: str): return "".join([s[0].lower(), s[1:]]) +def clean_parameter_name(name: str): + return camel_to_snake(name).replace("from", "from_") + + def camel_to_snake(name: str): name = re.sub("(.)([A-Z][a-z]+)", r"\1_\2", name) return re.sub("([a-z0-9])([A-Z])", r"\1_\2", name).lower().replace("-", "_") diff --git a/kittycad.py.patch.json b/kittycad.py.patch.json index 207df5a7c..883fd134c 100644 --- a/kittycad.py.patch.json +++ b/kittycad.py.patch.json @@ -1 +1 @@ -[{"op": "add", "path": "/info/x-python", "value": {"client": "# Create a client with your token.\nfrom kittycad import Client\n\nclient = Client(token=\"$TOKEN\")\n\n# - OR -\n\n# Create a new client with your token parsed from the environment variable:\n# `KITTYCAD_API_TOKEN`.\nfrom kittycad import ClientFromEnv\n\nclient = ClientFromEnv()\n\n# NOTE: The python library additionally implements asyncio, however all the code samples we\n# show below use the sync functions for ease of use and understanding.\n# Check out the library docs at:\n# https://python.api.docs.kittycad.io/_autosummary/kittycad.api.html#module-kittycad.api\n# for more details.", "install": "pip install kittycad"}}, {"op": "add", "path": "/paths/~1constant~1physics~1{constant}/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.constant import get_physics_constant\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, PhysicsConstant\nfrom kittycad.models.physics_constant_name import PhysicsConstantName\nfrom kittycad.types import Response\n\n\ndef example_get_physics_constant():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[PhysicsConstant, Error]] = get_physics_constant.sync(\n client=client,\n constant=PhysicsConstantName.PI,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: PhysicsConstant = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.constant.get_physics_constant.html"}}, {"op": "add", "path": "/paths/~1file~1density/post/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.file import create_file_density\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileDensity\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.types import Response\n\n\ndef example_create_file_density():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileDensity, Error]] = create_file_density.sync(\n client=client,\n material_mass=3.14,\n src_format=FileImportFormat.DAE,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileDensity = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_density.html"}}, {"op": "add", "path": "/paths/~1async~1operations/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.api_calls import list_async_operations\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AsyncApiCallResultsPage, Error\nfrom kittycad.models.api_call_status import ApiCallStatus\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_async_operations():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[AsyncApiCallResultsPage, Error]\n ] = list_async_operations.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n status=ApiCallStatus.QUEUED,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AsyncApiCallResultsPage = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_async_operations.html"}}, {"op": "add", "path": "/paths/~1file~1surface-area/post/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.file import create_file_surface_area\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileSurfaceArea\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.types import Response\n\n\ndef example_create_file_surface_area():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[FileSurfaceArea, Error]\n ] = create_file_surface_area.sync(\n client=client,\n src_format=FileImportFormat.DAE,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileSurfaceArea = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_surface_area.html"}}, {"op": "add", "path": "/paths/~1user~1api-tokens~1{token}/delete/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.api_tokens import delete_api_token_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_api_token_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_api_token_for_user.sync(\n client=client,\n token=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.delete_api_token_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1api-tokens~1{token}/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.api_tokens import get_api_token_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiToken, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_token_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiToken, Error]] = get_api_token_for_user.sync(\n client=client,\n token=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiToken = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.get_api_token_for_user.html"}}, {"op": "add", "path": "/paths/~1file~1conversion~1{src_format}~1{output_format}/post/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.file import (\n create_file_conversion,\n create_file_conversion_with_base64_helper,\n)\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileConversion\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.types import Response\n\n\ndef example_create_file_conversion_with_base64_helper():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[FileConversion, Error]\n ] = create_file_conversion_with_base64_helper.sync(\n client=client,\n output_format=FileExportFormat.DAE,\n src_format=FileImportFormat.DAE,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_conversion_with_base64_helper.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1metric~1cubed~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.unit import get_metric_power_cubed_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitMetricPowerCubedConversion\nfrom kittycad.models.unit_metric_power import UnitMetricPower\nfrom kittycad.types import Response\n\n\ndef example_get_metric_power_cubed_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitMetricPowerCubedConversion, Error]\n ] = get_metric_power_cubed_unit_conversion.sync(\n client=client,\n output_format=UnitMetricPower.ATTO,\n src_format=UnitMetricPower.ATTO,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitMetricPowerCubedConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_metric_power_cubed_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1density~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.unit import get_density_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitDensityConversion\nfrom kittycad.models.unit_density_format import UnitDensityFormat\nfrom kittycad.types import Response\n\n\ndef example_get_density_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitDensityConversion, Error]\n ] = get_density_unit_conversion.sync(\n client=client,\n output_format=UnitDensityFormat.KILOGRAMS_PER_CUBIC_METER,\n src_format=UnitDensityFormat.KILOGRAMS_PER_CUBIC_METER,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitDensityConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_density_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1acceleration~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.unit import get_acceleration_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitAccelerationConversion\nfrom kittycad.models.unit_acceleration_format import UnitAccelerationFormat\nfrom kittycad.types import Response\n\n\ndef example_get_acceleration_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitAccelerationConversion, Error]\n ] = get_acceleration_unit_conversion.sync(\n client=client,\n output_format=UnitAccelerationFormat.METERS_PER_SECOND_SQUARED,\n src_format=UnitAccelerationFormat.METERS_PER_SECOND_SQUARED,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitAccelerationConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_acceleration_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1mass~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.unit import get_mass_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitMassConversion\nfrom kittycad.models.unit_mass_format import UnitMassFormat\nfrom kittycad.types import Response\n\n\ndef example_get_mass_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitMassConversion, Error]\n ] = get_mass_unit_conversion.sync(\n client=client,\n output_format=UnitMassFormat.GRAM,\n src_format=UnitMassFormat.GRAM,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitMassConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_mass_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1charge~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.unit import get_charge_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitChargeConversion\nfrom kittycad.models.unit_charge_format import UnitChargeFormat\nfrom kittycad.types import Response\n\n\ndef example_get_charge_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitChargeConversion, Error]\n ] = get_charge_unit_conversion.sync(\n client=client,\n output_format=UnitChargeFormat.COULOMB,\n src_format=UnitChargeFormat.COULOMB,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitChargeConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_charge_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1user/delete/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.users import delete_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_user_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.delete_user_self.html"}}, {"op": "add", "path": "/paths/~1user/put/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.users import update_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.models.update_user import UpdateUser\nfrom kittycad.types import Response\n\n\ndef example_update_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = update_user_self.sync(\n client=client,\n body=UpdateUser(\n company=\"\",\n discord=\"\",\n first_name=\"\",\n github=\"\",\n last_name=\"\",\n phone=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.update_user_self.html"}}, {"op": "add", "path": "/paths/~1user/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.users import get_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.types import Response\n\n\ndef example_get_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = get_user_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_self.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1magnetic-flux~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.unit import get_magnetic_flux_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitMagneticFluxConversion\nfrom kittycad.models.unit_magnetic_flux_format import UnitMagneticFluxFormat\nfrom kittycad.types import Response\n\n\ndef example_get_magnetic_flux_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitMagneticFluxConversion, Error]\n ] = get_magnetic_flux_unit_conversion.sync(\n client=client,\n output_format=UnitMagneticFluxFormat.WEBER,\n src_format=UnitMagneticFluxFormat.WEBER,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitMagneticFluxConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_magnetic_flux_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1file~1volume/post/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.file import create_file_volume\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileVolume\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.types import Response\n\n\ndef example_create_file_volume():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileVolume, Error]] = create_file_volume.sync(\n client=client,\n src_format=FileImportFormat.DAE,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileVolume = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_volume.html"}}, {"op": "add", "path": "/paths/~1api-calls/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.api_calls import list_api_calls\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_calls():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = list_api_calls.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_api_calls.html"}}, {"op": "add", "path": "/paths/~1file~1mass/post/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.file import create_file_mass\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileMass\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.types import Response\n\n\ndef example_create_file_mass():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileMass, Error]] = create_file_mass.sync(\n client=client,\n material_density=3.14,\n src_format=FileImportFormat.DAE,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileMass = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_mass.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1magnetic-field-strength~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.unit import get_magnetic_field_strength_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitMagneticFieldStrengthConversion\nfrom kittycad.models.unit_magnetic_field_strength_format import (\n UnitMagneticFieldStrengthFormat,\n)\nfrom kittycad.types import Response\n\n\ndef example_get_magnetic_field_strength_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitMagneticFieldStrengthConversion, Error]\n ] = get_magnetic_field_strength_unit_conversion.sync(\n client=client,\n output_format=UnitMagneticFieldStrengthFormat.TESLA,\n src_format=UnitMagneticFieldStrengthFormat.TESLA,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitMagneticFieldStrengthConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_magnetic_field_strength_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1file~1execute~1{lang}/post/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.executor import create_file_execution\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import CodeOutput, Error\nfrom kittycad.models.code_language import CodeLanguage\nfrom kittycad.types import Response\n\n\ndef example_create_file_execution():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[CodeOutput, Error]] = create_file_execution.sync(\n client=client,\n lang=CodeLanguage.GO,\n output=None, # Optional[str]\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: CodeOutput = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.executor.create_file_execution.html"}}, {"op": "add", "path": "/paths/~1user~1payment~1intent/post/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.payments import create_payment_intent_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, PaymentIntent\nfrom kittycad.types import Response\n\n\ndef example_create_payment_intent_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[PaymentIntent, Error]\n ] = create_payment_intent_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: PaymentIntent = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.create_payment_intent_for_user.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1angle~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.unit import get_angle_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitAngleConversion\nfrom kittycad.models.unit_angle_format import UnitAngleFormat\nfrom kittycad.types import Response\n\n\ndef example_get_angle_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitAngleConversion, Error]\n ] = get_angle_unit_conversion.sync(\n client=client,\n output_format=UnitAngleFormat.RADIAN,\n src_format=UnitAngleFormat.RADIAN,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitAngleConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_angle_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1user~1payment~1methods~1{id}/delete/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.payments import delete_payment_method_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_payment_method_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_payment_method_for_user.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.delete_payment_method_for_user.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1time~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.unit import get_time_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitTimeConversion\nfrom kittycad.models.unit_time_format import UnitTimeFormat\nfrom kittycad.types import Response\n\n\ndef example_get_time_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitTimeConversion, Error]\n ] = get_time_unit_conversion.sync(\n client=client,\n output_format=UnitTimeFormat.SECOND,\n src_format=UnitTimeFormat.SECOND,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitTimeConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_time_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1apps~1github~1callback/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.apps import apps_github_callback\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_apps_github_callback():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = apps_github_callback.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.apps.apps_github_callback.html"}}, {"op": "add", "path": "/paths/~1users~1{id}~1api-calls/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.api_calls import list_api_calls_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_calls_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = list_api_calls_for_user.sync(\n client=client,\n id=\"\",\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_api_calls_for_user.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1radioactivity~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.unit import get_radioactivity_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitRadioactivityConversion\nfrom kittycad.models.unit_radioactivity_format import UnitRadioactivityFormat\nfrom kittycad.types import Response\n\n\ndef example_get_radioactivity_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitRadioactivityConversion, Error]\n ] = get_radioactivity_unit_conversion.sync(\n client=client,\n output_format=UnitRadioactivityFormat.BECQUEREL,\n src_format=UnitRadioactivityFormat.BECQUEREL,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitRadioactivityConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_radioactivity_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1pressure~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.unit import get_pressure_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitPressureConversion\nfrom kittycad.models.unit_pressure_format import UnitPressureFormat\nfrom kittycad.types import Response\n\n\ndef example_get_pressure_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitPressureConversion, Error]\n ] = get_pressure_unit_conversion.sync(\n client=client,\n output_format=UnitPressureFormat.PASCAL,\n src_format=UnitPressureFormat.PASCAL,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitPressureConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_pressure_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1logout/post/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.hidden import logout\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_logout():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = logout.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.logout.html"}}, {"op": "add", "path": "/paths/~1api-call-metrics/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.api_calls import get_api_call_metrics\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallQueryGroup, Error\nfrom kittycad.models.api_call_query_group_by import ApiCallQueryGroupBy\nfrom kittycad.types import Response\n\n\ndef example_get_api_call_metrics():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[List[ApiCallQueryGroup], Error]\n ] = get_api_call_metrics.sync(\n client=client,\n group_by=ApiCallQueryGroupBy.EMAIL,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[ApiCallQueryGroup] = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call_metrics.html"}}, {"op": "add", "path": "/paths/~1drawing~1cmd/post/x-python", "value": {"example": "from typing import List\n\nfrom kittycad.api.drawing import cmd\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models.drawing_cmd import DrawCircle\nfrom kittycad.models.drawing_cmd_id import DrawingCmdId\nfrom kittycad.models.drawing_cmd_req import DrawingCmdReq\nfrom kittycad.types import Response\n\n\ndef example_cmd():\n # Create our client.\n client = ClientFromEnv()\n\n cmd.sync(\n client=client,\n body=DrawingCmdReq(\n cmd=DrawCircle(\n center=[\n 3.14,\n 3.14,\n ],\n radius=3.14,\n ),\n cmd_id=DrawingCmdId(\"\"),\n file_id=\"\",\n ),\n )\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.drawing.cmd.html"}}, {"op": "add", "path": "/paths/~1.well-known~1ai-plugin.json/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.meta import get_ai_plugin_manifest\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AiPluginManifest, Error\nfrom kittycad.types import Response\n\n\ndef example_get_ai_plugin_manifest():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[AiPluginManifest, Error]\n ] = get_ai_plugin_manifest.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AiPluginManifest = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_ai_plugin_manifest.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1data~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.unit import get_data_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitDataConversion\nfrom kittycad.models.unit_data_format import UnitDataFormat\nfrom kittycad.types import Response\n\n\ndef example_get_data_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitDataConversion, Error]\n ] = get_data_unit_conversion.sync(\n client=client,\n output_format=UnitDataFormat.BYTE,\n src_format=UnitDataFormat.BYTE,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitDataConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_data_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1user~1session~1{token}/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.users import get_session_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Session\nfrom kittycad.types import Response\n\n\ndef example_get_session_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Session, Error]] = get_session_for_user.sync(\n client=client,\n token=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Session = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_session_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1api-calls~1{id}/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.api_calls import get_api_call_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPrice, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_call_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiCallWithPrice, Error]] = get_api_call_for_user.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPrice = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call_for_user.html"}}, {"op": "add", "path": "/paths/~1apps~1github~1consent/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.apps import apps_github_consent\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AppClientInfo, Error\nfrom kittycad.types import Response\n\n\ndef example_apps_github_consent():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[AppClientInfo, Error]] = apps_github_consent.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AppClientInfo = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.apps.apps_github_consent.html"}}, {"op": "add", "path": "/paths/~1auth~1email/post/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.hidden import auth_email\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, VerificationToken\nfrom kittycad.models.email_authentication_form import EmailAuthenticationForm\nfrom kittycad.types import Response\n\n\ndef example_auth_email():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[VerificationToken, Error]] = auth_email.sync(\n client=client,\n body=EmailAuthenticationForm(\n email=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: VerificationToken = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.auth_email.html"}}, {"op": "add", "path": "/paths/~1user~1api-calls/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.api_calls import user_list_api_calls\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_user_list_api_calls():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = user_list_api_calls.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.user_list_api_calls.html"}}, {"op": "add", "path": "/paths/~1async~1operations~1{id}/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.api_calls import get_async_operation\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import (\n Error,\n FileCenterOfMass,\n FileConversion,\n FileDensity,\n FileMass,\n FileSurfaceArea,\n FileVolume,\n)\nfrom kittycad.types import Response\n\n\ndef example_get_async_operation():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[\n FileConversion,\n FileCenterOfMass,\n FileMass,\n FileVolume,\n FileDensity,\n FileSurfaceArea,\n Error,\n ]\n ] = get_async_operation.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Union[\n FileConversion,\n FileCenterOfMass,\n FileMass,\n FileVolume,\n FileDensity,\n FileSurfaceArea,\n ] = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_async_operation.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1energy~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.unit import get_energy_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitEnergyConversion\nfrom kittycad.models.unit_energy_format import UnitEnergyFormat\nfrom kittycad.types import Response\n\n\ndef example_get_energy_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitEnergyConversion, Error]\n ] = get_energy_unit_conversion.sync(\n client=client,\n output_format=UnitEnergyFormat.JOULE,\n src_format=UnitEnergyFormat.JOULE,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitEnergyConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_energy_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1ws~1executor~1term/get/x-python", "value": {"example": "from kittycad.api.executor import create_executor_term\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_create_executor_term():\n # Create our client.\n client = ClientFromEnv()\n\n create_executor_term.sync(\n client=client,\n )\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.executor.create_executor_term.html"}}, {"op": "add", "path": "/paths/~1user~1payment~1balance/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.payments import get_payment_balance_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import CustomerBalance, Error\nfrom kittycad.types import Response\n\n\ndef example_get_payment_balance_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[CustomerBalance, Error]\n ] = get_payment_balance_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: CustomerBalance = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.get_payment_balance_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1front-hash/get/x-python", "value": {"example": "from kittycad.api.users import get_user_front_hash_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_user_front_hash_self():\n # Create our client.\n client = ClientFromEnv()\n\n get_user_front_hash_self.sync(\n client=client,\n )\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_front_hash_self.html"}}, {"op": "add", "path": "/paths/~1user~1payment~1tax/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.payments import validate_customer_tax_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_validate_customer_tax_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = validate_customer_tax_information_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.validate_customer_tax_information_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1payment~1invoices/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.payments import list_invoices_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Invoice\nfrom kittycad.types import Response\n\n\ndef example_list_invoices_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[List[Invoice], Error]] = list_invoices_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[Invoice] = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.list_invoices_for_user.html"}}, {"op": "add", "path": "/paths/~1apps~1github~1webhook/post/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.apps import apps_github_webhook\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_apps_github_webhook():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = apps_github_webhook.sync(\n client=client,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.apps.apps_github_webhook.html"}}, {"op": "add", "path": "/paths/~1file~1center-of-mass/post/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.file import create_file_center_of_mass\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileCenterOfMass\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.types import Response\n\n\ndef example_create_file_center_of_mass():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[FileCenterOfMass, Error]\n ] = create_file_center_of_mass.sync(\n client=client,\n src_format=FileImportFormat.DAE,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileCenterOfMass = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_center_of_mass.html"}}, {"op": "add", "path": "/paths/~1user~1payment~1methods/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.payments import list_payment_methods_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, PaymentMethod\nfrom kittycad.types import Response\n\n\ndef example_list_payment_methods_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[List[PaymentMethod], Error]\n ] = list_payment_methods_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[PaymentMethod] = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.list_payment_methods_for_user.html"}}, {"op": "add", "path": "/paths/~1ping/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.meta import ping\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Pong\nfrom kittycad.types import Response\n\n\ndef example_ping():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Pong, Error]] = ping.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Pong = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.ping.html"}}, {"op": "add", "path": "/paths/~1/get/x-python", "value": {"example": "from kittycad.api.meta import get_schema\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_schema():\n # Create our client.\n client = ClientFromEnv()\n\n get_schema.sync(\n client=client,\n )\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_schema.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1metric~1power~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.unit import get_metric_power_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitMetricPowerConversion\nfrom kittycad.models.unit_metric_power import UnitMetricPower\nfrom kittycad.types import Response\n\n\ndef example_get_metric_power_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitMetricPowerConversion, Error]\n ] = get_metric_power_unit_conversion.sync(\n client=client,\n output_format=UnitMetricPower.ATTO,\n src_format=UnitMetricPower.ATTO,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitMetricPowerConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_metric_power_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1radiation~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.unit import get_radiation_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitRadiationConversion\nfrom kittycad.models.unit_radiation_format import UnitRadiationFormat\nfrom kittycad.types import Response\n\n\ndef example_get_radiation_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitRadiationConversion, Error]\n ] = get_radiation_unit_conversion.sync(\n client=client,\n output_format=UnitRadiationFormat.GRAY,\n src_format=UnitRadiationFormat.GRAY,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitRadiationConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_radiation_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1users/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.users import list_users\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UserResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_users():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[UserResultsPage, Error]] = list_users.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UserResultsPage = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.list_users.html"}}, {"op": "add", "path": "/paths/~1users-extended~1{id}/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.users import get_user_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUser\nfrom kittycad.types import Response\n\n\ndef example_get_user_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ExtendedUser, Error]] = get_user_extended.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ExtendedUser = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_extended.html"}}, {"op": "add", "path": "/paths/~1users-extended/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.users import list_users_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUserResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_users_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ExtendedUserResultsPage, Error]\n ] = list_users_extended.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ExtendedUserResultsPage = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.list_users_extended.html"}}, {"op": "add", "path": "/paths/~1api-calls~1{id}/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.api_calls import get_api_call\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPrice, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_call():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiCallWithPrice, Error]] = get_api_call.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPrice = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call.html"}}, {"op": "add", "path": "/paths/~1drawing~1cmd_batch/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.drawing import cmd_batch\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import DrawingOutcomes, Error\nfrom kittycad.models.drawing_cmd import DrawCircle\nfrom kittycad.models.drawing_cmd_id import DrawingCmdId\nfrom kittycad.models.drawing_cmd_req import DrawingCmdReq\nfrom kittycad.models.drawing_cmd_req_batch import DrawingCmdReqBatch\nfrom kittycad.types import Response\n\n\ndef example_cmd_batch():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[DrawingOutcomes, Error]] = cmd_batch.sync(\n client=client,\n body=DrawingCmdReqBatch(\n cmds={\n \"\": DrawingCmdReq(\n cmd=DrawCircle(\n center=[\n 3.14,\n 3.14,\n ],\n radius=3.14,\n ),\n cmd_id=DrawingCmdId(\"\"),\n file_id=\"\",\n )\n },\n file_id=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: DrawingOutcomes = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.drawing.cmd_batch.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1concentration~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.unit import get_concentration_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitConcentrationConversion\nfrom kittycad.models.unit_concentration_format import UnitConcentrationFormat\nfrom kittycad.types import Response\n\n\ndef example_get_concentration_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitConcentrationConversion, Error]\n ] = get_concentration_unit_conversion.sync(\n client=client,\n output_format=UnitConcentrationFormat.PARTS_PER_MILLION,\n src_format=UnitConcentrationFormat.PARTS_PER_MILLION,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitConcentrationConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_concentration_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1power~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.unit import get_power_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitPowerConversion\nfrom kittycad.models.unit_power_format import UnitPowerFormat\nfrom kittycad.types import Response\n\n\ndef example_get_power_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitPowerConversion, Error]\n ] = get_power_unit_conversion.sync(\n client=client,\n output_format=UnitPowerFormat.WATT,\n src_format=UnitPowerFormat.WATT,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitPowerConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_power_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1data-transfer-rate~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.unit import get_data_transfer_rate_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitDataTransferRateConversion\nfrom kittycad.models.unit_data_transfer_rate_format import (\n UnitDataTransferRateFormat,\n)\nfrom kittycad.types import Response\n\n\ndef example_get_data_transfer_rate_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitDataTransferRateConversion, Error]\n ] = get_data_transfer_rate_unit_conversion.sync(\n client=client,\n output_format=UnitDataTransferRateFormat.BYTES_PER_SECOND,\n src_format=UnitDataTransferRateFormat.BYTES_PER_SECOND,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitDataTransferRateConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_data_transfer_rate_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1auth~1email~1callback/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.hidden import auth_email_callback\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_auth_email_callback():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = auth_email_callback.sync(\n client=client,\n email=\"\",\n token=\"\",\n callback_url=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.auth_email_callback.html"}}, {"op": "add", "path": "/paths/~1openai~1openapi.json/get/x-python", "value": {"example": "from kittycad.api.meta import get_openai_schema\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_openai_schema():\n # Create our client.\n client = ClientFromEnv()\n\n get_openai_schema.sync(\n client=client,\n )\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_openai_schema.html"}}, {"op": "add", "path": "/paths/~1user~1onboarding/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.users import get_user_onboarding_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Onboarding\nfrom kittycad.types import Response\n\n\ndef example_get_user_onboarding_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Onboarding, Error]] = get_user_onboarding_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Onboarding = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_onboarding_self.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1length~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.unit import get_length_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitLengthConversion\nfrom kittycad.models.unit_length_format import UnitLengthFormat\nfrom kittycad.types import Response\n\n\ndef example_get_length_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitLengthConversion, Error]\n ] = get_length_unit_conversion.sync(\n client=client,\n output_format=UnitLengthFormat.METER,\n src_format=UnitLengthFormat.METER,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitLengthConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_length_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1solid-angle~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.unit import get_solid_angle_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitSolidAngleConversion\nfrom kittycad.models.unit_solid_angle_format import UnitSolidAngleFormat\nfrom kittycad.types import Response\n\n\ndef example_get_solid_angle_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitSolidAngleConversion, Error]\n ] = get_solid_angle_unit_conversion.sync(\n client=client,\n output_format=UnitSolidAngleFormat.STERADIAN,\n src_format=UnitSolidAngleFormat.STERADIAN,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitSolidAngleConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_solid_angle_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1illuminance~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.unit import get_illuminance_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitIlluminanceConversion\nfrom kittycad.models.unit_illuminance_format import UnitIlluminanceFormat\nfrom kittycad.types import Response\n\n\ndef example_get_illuminance_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitIlluminanceConversion, Error]\n ] = get_illuminance_unit_conversion.sync(\n client=client,\n output_format=UnitIlluminanceFormat.LUX,\n src_format=UnitIlluminanceFormat.LUX,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitIlluminanceConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_illuminance_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1temperature~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.unit import get_temperature_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitTemperatureConversion\nfrom kittycad.models.unit_temperature_format import UnitTemperatureFormat\nfrom kittycad.types import Response\n\n\ndef example_get_temperature_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitTemperatureConversion, Error]\n ] = get_temperature_unit_conversion.sync(\n client=client,\n output_format=UnitTemperatureFormat.KELVIN,\n src_format=UnitTemperatureFormat.KELVIN,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitTemperatureConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_temperature_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1user~1api-tokens/post/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.api_tokens import create_api_token_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiToken, Error\nfrom kittycad.types import Response\n\n\ndef example_create_api_token_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiToken, Error]] = create_api_token_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiToken = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.create_api_token_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1api-tokens/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.api_tokens import list_api_tokens_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiTokenResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_tokens_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiTokenResultsPage, Error]\n ] = list_api_tokens_for_user.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiTokenResultsPage = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.list_api_tokens_for_user.html"}}, {"op": "add", "path": "/paths/~1ai~1image-to-3d~1{input_format}~1{output_format}/post/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.ai import create_image_to_3d\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Mesh\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.models.image_type import ImageType\nfrom kittycad.types import Response\n\n\ndef example_create_image_to_3d():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Mesh, Error]] = create_image_to_3d.sync(\n client=client,\n input_format=ImageType.PNG,\n output_format=FileExportFormat.DAE,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Mesh = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.create_image_to_3d.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1metric~1squared~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.unit import get_metric_power_squared_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitMetricPowerSquaredConversion\nfrom kittycad.models.unit_metric_power import UnitMetricPower\nfrom kittycad.types import Response\n\n\ndef example_get_metric_power_squared_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitMetricPowerSquaredConversion, Error]\n ] = get_metric_power_squared_unit_conversion.sync(\n client=client,\n output_format=UnitMetricPower.ATTO,\n src_format=UnitMetricPower.ATTO,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitMetricPowerSquaredConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_metric_power_squared_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1users~1{id}/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.users import get_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.types import Response\n\n\ndef example_get_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = get_user.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1velocity~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.unit import get_velocity_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitVelocityConversion\nfrom kittycad.models.unit_velocity_format import UnitVelocityFormat\nfrom kittycad.types import Response\n\n\ndef example_get_velocity_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitVelocityConversion, Error]\n ] = get_velocity_unit_conversion.sync(\n client=client,\n output_format=UnitVelocityFormat.METERS_PER_SECOND,\n src_format=UnitVelocityFormat.METERS_PER_SECOND,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitVelocityConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_velocity_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1user~1extended/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.users import get_user_self_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUser\nfrom kittycad.types import Response\n\n\ndef example_get_user_self_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ExtendedUser, Error]] = get_user_self_extended.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ExtendedUser = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_self_extended.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1volume~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.unit import get_volume_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitVolumeConversion\nfrom kittycad.models.unit_volume_format import UnitVolumeFormat\nfrom kittycad.types import Response\n\n\ndef example_get_volume_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitVolumeConversion, Error]\n ] = get_volume_unit_conversion.sync(\n client=client,\n output_format=UnitVolumeFormat.CUBIC_METER,\n src_format=UnitVolumeFormat.CUBIC_METER,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitVolumeConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_volume_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1_meta~1info/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.meta import get_metadata\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Metadata\nfrom kittycad.types import Response\n\n\ndef example_get_metadata():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Metadata, Error]] = get_metadata.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Metadata = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_metadata.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1force~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.unit import get_force_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitForceConversion\nfrom kittycad.models.unit_force_format import UnitForceFormat\nfrom kittycad.types import Response\n\n\ndef example_get_force_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitForceConversion, Error]\n ] = get_force_unit_conversion.sync(\n client=client,\n output_format=UnitForceFormat.NEWTON,\n src_format=UnitForceFormat.NEWTON,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitForceConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_force_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1angular-velocity~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.unit import get_angular_velocity_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitAngularVelocityConversion\nfrom kittycad.models.unit_angular_velocity_format import UnitAngularVelocityFormat\nfrom kittycad.types import Response\n\n\ndef example_get_angular_velocity_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitAngularVelocityConversion, Error]\n ] = get_angular_velocity_unit_conversion.sync(\n client=client,\n output_format=UnitAngularVelocityFormat.RADIANS_PER_SECOND,\n src_format=UnitAngularVelocityFormat.RADIANS_PER_SECOND,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitAngularVelocityConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_angular_velocity_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1ai~1text-to-3d~1{output_format}/post/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.ai import create_text_to_3d\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Mesh\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.types import Response\n\n\ndef example_create_text_to_3d():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Mesh, Error]] = create_text_to_3d.sync(\n client=client,\n output_format=FileExportFormat.DAE,\n prompt=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Mesh = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.create_text_to_3d.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1area~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.unit import get_area_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitAreaConversion\nfrom kittycad.models.unit_area_format import UnitAreaFormat\nfrom kittycad.types import Response\n\n\ndef example_get_area_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitAreaConversion, Error]\n ] = get_area_unit_conversion.sync(\n client=client,\n output_format=UnitAreaFormat.SQUARE_METER,\n src_format=UnitAreaFormat.SQUARE_METER,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitAreaConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_area_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1voltage~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.unit import get_voltage_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitVoltageConversion\nfrom kittycad.models.unit_voltage_format import UnitVoltageFormat\nfrom kittycad.types import Response\n\n\ndef example_get_voltage_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitVoltageConversion, Error]\n ] = get_voltage_unit_conversion.sync(\n client=client,\n output_format=UnitVoltageFormat.VOLT,\n src_format=UnitVoltageFormat.VOLT,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitVoltageConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_voltage_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1user~1payment/post/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.payments import create_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Customer, Error\nfrom kittycad.models.billing_info import BillingInfo\nfrom kittycad.types import Response\n\n\ndef example_create_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[Customer, Error]\n ] = create_payment_information_for_user.sync(\n client=client,\n body=BillingInfo(\n name=\"\",\n phone=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Customer = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.create_payment_information_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1payment/put/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.payments import update_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Customer, Error\nfrom kittycad.models.billing_info import BillingInfo\nfrom kittycad.types import Response\n\n\ndef example_update_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[Customer, Error]\n ] = update_payment_information_for_user.sync(\n client=client,\n body=BillingInfo(\n name=\"\",\n phone=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Customer = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.update_payment_information_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1payment/get/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.payments import get_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Customer, Error\nfrom kittycad.types import Response\n\n\ndef example_get_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[Customer, Error]\n ] = get_payment_information_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Customer = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.get_payment_information_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1payment/delete/x-python", "value": {"example": "from typing import Any, Optional, Union\n\nfrom kittycad.api.payments import delete_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_payment_information_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.delete_payment_information_for_user.html"}}, {"op": "add", "path": "/components/schemas/UnitRadiationFormat/enum", "value": ["gray", "sievert", "rad"]}, {"op": "add", "path": "/components/schemas/UnitRadiationFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitAreaFormat/enum", "value": ["square_meter", "square_foot", "square_inch", "square_mile", "square_kilometer", "hectare", "acre"]}, {"op": "add", "path": "/components/schemas/UnitAreaFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitDensityFormat/enum", "value": ["kilograms_per_cubic_meter", "grams_per_milliliter", "kilograms_per_liter", "ounces_per_cubic_foot", "ounces_per_cubic_inch", "ounces_per_gallon", "pounds_per_cubic_foot", "pounds_per_cubic_inch", "pounds_per_gallon", "slugs_per_cubic_foot"]}, {"op": "add", "path": "/components/schemas/UnitDensityFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitAngularVelocityFormat/enum", "value": ["radians_per_second", "degrees_per_second", "revolutions_per_minute", "milliarcseconds_per_year"]}, {"op": "add", "path": "/components/schemas/UnitAngularVelocityFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/AiPluginApiType/enum", "value": ["openapi"]}, {"op": "add", "path": "/components/schemas/AiPluginApiType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/AiPluginAuthType/enum", "value": ["none", "user_http", "service_http", "oauth"]}, {"op": "add", "path": "/components/schemas/AiPluginAuthType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/ApiCallQueryGroupBy/enum", "value": ["email", "method", "endpoint", "user_id", "origin", "ip_address"]}, {"op": "add", "path": "/components/schemas/ApiCallQueryGroupBy/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitIlluminanceFormat/enum", "value": ["lux", "footcandle", "lumens_per_square_inch", "phot"]}, {"op": "add", "path": "/components/schemas/UnitIlluminanceFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitTemperatureFormat/enum", "value": ["kelvin", "celsius", "fahrenheit", "reaumur", "rankine"]}, {"op": "add", "path": "/components/schemas/UnitTemperatureFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitAngleFormat/enum", "value": ["radian", "degree", "arcminute", "arcsecond", "milliarcsecond", "turn", "gradian"]}, {"op": "add", "path": "/components/schemas/UnitAngleFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitLengthFormat/enum", "value": ["meter", "millimeter", "centimeter", "kilometer", "foot", "mil", "inch", "mile", "nautical_mile", "astronomical_unit", "lightyear", "parsec", "angstrom", "cubit", "fathom", "chain", "furlong", "hand", "league", "nautical_league", "yard"]}, {"op": "add", "path": "/components/schemas/UnitLengthFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitVolumeFormat/enum", "value": ["cubic_meter", "cubic_centimeter", "cubic_millimeter", "cubic_kilometer", "liter", "cubic_inch", "cubic_foot", "cubic_yard", "cubic_mile", "gallon", "quart", "pint", "cup", "fluid_ounce", "barrel", "bushel", "cord", "cubic_fathom", "tablespoon", "teaspoon", "pinch", "dash", "drop", "fifth", "dram", "gill", "peck", "sack", "shot", "strike"]}, {"op": "add", "path": "/components/schemas/UnitVolumeFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/AsyncApiCallType/enum", "value": ["FileConversion", "FileVolume", "FileCenterOfMass", "FileMass", "FileDensity", "FileSurfaceArea"]}, {"op": "add", "path": "/components/schemas/AsyncApiCallType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitConcentrationFormat/enum", "value": ["parts_per_million", "parts_per_billion", "parts_per_trillion", "percent"]}, {"op": "add", "path": "/components/schemas/UnitConcentrationFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitVelocityFormat/enum", "value": ["meters_per_second", "feet_per_second", "miles_per_hour", "kilometers_per_hour", "knot"]}, {"op": "add", "path": "/components/schemas/UnitVelocityFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/PaymentMethodType/enum", "value": ["card"]}, {"op": "add", "path": "/components/schemas/PaymentMethodType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitChargeFormat/enum", "value": ["coulomb", "ampere_hour"]}, {"op": "add", "path": "/components/schemas/UnitChargeFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/FileImportFormat/enum", "value": ["dae", "dxf", "fbx", "obj_zip", "obj", "ply", "step", "stl"]}, {"op": "add", "path": "/components/schemas/FileImportFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitDataTransferRateFormat/enum", "value": ["bytes_per_second", "exabytes_per_second", "bits_per_second", "exabits_per_second"]}, {"op": "add", "path": "/components/schemas/UnitDataTransferRateFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitSolidAngleFormat/enum", "value": ["steradian", "degree_squared", "spat"]}, {"op": "add", "path": "/components/schemas/UnitSolidAngleFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitAccelerationFormat/enum", "value": ["meters_per_second_squared", "feet_per_second_squared", "standard_gravity"]}, {"op": "add", "path": "/components/schemas/UnitAccelerationFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/Currency/enum", "value": ["aed", "afn", "all", "amd", "ang", "aoa", "ars", "aud", "awg", "azn", "bam", "bbd", "bdt", "bgn", "bif", "bmd", "bnd", "bob", "brl", "bsd", "bwp", "bzd", "cad", "cdf", "chf", "clp", "cny", "cop", "crc", "cve", "czk", "djf", "dkk", "dop", "dzd", "eek", "egp", "etb", "eur", "fjd", "fkp", "gbp", "gel", "gip", "gmd", "gnf", "gtq", "gyd", "hkd", "hnl", "hrk", "htg", "huf", "idr", "ils", "inr", "isk", "jmd", "jpy", "kes", "kgs", "khr", "kmf", "krw", "kyd", "kzt", "lak", "lbp", "lkr", "lrd", "lsl", "ltl", "lvl", "mad", "mdl", "mga", "mkd", "mnt", "mop", "mro", "mur", "mvr", "mwk", "mxn", "myr", "mzn", "nad", "ngn", "nio", "nok", "npr", "nzd", "pab", "pen", "pgk", "php", "pkr", "pln", "pyg", "qar", "ron", "rsd", "rub", "rwf", "sar", "sbd", "scr", "sek", "sgd", "shp", "sll", "sos", "srd", "std", "svc", "szl", "thb", "tjs", "top", "try", "ttd", "twd", "tzs", "uah", "ugx", "usd", "uyu", "uzs", "vef", "vnd", "vuv", "wst", "xaf", "xcd", "xof", "xpf", "yer", "zar", "zmw"]}, {"op": "add", "path": "/components/schemas/Currency/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitEnergyFormat/enum", "value": ["joule", "calorie", "kilowatt_hour", "watt_hour", "british_thermal_unit", "british_thermal_unit_iso", "british_thermal_unit59", "therm", "foot_pound"]}, {"op": "add", "path": "/components/schemas/UnitEnergyFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitMetricPower/enum", "value": ["atto", "femto", "pico", "nano", "micro", "milli", "centi", "deci", "unit", "deca", "hecto", "kilo", "mega", "giga", "tera", "peta", "exa"]}, {"op": "add", "path": "/components/schemas/UnitMetricPower/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitRadioactivityFormat/enum", "value": ["becquerel", "curie", "rutherford"]}, {"op": "add", "path": "/components/schemas/UnitRadioactivityFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitMassFormat/enum", "value": ["gram", "kilogram", "metric_ton", "pound", "long_ton", "short_ton", "stone", "ounce", "carat", "slug"]}, {"op": "add", "path": "/components/schemas/UnitMassFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitPressureFormat/enum", "value": ["pascal", "bar", "mbar", "atmosphere", "pounds_per_square_inch"]}, {"op": "add", "path": "/components/schemas/UnitPressureFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/InvoiceStatus/enum", "value": ["deleted", "draft", "open", "paid", "uncollectible", "void"]}, {"op": "add", "path": "/components/schemas/InvoiceStatus/type", "value": "string"}, {"op": "add", "path": "/components/schemas/Method/enum", "value": ["OPTIONS", "GET", "POST", "PUT", "DELETE", "HEAD", "TRACE", "CONNECT", "PATCH", "EXTENSION"]}, {"op": "add", "path": "/components/schemas/Method/type", "value": "string"}, {"op": "add", "path": "/components/schemas/PhysicsConstantName/enum", "value": ["pi", "c", "speed_of_light", "G", "newtonian_gravitation", "h", "planck_const", "mu_0", "vacuum_permeability", "E_0", "vacuum_permitivity", "Z_0", "vacuum_impedance", "k_e", "coulomb_const", "e", "elementary_charge", "m_e", "electron_mass", "m_p", "proton_mass", "mu_B", "bohr_magneton", "NA", "avogadro_num", "R", "molar_gas_const", "K_B", "boltzmann_const", "F", "faraday_const", "sigma", "stefan_boltzmann_const"]}, {"op": "add", "path": "/components/schemas/PhysicsConstantName/type", "value": "string"}, {"op": "add", "path": "/components/schemas/CountryCode/enum", "value": ["AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BQ", "BA", "BW", "BV", "BR", "IO", "BN", "BG", "BF", "BI", "CV", "KH", "CM", "CA", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD", "CK", "CR", "CI", "HR", "CU", "CW", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "ET", "FK", "FO", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "HM", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KP", "KR", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "FM", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "SS", "ES", "LK", "SD", "SR", "SJ", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "US", "UM", "UY", "UZ", "VU", "VE", "VN", "VG", "VI", "WF", "EH", "YE", "ZM", "ZW"]}, {"op": "add", "path": "/components/schemas/CountryCode/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitMagneticFluxFormat/enum", "value": ["weber", "maxwell"]}, {"op": "add", "path": "/components/schemas/UnitMagneticFluxFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/FileExportFormat/enum", "value": ["dae", "dxf", "fbx", "fbxb", "obj", "ply", "step", "stl"]}, {"op": "add", "path": "/components/schemas/FileExportFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitForceFormat/enum", "value": ["newton", "pound", "dyne", "kilopond", "poundal"]}, {"op": "add", "path": "/components/schemas/UnitForceFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/CreatedAtSortMode/enum", "value": ["created-at-ascending", "created-at-descending"]}, {"op": "add", "path": "/components/schemas/CreatedAtSortMode/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitVoltageFormat/enum", "value": ["volt", "statvolt", "abvolt"]}, {"op": "add", "path": "/components/schemas/UnitVoltageFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitTimeFormat/enum", "value": ["second", "minute", "hour", "day", "week", "year", "julian_year", "gregorian_year"]}, {"op": "add", "path": "/components/schemas/UnitTimeFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitPowerFormat/enum", "value": ["watt", "horsepower", "milliwatt"]}, {"op": "add", "path": "/components/schemas/UnitPowerFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/AiPluginHttpAuthType/enum", "value": ["basic", "bearer"]}, {"op": "add", "path": "/components/schemas/AiPluginHttpAuthType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/AccountProvider/enum", "value": ["google", "github"]}, {"op": "add", "path": "/components/schemas/AccountProvider/type", "value": "string"}, {"op": "add", "path": "/components/schemas/OAuth2GrantType/enum", "value": ["urn:ietf:params:oauth:grant-type:device_code"]}, {"op": "add", "path": "/components/schemas/OAuth2GrantType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/ApiCallStatus/enum", "value": ["Queued", "Uploaded", "In Progress", "Completed", "Failed"]}, {"op": "add", "path": "/components/schemas/ApiCallStatus/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitMagneticFieldStrengthFormat/enum", "value": ["tesla", "gauss"]}, {"op": "add", "path": "/components/schemas/UnitMagneticFieldStrengthFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitDataFormat/enum", "value": ["byte", "exabyte", "bit", "exabit"]}, {"op": "add", "path": "/components/schemas/UnitDataFormat/type", "value": "string"}] \ No newline at end of file +[{"op": "add", "path": "/info/x-python", "value": {"client": "# Create a client with your token.\nfrom kittycad import Client\n\nclient = Client(token=\"$TOKEN\")\n\n# - OR -\n\n# Create a new client with your token parsed from the environment variable:\n# `KITTYCAD_API_TOKEN`.\nfrom kittycad import ClientFromEnv\n\nclient = ClientFromEnv()\n\n# NOTE: The python library additionally implements asyncio, however all the code samples we\n# show below use the sync functions for ease of use and understanding.\n# Check out the library docs at:\n# https://python.api.docs.kittycad.io/_autosummary/kittycad.api.html#module-kittycad.api\n# for more details.", "install": "pip install kittycad"}}, {"op": "add", "path": "/components/schemas/FileExportFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/FileExportFormat/enum", "value": ["dae", "dxf", "fbx", "fbxb", "obj", "ply", "step", "stl"]}, {"op": "add", "path": "/components/schemas/UnitAngularVelocityFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitAngularVelocityFormat/enum", "value": ["radians_per_second", "degrees_per_second", "revolutions_per_minute", "milliarcseconds_per_year"]}, {"op": "add", "path": "/components/schemas/UnitAreaFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitAreaFormat/enum", "value": ["square_meter", "square_foot", "square_inch", "square_mile", "square_kilometer", "hectare", "acre"]}, {"op": "add", "path": "/components/schemas/Environment/type", "value": "string"}, {"op": "add", "path": "/components/schemas/Environment/enum", "value": ["DEVELOPMENT", "PREVIEW", "PRODUCTION"]}, {"op": "add", "path": "/components/schemas/UnitAngleFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitAngleFormat/enum", "value": ["radian", "degree", "arcminute", "arcsecond", "milliarcsecond", "turn", "gradian"]}, {"op": "add", "path": "/components/schemas/UnitLengthFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitLengthFormat/enum", "value": ["meter", "millimeter", "centimeter", "kilometer", "foot", "mil", "inch", "mile", "nautical_mile", "astronomical_unit", "lightyear", "parsec", "angstrom", "cubit", "fathom", "chain", "furlong", "hand", "league", "nautical_league", "yard"]}, {"op": "add", "path": "/components/schemas/UnitVolumeFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitVolumeFormat/enum", "value": ["cubic_meter", "cubic_centimeter", "cubic_millimeter", "cubic_kilometer", "liter", "cubic_inch", "cubic_foot", "cubic_yard", "cubic_mile", "gallon", "quart", "pint", "cup", "fluid_ounce", "barrel", "bushel", "cord", "cubic_fathom", "tablespoon", "teaspoon", "pinch", "dash", "drop", "fifth", "dram", "gill", "peck", "sack", "shot", "strike"]}, {"op": "add", "path": "/components/schemas/UnitDataTransferRateFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitDataTransferRateFormat/enum", "value": ["bytes_per_second", "exabytes_per_second", "bits_per_second", "exabits_per_second"]}, {"op": "add", "path": "/components/schemas/UnitDensityFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitDensityFormat/enum", "value": ["kilograms_per_cubic_meter", "grams_per_milliliter", "kilograms_per_liter", "ounces_per_cubic_foot", "ounces_per_cubic_inch", "ounces_per_gallon", "pounds_per_cubic_foot", "pounds_per_cubic_inch", "pounds_per_gallon", "slugs_per_cubic_foot"]}, {"op": "add", "path": "/components/schemas/UnitRadiationFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitRadiationFormat/enum", "value": ["gray", "sievert", "rad"]}, {"op": "add", "path": "/components/schemas/AccountProvider/type", "value": "string"}, {"op": "add", "path": "/components/schemas/AccountProvider/enum", "value": ["google", "github"]}, {"op": "add", "path": "/components/schemas/UnitTimeFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitTimeFormat/enum", "value": ["second", "minute", "hour", "day", "week", "year", "julian_year", "gregorian_year"]}, {"op": "add", "path": "/components/schemas/UnitChargeFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitChargeFormat/enum", "value": ["coulomb", "ampere_hour"]}, {"op": "add", "path": "/components/schemas/AsyncApiCallType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/AsyncApiCallType/enum", "value": ["FileConversion", "FileVolume", "FileCenterOfMass", "FileMass", "FileDensity", "FileSurfaceArea"]}, {"op": "add", "path": "/components/schemas/UnitForceFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitForceFormat/enum", "value": ["newton", "pound", "dyne", "kilopond", "poundal"]}, {"op": "add", "path": "/components/schemas/AiPluginHttpAuthType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/AiPluginHttpAuthType/enum", "value": ["basic", "bearer"]}, {"op": "add", "path": "/components/schemas/PaymentMethodType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/PaymentMethodType/enum", "value": ["card"]}, {"op": "add", "path": "/components/schemas/UnitPressureFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitPressureFormat/enum", "value": ["pascal", "bar", "mbar", "atmosphere", "pounds_per_square_inch"]}, {"op": "add", "path": "/components/schemas/CountryCode/type", "value": "string"}, {"op": "add", "path": "/components/schemas/CountryCode/enum", "value": ["AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BQ", "BA", "BW", "BV", "BR", "IO", "BN", "BG", "BF", "BI", "CV", "KH", "CM", "CA", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD", "CK", "CR", "CI", "HR", "CU", "CW", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "ET", "FK", "FO", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "HM", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KP", "KR", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "FM", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "SS", "ES", "LK", "SD", "SR", "SJ", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "US", "UM", "UY", "UZ", "VU", "VE", "VN", "VG", "VI", "WF", "EH", "YE", "ZM", "ZW"]}, {"op": "add", "path": "/components/schemas/UnitMagneticFieldStrengthFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitMagneticFieldStrengthFormat/enum", "value": ["tesla", "gauss"]}, {"op": "add", "path": "/components/schemas/UnitVoltageFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitVoltageFormat/enum", "value": ["volt", "statvolt", "abvolt"]}, {"op": "add", "path": "/components/schemas/UnitPowerFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitPowerFormat/enum", "value": ["watt", "horsepower", "milliwatt"]}, {"op": "add", "path": "/components/schemas/UnitVelocityFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitVelocityFormat/enum", "value": ["meters_per_second", "feet_per_second", "miles_per_hour", "kilometers_per_hour", "knot"]}, {"op": "add", "path": "/components/schemas/Method/type", "value": "string"}, {"op": "add", "path": "/components/schemas/Method/enum", "value": ["OPTIONS", "GET", "POST", "PUT", "DELETE", "HEAD", "TRACE", "CONNECT", "PATCH", "EXTENSION"]}, {"op": "add", "path": "/components/schemas/UnitEnergyFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitEnergyFormat/enum", "value": ["joule", "calorie", "kilowatt_hour", "watt_hour", "british_thermal_unit", "british_thermal_unit_iso", "british_thermal_unit59", "therm", "foot_pound"]}, {"op": "add", "path": "/components/schemas/OAuth2GrantType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/OAuth2GrantType/enum", "value": ["urn:ietf:params:oauth:grant-type:device_code"]}, {"op": "add", "path": "/components/schemas/UnitMetricPower/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitMetricPower/enum", "value": ["atto", "femto", "pico", "nano", "micro", "milli", "centi", "deci", "unit", "deca", "hecto", "kilo", "mega", "giga", "tera", "peta", "exa"]}, {"op": "add", "path": "/components/schemas/CreatedAtSortMode/type", "value": "string"}, {"op": "add", "path": "/components/schemas/CreatedAtSortMode/enum", "value": ["created-at-ascending", "created-at-descending"]}, {"op": "add", "path": "/components/schemas/UnitRadioactivityFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitRadioactivityFormat/enum", "value": ["becquerel", "curie", "rutherford"]}, {"op": "add", "path": "/components/schemas/ApiCallQueryGroupBy/type", "value": "string"}, {"op": "add", "path": "/components/schemas/ApiCallQueryGroupBy/enum", "value": ["email", "method", "endpoint", "user_id", "origin", "ip_address"]}, {"op": "add", "path": "/components/schemas/Currency/type", "value": "string"}, {"op": "add", "path": "/components/schemas/Currency/enum", "value": ["aed", "afn", "all", "amd", "ang", "aoa", "ars", "aud", "awg", "azn", "bam", "bbd", "bdt", "bgn", "bif", "bmd", "bnd", "bob", "brl", "bsd", "bwp", "bzd", "cad", "cdf", "chf", "clp", "cny", "cop", "crc", "cve", "czk", "djf", "dkk", "dop", "dzd", "eek", "egp", "etb", "eur", "fjd", "fkp", "gbp", "gel", "gip", "gmd", "gnf", "gtq", "gyd", "hkd", "hnl", "hrk", "htg", "huf", "idr", "ils", "inr", "isk", "jmd", "jpy", "kes", "kgs", "khr", "kmf", "krw", "kyd", "kzt", "lak", "lbp", "lkr", "lrd", "lsl", "ltl", "lvl", "mad", "mdl", "mga", "mkd", "mnt", "mop", "mro", "mur", "mvr", "mwk", "mxn", "myr", "mzn", "nad", "ngn", "nio", "nok", "npr", "nzd", "pab", "pen", "pgk", "php", "pkr", "pln", "pyg", "qar", "ron", "rsd", "rub", "rwf", "sar", "sbd", "scr", "sek", "sgd", "shp", "sll", "sos", "srd", "std", "svc", "szl", "thb", "tjs", "top", "try", "ttd", "twd", "tzs", "uah", "ugx", "usd", "uyu", "uzs", "vef", "vnd", "vuv", "wst", "xaf", "xcd", "xof", "xpf", "yer", "zar", "zmw"]}, {"op": "add", "path": "/components/schemas/AiPluginAuthType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/AiPluginAuthType/enum", "value": ["none", "user_http", "service_http", "oauth"]}, {"op": "add", "path": "/components/schemas/UnitMassFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitMassFormat/enum", "value": ["gram", "kilogram", "metric_ton", "pound", "long_ton", "short_ton", "stone", "ounce", "carat", "slug"]}, {"op": "add", "path": "/components/schemas/UnitAccelerationFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitAccelerationFormat/enum", "value": ["meters_per_second_squared", "feet_per_second_squared", "standard_gravity"]}, {"op": "add", "path": "/components/schemas/UnitConcentrationFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitConcentrationFormat/enum", "value": ["parts_per_million", "parts_per_billion", "parts_per_trillion", "percent"]}, {"op": "add", "path": "/components/schemas/UnitDataFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitDataFormat/enum", "value": ["byte", "exabyte", "bit", "exabit"]}, {"op": "add", "path": "/components/schemas/AiPluginApiType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/AiPluginApiType/enum", "value": ["openapi"]}, {"op": "add", "path": "/components/schemas/InvoiceStatus/type", "value": "string"}, {"op": "add", "path": "/components/schemas/InvoiceStatus/enum", "value": ["deleted", "draft", "open", "paid", "uncollectible", "void"]}, {"op": "add", "path": "/components/schemas/UnitSolidAngleFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitSolidAngleFormat/enum", "value": ["steradian", "degree_squared", "spat"]}, {"op": "add", "path": "/components/schemas/UnitMagneticFluxFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitMagneticFluxFormat/enum", "value": ["weber", "maxwell"]}, {"op": "add", "path": "/components/schemas/ApiCallStatus/type", "value": "string"}, {"op": "add", "path": "/components/schemas/ApiCallStatus/enum", "value": ["Queued", "Uploaded", "In Progress", "Completed", "Failed"]}, {"op": "add", "path": "/components/schemas/UnitIlluminanceFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitIlluminanceFormat/enum", "value": ["lux", "footcandle", "lumens_per_square_inch", "phot"]}, {"op": "add", "path": "/components/schemas/UnitTemperatureFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitTemperatureFormat/enum", "value": ["kelvin", "celsius", "fahrenheit", "reaumur", "rankine"]}, {"op": "add", "path": "/components/schemas/PhysicsConstantName/type", "value": "string"}, {"op": "add", "path": "/components/schemas/PhysicsConstantName/enum", "value": ["pi", "c", "speed_of_light", "G", "newtonian_gravitation", "h", "planck_const", "mu_0", "vacuum_permeability", "E_0", "vacuum_permitivity", "Z_0", "vacuum_impedance", "k_e", "coulomb_const", "e", "elementary_charge", "m_e", "electron_mass", "m_p", "proton_mass", "mu_B", "bohr_magneton", "NA", "avogadro_num", "R", "molar_gas_const", "K_B", "boltzmann_const", "F", "faraday_const", "sigma", "stefan_boltzmann_const"]}, {"op": "add", "path": "/components/schemas/FileImportFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/FileImportFormat/enum", "value": ["dae", "dxf", "fbx", "obj_zip", "obj", "ply", "step", "stl"]}, {"op": "add", "path": "/paths/~1openai~1openapi.json/get/x-python", "value": {"example": "from kittycad.api.meta import get_openai_schema\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_openai_schema():\n # Create our client.\n client = ClientFromEnv()\n\n get_openai_schema.sync(\n client=client,\n )\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_openai_schema.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1concentration~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_concentration_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitConcentrationConversion\nfrom kittycad.models.unit_concentration_format import UnitConcentrationFormat\nfrom kittycad.types import Response\n\n\ndef example_get_concentration_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitConcentrationConversion, Error]\n ] = get_concentration_unit_conversion.sync(\n client=client,\n output_format=UnitConcentrationFormat.PARTS_PER_MILLION,\n src_format=UnitConcentrationFormat.PARTS_PER_MILLION,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitConcentrationConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_concentration_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1user~1payment~1intent/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.payments import create_payment_intent_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, PaymentIntent\nfrom kittycad.types import Response\n\n\ndef example_create_payment_intent_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[PaymentIntent, Error]\n ] = create_payment_intent_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: PaymentIntent = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.create_payment_intent_for_user.html"}}, {"op": "add", "path": "/paths/~1auth~1email/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.hidden import auth_email\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, VerificationToken\nfrom kittycad.models.email_authentication_form import EmailAuthenticationForm\nfrom kittycad.types import Response\n\n\ndef example_auth_email():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[VerificationToken, Error]] = auth_email.sync(\n client=client,\n body=EmailAuthenticationForm(\n email=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: VerificationToken = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.auth_email.html"}}, {"op": "add", "path": "/paths/~1user~1front-hash/get/x-python", "value": {"example": "from kittycad.api.users import get_user_front_hash_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_user_front_hash_self():\n # Create our client.\n client = ClientFromEnv()\n\n get_user_front_hash_self.sync(\n client=client,\n )\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_front_hash_self.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1charge~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_charge_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitChargeConversion\nfrom kittycad.models.unit_charge_format import UnitChargeFormat\nfrom kittycad.types import Response\n\n\ndef example_get_charge_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitChargeConversion, Error]\n ] = get_charge_unit_conversion.sync(\n client=client,\n output_format=UnitChargeFormat.COULOMB,\n src_format=UnitChargeFormat.COULOMB,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitChargeConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_charge_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1api-calls~1{id}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_calls import get_api_call\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPrice, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_call():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiCallWithPrice, Error]] = get_api_call.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPrice = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call.html"}}, {"op": "add", "path": "/paths/~1ping/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.meta import ping\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Pong\nfrom kittycad.types import Response\n\n\ndef example_ping():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Pong, Error]] = ping.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Pong = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.ping.html"}}, {"op": "add", "path": "/paths/~1file~1surface-area/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.file import create_file_surface_area\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileSurfaceArea\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.types import Response\n\n\ndef example_create_file_surface_area():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[FileSurfaceArea, Error]\n ] = create_file_surface_area.sync(\n client=client,\n src_format=FileImportFormat.DAE,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileSurfaceArea = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_surface_area.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1area~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_area_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitAreaConversion\nfrom kittycad.models.unit_area_format import UnitAreaFormat\nfrom kittycad.types import Response\n\n\ndef example_get_area_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitAreaConversion, Error]\n ] = get_area_unit_conversion.sync(\n client=client,\n output_format=UnitAreaFormat.SQUARE_METER,\n src_format=UnitAreaFormat.SQUARE_METER,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitAreaConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_area_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1energy~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_energy_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitEnergyConversion\nfrom kittycad.models.unit_energy_format import UnitEnergyFormat\nfrom kittycad.types import Response\n\n\ndef example_get_energy_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitEnergyConversion, Error]\n ] = get_energy_unit_conversion.sync(\n client=client,\n output_format=UnitEnergyFormat.JOULE,\n src_format=UnitEnergyFormat.JOULE,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitEnergyConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_energy_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1user~1payment~1tax/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.payments import validate_customer_tax_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_validate_customer_tax_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = validate_customer_tax_information_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.validate_customer_tax_information_for_user.html"}}, {"op": "add", "path": "/paths/~1file~1density/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.file import create_file_density\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileDensity\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.types import Response\n\n\ndef example_create_file_density():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileDensity, Error]] = create_file_density.sync(\n client=client,\n material_mass=3.14,\n src_format=FileImportFormat.DAE,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileDensity = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_density.html"}}, {"op": "add", "path": "/paths/~1users/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.users import list_users\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UserResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_users():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[UserResultsPage, Error]] = list_users.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UserResultsPage = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.list_users.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1illuminance~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_illuminance_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitIlluminanceConversion\nfrom kittycad.models.unit_illuminance_format import UnitIlluminanceFormat\nfrom kittycad.types import Response\n\n\ndef example_get_illuminance_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitIlluminanceConversion, Error]\n ] = get_illuminance_unit_conversion.sync(\n client=client,\n output_format=UnitIlluminanceFormat.LUX,\n src_format=UnitIlluminanceFormat.LUX,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitIlluminanceConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_illuminance_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1ws~1modeling~1commands/get/x-python", "value": {"example": "from kittycad.api.modeling import modeling_commands_ws\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_modeling_commands_ws():\n # Create our client.\n client = ClientFromEnv()\n\n modeling_commands_ws.sync(\n client=client,\n )\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.modeling.modeling_commands_ws.html"}}, {"op": "add", "path": "/paths/~1user~1extended/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.users import get_user_self_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUser\nfrom kittycad.types import Response\n\n\ndef example_get_user_self_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ExtendedUser, Error]] = get_user_self_extended.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ExtendedUser = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_self_extended.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1pressure~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_pressure_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitPressureConversion\nfrom kittycad.models.unit_pressure_format import UnitPressureFormat\nfrom kittycad.types import Response\n\n\ndef example_get_pressure_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitPressureConversion, Error]\n ] = get_pressure_unit_conversion.sync(\n client=client,\n output_format=UnitPressureFormat.PASCAL,\n src_format=UnitPressureFormat.PASCAL,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitPressureConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_pressure_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1modeling~1cmd/post/x-python", "value": {"example": "from kittycad.api.modeling import cmd\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models.line3d import Line3d\nfrom kittycad.models.modeling_cmd_id import ModelingCmdId\nfrom kittycad.models.modeling_cmd_req import ModelingCmdReq\nfrom kittycad.models.point3d import Point3d\nfrom kittycad.types import Response\n\n\ndef example_cmd():\n # Create our client.\n client = ClientFromEnv()\n\n cmd.sync(\n client=client,\n body=ModelingCmdReq(\n cmd=Line3d(\n from_=Point3d(\n x=3.14,\n y=3.14,\n z=3.14,\n ),\n to=Point3d(\n x=3.14,\n y=3.14,\n z=3.14,\n ),\n ),\n cmd_id=ModelingCmdId(\"\"),\n file_id=\"\",\n ),\n )\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.modeling.cmd.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1metric~1squared~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_metric_power_squared_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitMetricPowerSquaredConversion\nfrom kittycad.models.unit_metric_power import UnitMetricPower\nfrom kittycad.types import Response\n\n\ndef example_get_metric_power_squared_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitMetricPowerSquaredConversion, Error]\n ] = get_metric_power_squared_unit_conversion.sync(\n client=client,\n output_format=UnitMetricPower.ATTO,\n src_format=UnitMetricPower.ATTO,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitMetricPowerSquaredConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_metric_power_squared_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1users-extended~1{id}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.users import get_user_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUser\nfrom kittycad.types import Response\n\n\ndef example_get_user_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ExtendedUser, Error]] = get_user_extended.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ExtendedUser = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_extended.html"}}, {"op": "add", "path": "/paths/~1api-call-metrics/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_calls import get_api_call_metrics\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallQueryGroup, Error\nfrom kittycad.models.api_call_query_group_by import ApiCallQueryGroupBy\nfrom kittycad.types import Response\n\n\ndef example_get_api_call_metrics():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[List[ApiCallQueryGroup], Error]\n ] = get_api_call_metrics.sync(\n client=client,\n group_by=ApiCallQueryGroupBy.EMAIL,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[ApiCallQueryGroup] = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call_metrics.html"}}, {"op": "add", "path": "/paths/~1_meta~1info/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.meta import get_metadata\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Metadata\nfrom kittycad.types import Response\n\n\ndef example_get_metadata():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Metadata, Error]] = get_metadata.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Metadata = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_metadata.html"}}, {"op": "add", "path": "/paths/~1user~1payment~1invoices/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.payments import list_invoices_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Invoice\nfrom kittycad.types import Response\n\n\ndef example_list_invoices_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[List[Invoice], Error]] = list_invoices_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[Invoice] = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.list_invoices_for_user.html"}}, {"op": "add", "path": "/paths/~1users~1{id}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.users import get_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.types import Response\n\n\ndef example_get_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = get_user.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user.html"}}, {"op": "add", "path": "/paths/~1ws~1executor~1term/get/x-python", "value": {"example": "from kittycad.api.executor import create_executor_term\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_create_executor_term():\n # Create our client.\n client = ClientFromEnv()\n\n create_executor_term.sync(\n client=client,\n )\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.executor.create_executor_term.html"}}, {"op": "add", "path": "/paths/~1user~1api-calls~1{id}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_calls import get_api_call_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPrice, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_call_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiCallWithPrice, Error]] = get_api_call_for_user.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPrice = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call_for_user.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1voltage~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_voltage_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitVoltageConversion\nfrom kittycad.models.unit_voltage_format import UnitVoltageFormat\nfrom kittycad.types import Response\n\n\ndef example_get_voltage_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitVoltageConversion, Error]\n ] = get_voltage_unit_conversion.sync(\n client=client,\n output_format=UnitVoltageFormat.VOLT,\n src_format=UnitVoltageFormat.VOLT,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitVoltageConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_voltage_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1velocity~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_velocity_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitVelocityConversion\nfrom kittycad.models.unit_velocity_format import UnitVelocityFormat\nfrom kittycad.types import Response\n\n\ndef example_get_velocity_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitVelocityConversion, Error]\n ] = get_velocity_unit_conversion.sync(\n client=client,\n output_format=UnitVelocityFormat.METERS_PER_SECOND,\n src_format=UnitVelocityFormat.METERS_PER_SECOND,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitVelocityConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_velocity_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1logout/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.hidden import logout\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_logout():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = logout.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.logout.html"}}, {"op": "add", "path": "/paths/~1api-calls/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_calls import list_api_calls\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_calls():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = list_api_calls.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_api_calls.html"}}, {"op": "add", "path": "/paths/~1apps~1github~1webhook/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.apps import apps_github_webhook\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_apps_github_webhook():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = apps_github_webhook.sync(\n client=client,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.apps.apps_github_webhook.html"}}, {"op": "add", "path": "/paths/~1/get/x-python", "value": {"example": "from kittycad.api.meta import get_schema\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_schema():\n # Create our client.\n client = ClientFromEnv()\n\n get_schema.sync(\n client=client,\n )\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_schema.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1force~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_force_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitForceConversion\nfrom kittycad.models.unit_force_format import UnitForceFormat\nfrom kittycad.types import Response\n\n\ndef example_get_force_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitForceConversion, Error]\n ] = get_force_unit_conversion.sync(\n client=client,\n output_format=UnitForceFormat.NEWTON,\n src_format=UnitForceFormat.NEWTON,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitForceConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_force_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1constant~1physics~1{constant}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.constant import get_physics_constant\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, PhysicsConstant\nfrom kittycad.models.physics_constant_name import PhysicsConstantName\nfrom kittycad.types import Response\n\n\ndef example_get_physics_constant():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[PhysicsConstant, Error]] = get_physics_constant.sync(\n client=client,\n constant=PhysicsConstantName.PI,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: PhysicsConstant = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.constant.get_physics_constant.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1angular-velocity~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_angular_velocity_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitAngularVelocityConversion\nfrom kittycad.models.unit_angular_velocity_format import UnitAngularVelocityFormat\nfrom kittycad.types import Response\n\n\ndef example_get_angular_velocity_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitAngularVelocityConversion, Error]\n ] = get_angular_velocity_unit_conversion.sync(\n client=client,\n output_format=UnitAngularVelocityFormat.RADIANS_PER_SECOND,\n src_format=UnitAngularVelocityFormat.RADIANS_PER_SECOND,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitAngularVelocityConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_angular_velocity_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1.well-known~1ai-plugin.json/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.meta import get_ai_plugin_manifest\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AiPluginManifest, Error\nfrom kittycad.types import Response\n\n\ndef example_get_ai_plugin_manifest():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[AiPluginManifest, Error]\n ] = get_ai_plugin_manifest.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AiPluginManifest = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_ai_plugin_manifest.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1radiation~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_radiation_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitRadiationConversion\nfrom kittycad.models.unit_radiation_format import UnitRadiationFormat\nfrom kittycad.types import Response\n\n\ndef example_get_radiation_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitRadiationConversion, Error]\n ] = get_radiation_unit_conversion.sync(\n client=client,\n output_format=UnitRadiationFormat.GRAY,\n src_format=UnitRadiationFormat.GRAY,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitRadiationConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_radiation_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1users~1{id}~1api-calls/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_calls import list_api_calls_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_calls_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = list_api_calls_for_user.sync(\n client=client,\n id=\"\",\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_api_calls_for_user.html"}}, {"op": "add", "path": "/paths/~1file~1execute~1{lang}/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.executor import create_file_execution\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import CodeOutput, Error\nfrom kittycad.models.code_language import CodeLanguage\nfrom kittycad.types import Response\n\n\ndef example_create_file_execution():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[CodeOutput, Error]] = create_file_execution.sync(\n client=client,\n lang=CodeLanguage.GO,\n output=None, # Optional[str]\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: CodeOutput = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.executor.create_file_execution.html"}}, {"op": "add", "path": "/paths/~1modeling~1cmd_batch/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.modeling import cmd_batch\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ModelingOutcomes\nfrom kittycad.models.line3d import Line3d\nfrom kittycad.models.modeling_cmd_id import ModelingCmdId\nfrom kittycad.models.modeling_cmd_req import ModelingCmdReq\nfrom kittycad.models.modeling_cmd_req_batch import ModelingCmdReqBatch\nfrom kittycad.models.point3d import Point3d\nfrom kittycad.types import Response\n\n\ndef example_cmd_batch():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ModelingOutcomes, Error]] = cmd_batch.sync(\n client=client,\n body=ModelingCmdReqBatch(\n cmds={\n \"\": ModelingCmdReq(\n cmd=Line3d(\n from_=Point3d(\n x=3.14,\n y=3.14,\n z=3.14,\n ),\n to=Point3d(\n x=3.14,\n y=3.14,\n z=3.14,\n ),\n ),\n cmd_id=ModelingCmdId(\"\"),\n file_id=\"\",\n )\n },\n file_id=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ModelingOutcomes = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.modeling.cmd_batch.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1acceleration~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_acceleration_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitAccelerationConversion\nfrom kittycad.models.unit_acceleration_format import UnitAccelerationFormat\nfrom kittycad.types import Response\n\n\ndef example_get_acceleration_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitAccelerationConversion, Error]\n ] = get_acceleration_unit_conversion.sync(\n client=client,\n output_format=UnitAccelerationFormat.METERS_PER_SECOND_SQUARED,\n src_format=UnitAccelerationFormat.METERS_PER_SECOND_SQUARED,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitAccelerationConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_acceleration_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1solid-angle~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_solid_angle_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitSolidAngleConversion\nfrom kittycad.models.unit_solid_angle_format import UnitSolidAngleFormat\nfrom kittycad.types import Response\n\n\ndef example_get_solid_angle_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitSolidAngleConversion, Error]\n ] = get_solid_angle_unit_conversion.sync(\n client=client,\n output_format=UnitSolidAngleFormat.STERADIAN,\n src_format=UnitSolidAngleFormat.STERADIAN,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitSolidAngleConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_solid_angle_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1data~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_data_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitDataConversion\nfrom kittycad.models.unit_data_format import UnitDataFormat\nfrom kittycad.types import Response\n\n\ndef example_get_data_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitDataConversion, Error]\n ] = get_data_unit_conversion.sync(\n client=client,\n output_format=UnitDataFormat.BYTE,\n src_format=UnitDataFormat.BYTE,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitDataConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_data_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1user~1payment~1methods~1{id}/delete/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.payments import delete_payment_method_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_payment_method_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_payment_method_for_user.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.delete_payment_method_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1payment~1methods/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.payments import list_payment_methods_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, PaymentMethod\nfrom kittycad.types import Response\n\n\ndef example_list_payment_methods_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[List[PaymentMethod], Error]\n ] = list_payment_methods_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[PaymentMethod] = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.list_payment_methods_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1session~1{token}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.users import get_session_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Session\nfrom kittycad.types import Response\n\n\ndef example_get_session_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Session, Error]] = get_session_for_user.sync(\n client=client,\n token=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Session = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_session_for_user.html"}}, {"op": "add", "path": "/paths/~1file~1mass/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.file import create_file_mass\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileMass\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.types import Response\n\n\ndef example_create_file_mass():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileMass, Error]] = create_file_mass.sync(\n client=client,\n material_density=3.14,\n src_format=FileImportFormat.DAE,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileMass = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_mass.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1temperature~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_temperature_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitTemperatureConversion\nfrom kittycad.models.unit_temperature_format import UnitTemperatureFormat\nfrom kittycad.types import Response\n\n\ndef example_get_temperature_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitTemperatureConversion, Error]\n ] = get_temperature_unit_conversion.sync(\n client=client,\n output_format=UnitTemperatureFormat.KELVIN,\n src_format=UnitTemperatureFormat.KELVIN,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitTemperatureConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_temperature_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1async~1operations/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_calls import list_async_operations\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AsyncApiCallResultsPage, Error\nfrom kittycad.models.api_call_status import ApiCallStatus\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_async_operations():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[AsyncApiCallResultsPage, Error]\n ] = list_async_operations.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n status=ApiCallStatus.QUEUED,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AsyncApiCallResultsPage = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_async_operations.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1density~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_density_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitDensityConversion\nfrom kittycad.models.unit_density_format import UnitDensityFormat\nfrom kittycad.types import Response\n\n\ndef example_get_density_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitDensityConversion, Error]\n ] = get_density_unit_conversion.sync(\n client=client,\n output_format=UnitDensityFormat.KILOGRAMS_PER_CUBIC_METER,\n src_format=UnitDensityFormat.KILOGRAMS_PER_CUBIC_METER,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitDensityConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_density_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1file~1volume/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.file import create_file_volume\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileVolume\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.types import Response\n\n\ndef example_create_file_volume():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileVolume, Error]] = create_file_volume.sync(\n client=client,\n src_format=FileImportFormat.DAE,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileVolume = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_volume.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1power~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_power_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitPowerConversion\nfrom kittycad.models.unit_power_format import UnitPowerFormat\nfrom kittycad.types import Response\n\n\ndef example_get_power_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitPowerConversion, Error]\n ] = get_power_unit_conversion.sync(\n client=client,\n output_format=UnitPowerFormat.WATT,\n src_format=UnitPowerFormat.WATT,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitPowerConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_power_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1apps~1github~1callback/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.apps import apps_github_callback\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_apps_github_callback():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = apps_github_callback.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.apps.apps_github_callback.html"}}, {"op": "add", "path": "/paths/~1apps~1github~1consent/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.apps import apps_github_consent\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AppClientInfo, Error\nfrom kittycad.types import Response\n\n\ndef example_apps_github_consent():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[AppClientInfo, Error]] = apps_github_consent.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AppClientInfo = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.apps.apps_github_consent.html"}}, {"op": "add", "path": "/paths/~1user/delete/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.users import delete_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_user_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.delete_user_self.html"}}, {"op": "add", "path": "/paths/~1user/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.users import get_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.types import Response\n\n\ndef example_get_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = get_user_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_self.html"}}, {"op": "add", "path": "/paths/~1user/put/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.users import update_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.models.update_user import UpdateUser\nfrom kittycad.types import Response\n\n\ndef example_update_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = update_user_self.sync(\n client=client,\n body=UpdateUser(\n company=\"\",\n discord=\"\",\n first_name=\"\",\n github=\"\",\n last_name=\"\",\n phone=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.update_user_self.html"}}, {"op": "add", "path": "/paths/~1user~1payment/put/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.payments import update_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Customer, Error\nfrom kittycad.models.billing_info import BillingInfo\nfrom kittycad.types import Response\n\n\ndef example_update_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[Customer, Error]\n ] = update_payment_information_for_user.sync(\n client=client,\n body=BillingInfo(\n name=\"\",\n phone=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Customer = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.update_payment_information_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1payment/delete/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.payments import delete_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_payment_information_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.delete_payment_information_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1payment/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.payments import get_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Customer, Error\nfrom kittycad.types import Response\n\n\ndef example_get_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[Customer, Error]\n ] = get_payment_information_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Customer = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.get_payment_information_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1payment/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.payments import create_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Customer, Error\nfrom kittycad.models.billing_info import BillingInfo\nfrom kittycad.types import Response\n\n\ndef example_create_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[Customer, Error]\n ] = create_payment_information_for_user.sync(\n client=client,\n body=BillingInfo(\n name=\"\",\n phone=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Customer = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.create_payment_information_for_user.html"}}, {"op": "add", "path": "/paths/~1ai~1text-to-3d~1{output_format}/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.ai import create_text_to_3d\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Mesh\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.types import Response\n\n\ndef example_create_text_to_3d():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Mesh, Error]] = create_text_to_3d.sync(\n client=client,\n output_format=FileExportFormat.DAE,\n prompt=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Mesh = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.create_text_to_3d.html"}}, {"op": "add", "path": "/paths/~1users-extended/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.users import list_users_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUserResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_users_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ExtendedUserResultsPage, Error]\n ] = list_users_extended.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ExtendedUserResultsPage = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.list_users_extended.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1time~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_time_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitTimeConversion\nfrom kittycad.models.unit_time_format import UnitTimeFormat\nfrom kittycad.types import Response\n\n\ndef example_get_time_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitTimeConversion, Error]\n ] = get_time_unit_conversion.sync(\n client=client,\n output_format=UnitTimeFormat.SECOND,\n src_format=UnitTimeFormat.SECOND,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitTimeConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_time_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1auth~1email~1callback/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.hidden import auth_email_callback\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_auth_email_callback():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = auth_email_callback.sync(\n client=client,\n email=\"\",\n token=\"\",\n callback_url=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.auth_email_callback.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1magnetic-flux~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_magnetic_flux_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitMagneticFluxConversion\nfrom kittycad.models.unit_magnetic_flux_format import UnitMagneticFluxFormat\nfrom kittycad.types import Response\n\n\ndef example_get_magnetic_flux_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitMagneticFluxConversion, Error]\n ] = get_magnetic_flux_unit_conversion.sync(\n client=client,\n output_format=UnitMagneticFluxFormat.WEBER,\n src_format=UnitMagneticFluxFormat.WEBER,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitMagneticFluxConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_magnetic_flux_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1volume~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_volume_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitVolumeConversion\nfrom kittycad.models.unit_volume_format import UnitVolumeFormat\nfrom kittycad.types import Response\n\n\ndef example_get_volume_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitVolumeConversion, Error]\n ] = get_volume_unit_conversion.sync(\n client=client,\n output_format=UnitVolumeFormat.CUBIC_METER,\n src_format=UnitVolumeFormat.CUBIC_METER,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitVolumeConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_volume_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1radioactivity~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_radioactivity_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitRadioactivityConversion\nfrom kittycad.models.unit_radioactivity_format import UnitRadioactivityFormat\nfrom kittycad.types import Response\n\n\ndef example_get_radioactivity_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitRadioactivityConversion, Error]\n ] = get_radioactivity_unit_conversion.sync(\n client=client,\n output_format=UnitRadioactivityFormat.BECQUEREL,\n src_format=UnitRadioactivityFormat.BECQUEREL,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitRadioactivityConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_radioactivity_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1async~1operations~1{id}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_calls import get_async_operation\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import (\n Error,\n FileCenterOfMass,\n FileConversion,\n FileDensity,\n FileMass,\n FileSurfaceArea,\n FileVolume,\n)\nfrom kittycad.types import Response\n\n\ndef example_get_async_operation():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[\n FileConversion,\n FileCenterOfMass,\n FileMass,\n FileVolume,\n FileDensity,\n FileSurfaceArea,\n Error,\n ]\n ] = get_async_operation.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Union[\n FileConversion,\n FileCenterOfMass,\n FileMass,\n FileVolume,\n FileDensity,\n FileSurfaceArea,\n ] = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_async_operation.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1magnetic-field-strength~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_magnetic_field_strength_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitMagneticFieldStrengthConversion\nfrom kittycad.models.unit_magnetic_field_strength_format import (\n UnitMagneticFieldStrengthFormat,\n)\nfrom kittycad.types import Response\n\n\ndef example_get_magnetic_field_strength_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitMagneticFieldStrengthConversion, Error]\n ] = get_magnetic_field_strength_unit_conversion.sync(\n client=client,\n output_format=UnitMagneticFieldStrengthFormat.TESLA,\n src_format=UnitMagneticFieldStrengthFormat.TESLA,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitMagneticFieldStrengthConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_magnetic_field_strength_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1user~1onboarding/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.users import get_user_onboarding_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Onboarding\nfrom kittycad.types import Response\n\n\ndef example_get_user_onboarding_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Onboarding, Error]] = get_user_onboarding_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Onboarding = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_onboarding_self.html"}}, {"op": "add", "path": "/paths/~1file~1conversion~1{src_format}~1{output_format}/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.file import (\n create_file_conversion,\n create_file_conversion_with_base64_helper,\n)\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileConversion\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.types import Response\n\n\ndef example_create_file_conversion_with_base64_helper():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[FileConversion, Error]\n ] = create_file_conversion_with_base64_helper.sync(\n client=client,\n output_format=FileExportFormat.DAE,\n src_format=FileImportFormat.DAE,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_conversion_with_base64_helper.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1data-transfer-rate~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_data_transfer_rate_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitDataTransferRateConversion\nfrom kittycad.models.unit_data_transfer_rate_format import (\n UnitDataTransferRateFormat,\n)\nfrom kittycad.types import Response\n\n\ndef example_get_data_transfer_rate_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitDataTransferRateConversion, Error]\n ] = get_data_transfer_rate_unit_conversion.sync(\n client=client,\n output_format=UnitDataTransferRateFormat.BYTES_PER_SECOND,\n src_format=UnitDataTransferRateFormat.BYTES_PER_SECOND,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitDataTransferRateConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_data_transfer_rate_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1mass~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_mass_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitMassConversion\nfrom kittycad.models.unit_mass_format import UnitMassFormat\nfrom kittycad.types import Response\n\n\ndef example_get_mass_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitMassConversion, Error]\n ] = get_mass_unit_conversion.sync(\n client=client,\n output_format=UnitMassFormat.GRAM,\n src_format=UnitMassFormat.GRAM,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitMassConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_mass_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1user~1api-tokens~1{token}/delete/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_tokens import delete_api_token_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_api_token_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_api_token_for_user.sync(\n client=client,\n token=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.delete_api_token_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1api-tokens~1{token}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_tokens import get_api_token_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiToken, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_token_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiToken, Error]] = get_api_token_for_user.sync(\n client=client,\n token=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiToken = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.get_api_token_for_user.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1angle~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_angle_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitAngleConversion\nfrom kittycad.models.unit_angle_format import UnitAngleFormat\nfrom kittycad.types import Response\n\n\ndef example_get_angle_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitAngleConversion, Error]\n ] = get_angle_unit_conversion.sync(\n client=client,\n output_format=UnitAngleFormat.RADIAN,\n src_format=UnitAngleFormat.RADIAN,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitAngleConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_angle_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1user~1payment~1balance/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.payments import get_payment_balance_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import CustomerBalance, Error\nfrom kittycad.types import Response\n\n\ndef example_get_payment_balance_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[CustomerBalance, Error]\n ] = get_payment_balance_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: CustomerBalance = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.get_payment_balance_for_user.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1metric~1power~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_metric_power_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitMetricPowerConversion\nfrom kittycad.models.unit_metric_power import UnitMetricPower\nfrom kittycad.types import Response\n\n\ndef example_get_metric_power_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitMetricPowerConversion, Error]\n ] = get_metric_power_unit_conversion.sync(\n client=client,\n output_format=UnitMetricPower.ATTO,\n src_format=UnitMetricPower.ATTO,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitMetricPowerConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_metric_power_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1file~1center-of-mass/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.file import create_file_center_of_mass\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileCenterOfMass\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.types import Response\n\n\ndef example_create_file_center_of_mass():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[FileCenterOfMass, Error]\n ] = create_file_center_of_mass.sync(\n client=client,\n src_format=FileImportFormat.DAE,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileCenterOfMass = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_center_of_mass.html"}}, {"op": "add", "path": "/paths/~1user~1api-calls/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_calls import user_list_api_calls\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_user_list_api_calls():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = user_list_api_calls.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.user_list_api_calls.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1metric~1cubed~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_metric_power_cubed_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitMetricPowerCubedConversion\nfrom kittycad.models.unit_metric_power import UnitMetricPower\nfrom kittycad.types import Response\n\n\ndef example_get_metric_power_cubed_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitMetricPowerCubedConversion, Error]\n ] = get_metric_power_cubed_unit_conversion.sync(\n client=client,\n output_format=UnitMetricPower.ATTO,\n src_format=UnitMetricPower.ATTO,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitMetricPowerCubedConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_metric_power_cubed_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1user~1api-tokens/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_tokens import create_api_token_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiToken, Error\nfrom kittycad.types import Response\n\n\ndef example_create_api_token_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiToken, Error]] = create_api_token_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiToken = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.create_api_token_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1api-tokens/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_tokens import list_api_tokens_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiTokenResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_tokens_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiTokenResultsPage, Error]\n ] = list_api_tokens_for_user.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiTokenResultsPage = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.list_api_tokens_for_user.html"}}, {"op": "add", "path": "/paths/~1ai~1image-to-3d~1{input_format}~1{output_format}/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.ai import create_image_to_3d\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Mesh\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.models.image_type import ImageType\nfrom kittycad.types import Response\n\n\ndef example_create_image_to_3d():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Mesh, Error]] = create_image_to_3d.sync(\n client=client,\n input_format=ImageType.PNG,\n output_format=FileExportFormat.DAE,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Mesh = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.create_image_to_3d.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1length~1{src_format}~1{output_format}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_length_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitLengthConversion\nfrom kittycad.models.unit_length_format import UnitLengthFormat\nfrom kittycad.types import Response\n\n\ndef example_get_length_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitLengthConversion, Error]\n ] = get_length_unit_conversion.sync(\n client=client,\n output_format=UnitLengthFormat.METER,\n src_format=UnitLengthFormat.METER,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitLengthConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_length_unit_conversion.html"}}] \ No newline at end of file diff --git a/kittycad/api/drawing/__init__.py b/kittycad/api/drawing/__init__.py deleted file mode 100644 index c65c1413e..000000000 --- a/kittycad/api/drawing/__init__.py +++ /dev/null @@ -1 +0,0 @@ -""" Contains methods for accessing the drawing API paths: Drawing API for updating your 3D files using the KittyCAD engine. """ # noqa: E501 diff --git a/kittycad/api/file/create_file_center_of_mass.py b/kittycad/api/file/create_file_center_of_mass.py index 8f35d32c7..4a0ce2e09 100644 --- a/kittycad/api/file/create_file_center_of_mass.py +++ b/kittycad/api/file/create_file_center_of_mass.py @@ -86,7 +86,10 @@ def sync( *, client: Client, ) -> Optional[Union[FileCenterOfMass, Error]]: - """Get the center of mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. + """We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale. + Currently, this endpoint returns the cartesian co-ordinate in world space measure units. + In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. + Get the center of mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501 return sync_detailed( @@ -120,7 +123,10 @@ async def asyncio( *, client: Client, ) -> Optional[Union[FileCenterOfMass, Error]]: - """Get the center of mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. + """We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale. + Currently, this endpoint returns the cartesian co-ordinate in world space measure units. + In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. + Get the center of mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501 return ( diff --git a/kittycad/api/file/create_file_density.py b/kittycad/api/file/create_file_density.py index 9446c4363..25744b851 100644 --- a/kittycad/api/file/create_file_density.py +++ b/kittycad/api/file/create_file_density.py @@ -93,7 +93,10 @@ def sync( *, client: Client, ) -> Optional[Union[FileDensity, Error]]: - """Get the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. + """We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale. + Currently, this endpoint assumes if you are giving a material mass in a specific mass units, we return a density in mass unit per cubic measure unit. + In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. + Get the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501 return sync_detailed( @@ -131,7 +134,10 @@ async def asyncio( *, client: Client, ) -> Optional[Union[FileDensity, Error]]: - """Get the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. + """We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale. + Currently, this endpoint assumes if you are giving a material mass in a specific mass units, we return a density in mass unit per cubic measure unit. + In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. + Get the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501 return ( diff --git a/kittycad/api/file/create_file_mass.py b/kittycad/api/file/create_file_mass.py index a539bf787..591c21b7b 100644 --- a/kittycad/api/file/create_file_mass.py +++ b/kittycad/api/file/create_file_mass.py @@ -93,7 +93,10 @@ def sync( *, client: Client, ) -> Optional[Union[FileMass, Error]]: - """Get the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. + """We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale. + Currently, this endpoint assumes if you are giving a material density in a specific mass unit per cubic measure unit, we return a mass in mass units. The same mass units as passed in the material density. + In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. + Get the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501 return sync_detailed( @@ -131,7 +134,10 @@ async def asyncio( *, client: Client, ) -> Optional[Union[FileMass, Error]]: - """Get the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. + """We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale. + Currently, this endpoint assumes if you are giving a material density in a specific mass unit per cubic measure unit, we return a mass in mass units. The same mass units as passed in the material density. + In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. + Get the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501 return ( diff --git a/kittycad/api/file/create_file_surface_area.py b/kittycad/api/file/create_file_surface_area.py index f6ef09cf8..c93b1d788 100644 --- a/kittycad/api/file/create_file_surface_area.py +++ b/kittycad/api/file/create_file_surface_area.py @@ -86,7 +86,10 @@ def sync( *, client: Client, ) -> Optional[Union[FileSurfaceArea, Error]]: - """Get the surface area of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. + """We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale. + Currently, this endpoint returns the square measure units. + In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. + Get the surface area of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501 return sync_detailed( @@ -120,7 +123,10 @@ async def asyncio( *, client: Client, ) -> Optional[Union[FileSurfaceArea, Error]]: - """Get the surface area of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. + """We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale. + Currently, this endpoint returns the square measure units. + In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. + Get the surface area of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501 return ( diff --git a/kittycad/api/file/create_file_volume.py b/kittycad/api/file/create_file_volume.py index f90b2ae70..64d905e48 100644 --- a/kittycad/api/file/create_file_volume.py +++ b/kittycad/api/file/create_file_volume.py @@ -84,7 +84,10 @@ def sync( *, client: Client, ) -> Optional[Union[FileVolume, Error]]: - """Get the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. + """We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale. + Currently, this endpoint returns the cubic measure units. + In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. + Get the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501 return sync_detailed( @@ -118,7 +121,10 @@ async def asyncio( *, client: Client, ) -> Optional[Union[FileVolume, Error]]: - """Get the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. + """We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale. + Currently, this endpoint returns the cubic measure units. + In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. + Get the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501 return ( diff --git a/kittycad/api/modeling/__init__.py b/kittycad/api/modeling/__init__.py new file mode 100644 index 000000000..b4772b30f --- /dev/null +++ b/kittycad/api/modeling/__init__.py @@ -0,0 +1 @@ +""" Contains methods for accessing the modeling API paths: Modeling API for updating your 3D files using the KittyCAD engine. """ # noqa: E501 diff --git a/kittycad/api/drawing/cmd.py b/kittycad/api/modeling/cmd.py similarity index 91% rename from kittycad/api/drawing/cmd.py rename to kittycad/api/modeling/cmd.py index 988ca6d84..2bfcc4c45 100644 --- a/kittycad/api/drawing/cmd.py +++ b/kittycad/api/modeling/cmd.py @@ -3,17 +3,17 @@ from typing import Any, Dict, Optional, Union import httpx from ...client import Client -from ...models.drawing_cmd_req import DrawingCmdReq from ...models.error import Error +from ...models.modeling_cmd_req import ModelingCmdReq from ...types import Response def _get_kwargs( - body: DrawingCmdReq, + body: ModelingCmdReq, *, client: Client, ) -> Dict[str, Any]: - url = "{}/drawing/cmd".format(client.base_url) # noqa: E501 + url = "{}/modeling/cmd".format(client.base_url) # noqa: E501 headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -52,7 +52,7 @@ def _build_response( def sync_detailed( - body: DrawingCmdReq, + body: ModelingCmdReq, *, client: Client, ) -> Response[Optional[Union[dict, Error]]]: @@ -70,7 +70,7 @@ def sync_detailed( def sync( - body: DrawingCmdReq, + body: ModelingCmdReq, *, client: Client, ) -> Optional[Union[dict, Error]]: @@ -83,7 +83,7 @@ def sync( async def asyncio_detailed( - body: DrawingCmdReq, + body: ModelingCmdReq, *, client: Client, ) -> Response[Optional[Union[dict, Error]]]: @@ -99,7 +99,7 @@ async def asyncio_detailed( async def asyncio( - body: DrawingCmdReq, + body: ModelingCmdReq, *, client: Client, ) -> Optional[Union[dict, Error]]: diff --git a/kittycad/api/drawing/cmd_batch.py b/kittycad/api/modeling/cmd_batch.py similarity index 73% rename from kittycad/api/drawing/cmd_batch.py rename to kittycad/api/modeling/cmd_batch.py index bfbdf6a7c..dd61e858e 100644 --- a/kittycad/api/drawing/cmd_batch.py +++ b/kittycad/api/modeling/cmd_batch.py @@ -3,18 +3,18 @@ from typing import Any, Dict, Optional, Union import httpx from ...client import Client -from ...models.drawing_cmd_req_batch import DrawingCmdReqBatch -from ...models.drawing_outcomes import DrawingOutcomes from ...models.error import Error +from ...models.modeling_cmd_req_batch import ModelingCmdReqBatch +from ...models.modeling_outcomes import ModelingOutcomes from ...types import Response def _get_kwargs( - body: DrawingCmdReqBatch, + body: ModelingCmdReqBatch, *, client: Client, ) -> Dict[str, Any]: - url = "{}/drawing/cmd_batch".format(client.base_url) # noqa: E501 + url = "{}/modeling/cmd_batch".format(client.base_url) # noqa: E501 headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -30,9 +30,9 @@ def _get_kwargs( def _parse_response( *, response: httpx.Response -) -> Optional[Union[DrawingOutcomes, Error]]: +) -> Optional[Union[ModelingOutcomes, Error]]: if response.status_code == 200: - response_200 = DrawingOutcomes.from_dict(response.json()) + response_200 = ModelingOutcomes.from_dict(response.json()) return response_200 if response.status_code == 400: response_4XX = Error.from_dict(response.json()) @@ -45,7 +45,7 @@ def _parse_response( def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[DrawingOutcomes, Error]]]: +) -> Response[Optional[Union[ModelingOutcomes, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -55,10 +55,10 @@ def _build_response( def sync_detailed( - body: DrawingCmdReqBatch, + body: ModelingCmdReqBatch, *, client: Client, -) -> Response[Optional[Union[DrawingOutcomes, Error]]]: +) -> Response[Optional[Union[ModelingOutcomes, Error]]]: kwargs = _get_kwargs( body=body, client=client, @@ -73,10 +73,10 @@ def sync_detailed( def sync( - body: DrawingCmdReqBatch, + body: ModelingCmdReqBatch, *, client: Client, -) -> Optional[Union[DrawingOutcomes, Error]]: +) -> Optional[Union[ModelingOutcomes, Error]]: return sync_detailed( body=body, @@ -85,10 +85,10 @@ def sync( async def asyncio_detailed( - body: DrawingCmdReqBatch, + body: ModelingCmdReqBatch, *, client: Client, -) -> Response[Optional[Union[DrawingOutcomes, Error]]]: +) -> Response[Optional[Union[ModelingOutcomes, Error]]]: kwargs = _get_kwargs( body=body, client=client, @@ -101,10 +101,10 @@ async def asyncio_detailed( async def asyncio( - body: DrawingCmdReqBatch, + body: ModelingCmdReqBatch, *, client: Client, -) -> Optional[Union[DrawingOutcomes, Error]]: +) -> Optional[Union[ModelingOutcomes, Error]]: return ( await asyncio_detailed( diff --git a/kittycad/api/modeling/modeling_commands_ws.py b/kittycad/api/modeling/modeling_commands_ws.py new file mode 100644 index 000000000..bf9b25607 --- /dev/null +++ b/kittycad/api/modeling/modeling_commands_ws.py @@ -0,0 +1,90 @@ +from typing import Any, Dict + +import httpx + +from ...client import Client +from ...types import Response + + +def _get_kwargs( + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/ws/modeling/commands".format(client.base_url) # noqa: E501 + + headers: Dict[str, Any] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response): + return + + +def _build_response(*, response: httpx.Response) -> Response[Any]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + *, + client: Client, +) -> Response[Any]: + kwargs = _get_kwargs( + client=client, + ) + + response = httpx.get( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + *, + client: Client, +): + """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.""" # noqa: E501 + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: Client, +) -> Response[Any]: + kwargs = _get_kwargs( + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.get(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + *, + client: Client, +): + """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.""" # noqa: E501 + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/kittycad/examples_test.py b/kittycad/examples_test.py index 626d0fb41..5942211da 100644 --- a/kittycad/examples_test.py +++ b/kittycad/examples_test.py @@ -25,7 +25,6 @@ from kittycad.api.apps import ( apps_github_webhook, ) from kittycad.api.constant import get_physics_constant -from kittycad.api.drawing import cmd, cmd_batch from kittycad.api.executor import create_executor_term, create_file_execution from kittycad.api.file import ( create_file_center_of_mass, @@ -44,6 +43,7 @@ from kittycad.api.meta import ( get_schema, ping, ) +from kittycad.api.modeling import cmd, cmd_batch, modeling_commands_ws from kittycad.api.payments import ( create_payment_information_for_user, create_payment_intent_for_user, @@ -113,7 +113,6 @@ from kittycad.models import ( CodeOutput, Customer, CustomerBalance, - DrawingOutcomes, Error, ExtendedUser, ExtendedUserResultsPage, @@ -126,6 +125,7 @@ from kittycad.models import ( Invoice, Mesh, Metadata, + ModelingOutcomes, Onboarding, PaymentIntent, PaymentMethod, @@ -170,15 +170,16 @@ from kittycad.models.api_call_status import ApiCallStatus from kittycad.models.billing_info import BillingInfo from kittycad.models.code_language import CodeLanguage from kittycad.models.created_at_sort_mode import CreatedAtSortMode -from kittycad.models.drawing_cmd import DrawCircle -from kittycad.models.drawing_cmd_id import DrawingCmdId -from kittycad.models.drawing_cmd_req import DrawingCmdReq -from kittycad.models.drawing_cmd_req_batch import DrawingCmdReqBatch from kittycad.models.email_authentication_form import EmailAuthenticationForm from kittycad.models.file_export_format import FileExportFormat from kittycad.models.file_import_format import FileImportFormat from kittycad.models.image_type import ImageType +from kittycad.models.line3d import Line3d +from kittycad.models.modeling_cmd_id import ModelingCmdId +from kittycad.models.modeling_cmd_req import ModelingCmdReq +from kittycad.models.modeling_cmd_req_batch import ModelingCmdReqBatch from kittycad.models.physics_constant_name import PhysicsConstantName +from kittycad.models.point3d import Point3d from kittycad.models.unit_acceleration_format import UnitAccelerationFormat from kittycad.models.unit_angle_format import UnitAngleFormat from kittycad.models.unit_angular_velocity_format import UnitAngularVelocityFormat @@ -1022,189 +1023,6 @@ async def test_get_physics_constant_async(): ) -@pytest.mark.skip -def test_cmd(): - # Create our client. - client = ClientFromEnv() - - cmd.sync( - client=client, - body=DrawingCmdReq( - cmd=DrawCircle( - center=[ - 3.14, - 3.14, - ], - radius=3.14, - ), - cmd_id=DrawingCmdId(""), - file_id="", - ), - ) - - # OR if you need more info (e.g. status_code) - cmd.sync_detailed( - client=client, - body=DrawingCmdReq( - cmd=DrawCircle( - center=[ - 3.14, - 3.14, - ], - radius=3.14, - ), - cmd_id=DrawingCmdId(""), - file_id="", - ), - ) - - -# OR run async -@pytest.mark.asyncio -@pytest.mark.skip -async def test_cmd_async(): - # Create our client. - client = ClientFromEnv() - - await cmd.asyncio( - client=client, - body=DrawingCmdReq( - cmd=DrawCircle( - center=[ - 3.14, - 3.14, - ], - radius=3.14, - ), - cmd_id=DrawingCmdId(""), - file_id="", - ), - ) - - # OR run async with more info - await cmd.asyncio_detailed( - client=client, - body=DrawingCmdReq( - cmd=DrawCircle( - center=[ - 3.14, - 3.14, - ], - radius=3.14, - ), - cmd_id=DrawingCmdId(""), - file_id="", - ), - ) - - -@pytest.mark.skip -def test_cmd_batch(): - # Create our client. - client = ClientFromEnv() - - result: Optional[Union[DrawingOutcomes, Error]] = cmd_batch.sync( - client=client, - body=DrawingCmdReqBatch( - cmds={ - "": DrawingCmdReq( - cmd=DrawCircle( - center=[ - 3.14, - 3.14, - ], - radius=3.14, - ), - cmd_id=DrawingCmdId(""), - file_id="", - ) - }, - file_id="", - ), - ) - - if isinstance(result, Error) or result is None: - print(result) - raise Exception("Error in response") - - body: DrawingOutcomes = result - print(body) - - # OR if you need more info (e.g. status_code) - response: Response[ - Optional[Union[DrawingOutcomes, Error]] - ] = cmd_batch.sync_detailed( - client=client, - body=DrawingCmdReqBatch( - cmds={ - "": DrawingCmdReq( - cmd=DrawCircle( - center=[ - 3.14, - 3.14, - ], - radius=3.14, - ), - cmd_id=DrawingCmdId(""), - file_id="", - ) - }, - file_id="", - ), - ) - - -# OR run async -@pytest.mark.asyncio -@pytest.mark.skip -async def test_cmd_batch_async(): - # Create our client. - client = ClientFromEnv() - - result: Optional[Union[DrawingOutcomes, Error]] = await cmd_batch.asyncio( - client=client, - body=DrawingCmdReqBatch( - cmds={ - "": DrawingCmdReq( - cmd=DrawCircle( - center=[ - 3.14, - 3.14, - ], - radius=3.14, - ), - cmd_id=DrawingCmdId(""), - file_id="", - ) - }, - file_id="", - ), - ) - - # OR run async with more info - response: Response[ - Optional[Union[DrawingOutcomes, Error]] - ] = await cmd_batch.asyncio_detailed( - client=client, - body=DrawingCmdReqBatch( - cmds={ - "": DrawingCmdReq( - cmd=DrawCircle( - center=[ - 3.14, - 3.14, - ], - radius=3.14, - ), - cmd_id=DrawingCmdId(""), - file_id="", - ) - }, - file_id="", - ), - ) - - @pytest.mark.skip def test_create_file_center_of_mass(): # Create our client. @@ -1625,6 +1443,229 @@ async def test_logout_async(): ) +@pytest.mark.skip +def test_cmd(): + # Create our client. + client = ClientFromEnv() + + cmd.sync( + client=client, + body=ModelingCmdReq( + cmd=Line3d( + from_=Point3d( + x=3.14, + y=3.14, + z=3.14, + ), + to=Point3d( + x=3.14, + y=3.14, + z=3.14, + ), + ), + cmd_id=ModelingCmdId(""), + file_id="", + ), + ) + + # OR if you need more info (e.g. status_code) + cmd.sync_detailed( + client=client, + body=ModelingCmdReq( + cmd=Line3d( + from_=Point3d( + x=3.14, + y=3.14, + z=3.14, + ), + to=Point3d( + x=3.14, + y=3.14, + z=3.14, + ), + ), + cmd_id=ModelingCmdId(""), + file_id="", + ), + ) + + +# OR run async +@pytest.mark.asyncio +@pytest.mark.skip +async def test_cmd_async(): + # Create our client. + client = ClientFromEnv() + + await cmd.asyncio( + client=client, + body=ModelingCmdReq( + cmd=Line3d( + from_=Point3d( + x=3.14, + y=3.14, + z=3.14, + ), + to=Point3d( + x=3.14, + y=3.14, + z=3.14, + ), + ), + cmd_id=ModelingCmdId(""), + file_id="", + ), + ) + + # OR run async with more info + await cmd.asyncio_detailed( + client=client, + body=ModelingCmdReq( + cmd=Line3d( + from_=Point3d( + x=3.14, + y=3.14, + z=3.14, + ), + to=Point3d( + x=3.14, + y=3.14, + z=3.14, + ), + ), + cmd_id=ModelingCmdId(""), + file_id="", + ), + ) + + +@pytest.mark.skip +def test_cmd_batch(): + # Create our client. + client = ClientFromEnv() + + result: Optional[Union[ModelingOutcomes, Error]] = cmd_batch.sync( + client=client, + body=ModelingCmdReqBatch( + cmds={ + "": ModelingCmdReq( + cmd=Line3d( + from_=Point3d( + x=3.14, + y=3.14, + z=3.14, + ), + to=Point3d( + x=3.14, + y=3.14, + z=3.14, + ), + ), + cmd_id=ModelingCmdId(""), + file_id="", + ) + }, + file_id="", + ), + ) + + if isinstance(result, Error) or result is None: + print(result) + raise Exception("Error in response") + + body: ModelingOutcomes = result + print(body) + + # OR if you need more info (e.g. status_code) + response: Response[ + Optional[Union[ModelingOutcomes, Error]] + ] = cmd_batch.sync_detailed( + client=client, + body=ModelingCmdReqBatch( + cmds={ + "": ModelingCmdReq( + cmd=Line3d( + from_=Point3d( + x=3.14, + y=3.14, + z=3.14, + ), + to=Point3d( + x=3.14, + y=3.14, + z=3.14, + ), + ), + cmd_id=ModelingCmdId(""), + file_id="", + ) + }, + file_id="", + ), + ) + + +# OR run async +@pytest.mark.asyncio +@pytest.mark.skip +async def test_cmd_batch_async(): + # Create our client. + client = ClientFromEnv() + + result: Optional[Union[ModelingOutcomes, Error]] = await cmd_batch.asyncio( + client=client, + body=ModelingCmdReqBatch( + cmds={ + "": ModelingCmdReq( + cmd=Line3d( + from_=Point3d( + x=3.14, + y=3.14, + z=3.14, + ), + to=Point3d( + x=3.14, + y=3.14, + z=3.14, + ), + ), + cmd_id=ModelingCmdId(""), + file_id="", + ) + }, + file_id="", + ), + ) + + # OR run async with more info + response: Response[ + Optional[Union[ModelingOutcomes, Error]] + ] = await cmd_batch.asyncio_detailed( + client=client, + body=ModelingCmdReqBatch( + cmds={ + "": ModelingCmdReq( + cmd=Line3d( + from_=Point3d( + x=3.14, + y=3.14, + z=3.14, + ), + to=Point3d( + x=3.14, + y=3.14, + z=3.14, + ), + ), + cmd_id=ModelingCmdId(""), + file_id="", + ) + }, + file_id="", + ), + ) + + @pytest.mark.skip def test_get_openai_schema(): # Create our client. @@ -4792,3 +4833,35 @@ async def test_create_executor_term_async(): await create_executor_term.asyncio_detailed( client=client, ) + + +@pytest.mark.skip +def test_modeling_commands_ws(): + # Create our client. + client = ClientFromEnv() + + modeling_commands_ws.sync( + client=client, + ) + + # OR if you need more info (e.g. status_code) + modeling_commands_ws.sync_detailed( + client=client, + ) + + +# OR run async +@pytest.mark.asyncio +@pytest.mark.skip +async def test_modeling_commands_ws_async(): + # Create our client. + client = ClientFromEnv() + + await modeling_commands_ws.asyncio( + client=client, + ) + + # OR run async with more info + await modeling_commands_ws.asyncio_detailed( + client=client, + ) diff --git a/kittycad/models/__init__.py b/kittycad/models/__init__.py index 5514a0420..2e7f50c6d 100644 --- a/kittycad/models/__init__.py +++ b/kittycad/models/__init__.py @@ -36,13 +36,6 @@ from .device_access_token_request_form import DeviceAccessTokenRequestForm from .device_auth_request_form import DeviceAuthRequestForm from .device_auth_verify_params import DeviceAuthVerifyParams from .docker_system_info import DockerSystemInfo -from .drawing_cmd import DrawingCmd -from .drawing_cmd_id import DrawingCmdId -from .drawing_cmd_req import DrawingCmdReq -from .drawing_cmd_req_batch import DrawingCmdReqBatch -from .drawing_error import DrawingError -from .drawing_outcome import DrawingOutcome -from .drawing_outcomes import DrawingOutcomes from .email_authentication_form import EmailAuthenticationForm from .engine_metadata import EngineMetadata from .environment import Environment @@ -50,6 +43,7 @@ from .error import Error from .executor_metadata import ExecutorMetadata from .extended_user import ExtendedUser from .extended_user_results_page import ExtendedUserResultsPage +from .extrude import Extrude from .file_center_of_mass import FileCenterOfMass from .file_conversion import FileConversion from .file_density import FileDensity @@ -70,10 +64,18 @@ from .jetstream_api_stats import JetstreamApiStats from .jetstream_config import JetstreamConfig from .jetstream_stats import JetstreamStats from .leaf_node import LeafNode +from .line3d import Line3d from .mesh import Mesh from .meta_cluster_info import MetaClusterInfo from .metadata import Metadata from .method import Method +from .modeling_cmd import ModelingCmd +from .modeling_cmd_id import ModelingCmdId +from .modeling_cmd_req import ModelingCmdReq +from .modeling_cmd_req_batch import ModelingCmdReqBatch +from .modeling_error import ModelingError +from .modeling_outcome import ModelingOutcome +from .modeling_outcomes import ModelingOutcomes from .new_address import NewAddress from .o_auth2_client_info import OAuth2ClientInfo from .o_auth2_grant_type import OAuth2GrantType @@ -86,6 +88,8 @@ from .payment_method_type import PaymentMethodType from .physics_constant import PhysicsConstant from .physics_constant_name import PhysicsConstantName from .plugins_info import PluginsInfo +from .point2d import Point2d +from .point3d import Point3d from .point_e_metadata import PointEMetadata from .pong import Pong from .registry_service_config import RegistryServiceConfig diff --git a/kittycad/models/api_call_with_price.py b/kittycad/models/api_call_with_price.py index ba3a53b70..0bed627e3 100644 --- a/kittycad/models/api_call_with_price.py +++ b/kittycad/models/api_call_with_price.py @@ -5,6 +5,7 @@ import attr from dateutil.parser import isoparse from ..models.method import Method +from ..models.uuid import Uuid from ..types import UNSET, Unset S = TypeVar("S", bound="ApiCallWithPrice") @@ -147,7 +148,12 @@ class ApiCallWithPrice: endpoint = d.pop("endpoint", UNSET) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) ip_address = d.pop("ip_address", UNSET) @@ -183,7 +189,12 @@ class ApiCallWithPrice: stripe_invoice_item_id = d.pop("stripe_invoice_item_id", UNSET) - token = d.pop("token", UNSET) + _token = d.pop("token", UNSET) + token: Union[Unset, Uuid] + if isinstance(_token, Unset): + token = UNSET + else: + token = Uuid(_token) _updated_at = d.pop("updated_at", UNSET) updated_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/api_token.py b/kittycad/models/api_token.py index 6f7ad1472..33e052568 100644 --- a/kittycad/models/api_token.py +++ b/kittycad/models/api_token.py @@ -4,6 +4,7 @@ from typing import Any, Dict, List, Type, TypeVar, Union import attr from dateutil.parser import isoparse +from ..models.uuid import Uuid from ..types import UNSET, Unset G = TypeVar("G", bound="ApiToken") @@ -68,7 +69,12 @@ class ApiToken: is_valid = d.pop("is_valid", UNSET) - token = d.pop("token", UNSET) + _token = d.pop("token", UNSET) + token: Union[Unset, Uuid] + if isinstance(_token, Unset): + token = UNSET + else: + token = Uuid(_token) _updated_at = d.pop("updated_at", UNSET) updated_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/async_api_call.py b/kittycad/models/async_api_call.py index 29a1ad69b..5fd48571b 100644 --- a/kittycad/models/async_api_call.py +++ b/kittycad/models/async_api_call.py @@ -6,6 +6,7 @@ from dateutil.parser import isoparse from ..models.api_call_status import ApiCallStatus from ..models.async_api_call_type import AsyncApiCallType +from ..models.uuid import Uuid from ..types import UNSET, Unset Z = TypeVar("Z", bound="AsyncApiCall") @@ -103,7 +104,12 @@ class AsyncApiCall: error = d.pop("error", UNSET) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) input = d.pop("input", UNSET) output = d.pop("output", UNSET) diff --git a/kittycad/models/async_api_call_output.py b/kittycad/models/async_api_call_output.py index b20327beb..5fd7db465 100644 --- a/kittycad/models/async_api_call_output.py +++ b/kittycad/models/async_api_call_output.py @@ -7,6 +7,7 @@ from dateutil.parser import isoparse from ..models.api_call_status import ApiCallStatus from ..models.file_export_format import FileExportFormat from ..models.file_import_format import FileImportFormat +from ..models.uuid import Uuid from ..types import UNSET, Unset F = TypeVar("F", bound="FileConversion") @@ -105,7 +106,12 @@ class FileConversion: error = d.pop("error", UNSET) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) output = d.pop("output", UNSET) @@ -278,7 +284,12 @@ class FileCenterOfMass: error = d.pop("error", UNSET) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) _src_format = d.pop("src_format", UNSET) src_format: Union[Unset, FileImportFormat] @@ -441,7 +452,12 @@ class FileMass: error = d.pop("error", UNSET) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) mass = d.pop("mass", UNSET) @@ -605,7 +621,12 @@ class FileVolume: error = d.pop("error", UNSET) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) _src_format = d.pop("src_format", UNSET) src_format: Union[Unset, FileImportFormat] @@ -772,7 +793,12 @@ class FileDensity: error = d.pop("error", UNSET) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) material_mass = d.pop("material_mass", UNSET) @@ -934,7 +960,12 @@ class FileSurfaceArea: error = d.pop("error", UNSET) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) _src_format = d.pop("src_format", UNSET) src_format: Union[Unset, FileImportFormat] diff --git a/kittycad/models/customer_balance.py b/kittycad/models/customer_balance.py index 781746d46..9fe005129 100644 --- a/kittycad/models/customer_balance.py +++ b/kittycad/models/customer_balance.py @@ -4,6 +4,7 @@ from typing import Any, Dict, List, Type, TypeVar, Union import attr from dateutil.parser import isoparse +from ..models.uuid import Uuid from ..types import UNSET, Unset N = TypeVar("N", bound="CustomerBalance") @@ -72,7 +73,12 @@ class CustomerBalance: else: created_at = isoparse(_created_at) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) monthly_credits_remaining = d.pop("monthly_credits_remaining", UNSET) diff --git a/kittycad/models/drawing_cmd.py b/kittycad/models/drawing_cmd.py deleted file mode 100644 index 07a1ff9be..000000000 --- a/kittycad/models/drawing_cmd.py +++ /dev/null @@ -1,128 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast - -import attr - -from ..models.drawing_cmd_id import DrawingCmdId -from ..types import UNSET, Unset - -J = TypeVar("J", bound="DrawCircle") - - -@attr.s(auto_attribs=True) -class DrawCircle: - center: Union[Unset, List[float]] = UNSET - radius: Union[Unset, float] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - center: Union[Unset, List[float]] = UNSET - if not isinstance(self.center, Unset): - center = self.center - radius = self.radius - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if center is not UNSET: - field_dict["center"] = center - if radius is not UNSET: - field_dict["radius"] = radius - - return field_dict - - @classmethod - def from_dict(cls: Type[J], src_dict: Dict[str, Any]) -> J: - d = src_dict.copy() - center = cast(List[float], d.pop("center", UNSET)) - - radius = d.pop("radius", UNSET) - - draw_circle = cls( - center=center, - radius=radius, - ) - - draw_circle.additional_properties = d - return draw_circle - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties - - -V = TypeVar("V", bound="Extrude") - - -@attr.s(auto_attribs=True) -class Extrude: - distance: Union[Unset, float] = UNSET - sketch: Union[Unset, DrawingCmdId] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - distance = self.distance - if not isinstance(self.sketch, Unset): - sketch = self.sketch - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if distance is not UNSET: - field_dict["distance"] = distance - if sketch is not UNSET: - field_dict["sketch"] = sketch - - return field_dict - - @classmethod - def from_dict(cls: Type[V], src_dict: Dict[str, Any]) -> V: - d = src_dict.copy() - distance = d.pop("distance", UNSET) - - _sketch = d.pop("sketch", UNSET) - sketch: Union[Unset, DrawingCmdId] - if isinstance(_sketch, Unset): - sketch = UNSET - else: - sketch = DrawingCmdId(_sketch) - - extrude = cls( - distance=distance, - sketch=sketch, - ) - - extrude.additional_properties = d - return extrude - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties - - -DrawingCmd = Union[DrawCircle, Extrude] diff --git a/kittycad/models/email_authentication_form.py b/kittycad/models/email_authentication_form.py index 0dc03a6f3..8c9243052 100644 --- a/kittycad/models/email_authentication_form.py +++ b/kittycad/models/email_authentication_form.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -M = TypeVar("M", bound="EmailAuthenticationForm") +J = TypeVar("J", bound="EmailAuthenticationForm") @attr.s(auto_attribs=True) @@ -31,7 +31,7 @@ class EmailAuthenticationForm: return field_dict @classmethod - def from_dict(cls: Type[M], src_dict: Dict[str, Any]) -> M: + def from_dict(cls: Type[J], src_dict: Dict[str, Any]) -> J: d = src_dict.copy() callback_url = d.pop("callback_url", UNSET) diff --git a/kittycad/models/engine_metadata.py b/kittycad/models/engine_metadata.py index bea3db708..34f92f897 100644 --- a/kittycad/models/engine_metadata.py +++ b/kittycad/models/engine_metadata.py @@ -8,7 +8,7 @@ from ..models.environment import Environment from ..models.file_system_metadata import FileSystemMetadata from ..types import UNSET, Unset -B = TypeVar("B", bound="EngineMetadata") +V = TypeVar("V", bound="EngineMetadata") @attr.s(auto_attribs=True) @@ -57,7 +57,7 @@ class EngineMetadata: return field_dict @classmethod - def from_dict(cls: Type[B], src_dict: Dict[str, Any]) -> B: + def from_dict(cls: Type[V], src_dict: Dict[str, Any]) -> V: d = src_dict.copy() async_jobs_running = d.pop("async_jobs_running", UNSET) diff --git a/kittycad/models/environment.py b/kittycad/models/environment.py index e3e39bf38..11163148f 100644 --- a/kittycad/models/environment.py +++ b/kittycad/models/environment.py @@ -4,8 +4,11 @@ from enum import Enum class Environment(str, Enum): """The environment the server is running in.""" # noqa: E501 + """# The development environment. This is for running locally. """ # noqa: E501 DEVELOPMENT = "DEVELOPMENT" + """# The preview environment. This is when PRs are created and a service is deployed for testing. """ # noqa: E501 PREVIEW = "PREVIEW" + """# The production environment. """ # noqa: E501 PRODUCTION = "PRODUCTION" def __str__(self) -> str: diff --git a/kittycad/models/error.py b/kittycad/models/error.py index 4697ecd26..a36a5be62 100644 --- a/kittycad/models/error.py +++ b/kittycad/models/error.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -S = TypeVar("S", bound="Error") +L = TypeVar("L", bound="Error") @attr.s(auto_attribs=True) @@ -35,7 +35,7 @@ class Error: return field_dict @classmethod - def from_dict(cls: Type[S], src_dict: Dict[str, Any]) -> S: + def from_dict(cls: Type[L], src_dict: Dict[str, Any]) -> L: d = src_dict.copy() error_code = d.pop("error_code", UNSET) diff --git a/kittycad/models/executor_metadata.py b/kittycad/models/executor_metadata.py index 371e16d16..fa64ed40b 100644 --- a/kittycad/models/executor_metadata.py +++ b/kittycad/models/executor_metadata.py @@ -6,7 +6,7 @@ from ..models.docker_system_info import DockerSystemInfo from ..models.environment import Environment from ..types import UNSET, Unset -A = TypeVar("A", bound="ExecutorMetadata") +E = TypeVar("E", bound="ExecutorMetadata") @attr.s(auto_attribs=True) @@ -41,7 +41,7 @@ class ExecutorMetadata: return field_dict @classmethod - def from_dict(cls: Type[A], src_dict: Dict[str, Any]) -> A: + def from_dict(cls: Type[E], src_dict: Dict[str, Any]) -> E: d = src_dict.copy() _docker_info = d.pop("docker_info", UNSET) docker_info: Union[Unset, DockerSystemInfo] diff --git a/kittycad/models/extended_user.py b/kittycad/models/extended_user.py index 88fbb8005..5aa443778 100644 --- a/kittycad/models/extended_user.py +++ b/kittycad/models/extended_user.py @@ -6,7 +6,7 @@ from dateutil.parser import isoparse from ..types import UNSET, Unset -H = TypeVar("H", bound="ExtendedUser") +Y = TypeVar("Y", bound="ExtendedUser") @attr.s(auto_attribs=True) @@ -97,7 +97,7 @@ class ExtendedUser: return field_dict @classmethod - def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H: + def from_dict(cls: Type[Y], src_dict: Dict[str, Any]) -> Y: d = src_dict.copy() company = d.pop("company", UNSET) diff --git a/kittycad/models/extended_user_results_page.py b/kittycad/models/extended_user_results_page.py index 734eb27c6..f1e371f2e 100644 --- a/kittycad/models/extended_user_results_page.py +++ b/kittycad/models/extended_user_results_page.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -E = TypeVar("E", bound="ExtendedUserResultsPage") +H = TypeVar("H", bound="ExtendedUserResultsPage") @attr.s(auto_attribs=True) @@ -37,7 +37,7 @@ class ExtendedUserResultsPage: return field_dict @classmethod - def from_dict(cls: Type[E], src_dict: Dict[str, Any]) -> E: + def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H: d = src_dict.copy() from ..models.extended_user import ExtendedUser diff --git a/kittycad/models/extrude.py b/kittycad/models/extrude.py new file mode 100644 index 000000000..f839c7920 --- /dev/null +++ b/kittycad/models/extrude.py @@ -0,0 +1,69 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.modeling_cmd_id import ModelingCmdId +from ..types import UNSET, Unset + +T = TypeVar("T", bound="Extrude") + + +@attr.s(auto_attribs=True) +class Extrude: + """Command for extruding a solid.""" # noqa: E501 + + distance: Union[Unset, float] = UNSET + target: Union[Unset, ModelingCmdId] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + distance = self.distance + if not isinstance(self.target, Unset): + target = self.target + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if distance is not UNSET: + field_dict["distance"] = distance + if target is not UNSET: + field_dict["target"] = target + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + distance = d.pop("distance", UNSET) + + _target = d.pop("target", UNSET) + target: Union[Unset, ModelingCmdId] + if isinstance(_target, Unset): + target = UNSET + else: + target = ModelingCmdId(_target) + + extrude = cls( + distance=distance, + target=target, + ) + + extrude.additional_properties = d + return extrude + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/file_center_of_mass.py b/kittycad/models/file_center_of_mass.py index e1cbadb4b..1c63e4850 100644 --- a/kittycad/models/file_center_of_mass.py +++ b/kittycad/models/file_center_of_mass.py @@ -6,9 +6,10 @@ from dateutil.parser import isoparse from ..models.api_call_status import ApiCallStatus from ..models.file_import_format import FileImportFormat +from ..models.uuid import Uuid from ..types import UNSET, Unset -G = TypeVar("G", bound="FileCenterOfMass") +M = TypeVar("M", bound="FileCenterOfMass") @attr.s(auto_attribs=True) @@ -79,7 +80,7 @@ class FileCenterOfMass: return field_dict @classmethod - def from_dict(cls: Type[G], src_dict: Dict[str, Any]) -> G: + def from_dict(cls: Type[M], src_dict: Dict[str, Any]) -> M: d = src_dict.copy() center_of_mass = cast(List[float], d.pop("center_of_mass", UNSET)) @@ -99,7 +100,12 @@ class FileCenterOfMass: error = d.pop("error", UNSET) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) _src_format = d.pop("src_format", UNSET) src_format: Union[Unset, FileImportFormat] diff --git a/kittycad/models/file_conversion.py b/kittycad/models/file_conversion.py index 73f586634..6b0102f04 100644 --- a/kittycad/models/file_conversion.py +++ b/kittycad/models/file_conversion.py @@ -7,9 +7,10 @@ from dateutil.parser import isoparse from ..models.api_call_status import ApiCallStatus from ..models.file_export_format import FileExportFormat from ..models.file_import_format import FileImportFormat +from ..models.uuid import Uuid from ..types import UNSET, Unset -J = TypeVar("J", bound="FileConversion") +B = TypeVar("B", bound="FileConversion") @attr.s(auto_attribs=True) @@ -83,7 +84,7 @@ class FileConversion: return field_dict @classmethod - def from_dict(cls: Type[J], src_dict: Dict[str, Any]) -> J: + def from_dict(cls: Type[B], src_dict: Dict[str, Any]) -> B: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -101,7 +102,12 @@ class FileConversion: error = d.pop("error", UNSET) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) output = d.pop("output", UNSET) diff --git a/kittycad/models/file_density.py b/kittycad/models/file_density.py index a0e609914..caeac1347 100644 --- a/kittycad/models/file_density.py +++ b/kittycad/models/file_density.py @@ -6,9 +6,10 @@ from dateutil.parser import isoparse from ..models.api_call_status import ApiCallStatus from ..models.file_import_format import FileImportFormat +from ..models.uuid import Uuid from ..types import UNSET, Unset -R = TypeVar("R", bound="FileDensity") +S = TypeVar("S", bound="FileDensity") @attr.s(auto_attribs=True) @@ -81,7 +82,7 @@ class FileDensity: return field_dict @classmethod - def from_dict(cls: Type[R], src_dict: Dict[str, Any]) -> R: + def from_dict(cls: Type[S], src_dict: Dict[str, Any]) -> S: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -101,7 +102,12 @@ class FileDensity: error = d.pop("error", UNSET) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) material_mass = d.pop("material_mass", UNSET) diff --git a/kittycad/models/file_mass.py b/kittycad/models/file_mass.py index c0e21bfc7..77af35aa4 100644 --- a/kittycad/models/file_mass.py +++ b/kittycad/models/file_mass.py @@ -6,9 +6,10 @@ from dateutil.parser import isoparse from ..models.api_call_status import ApiCallStatus from ..models.file_import_format import FileImportFormat +from ..models.uuid import Uuid from ..types import UNSET, Unset -L = TypeVar("L", bound="FileMass") +A = TypeVar("A", bound="FileMass") @attr.s(auto_attribs=True) @@ -81,7 +82,7 @@ class FileMass: return field_dict @classmethod - def from_dict(cls: Type[L], src_dict: Dict[str, Any]) -> L: + def from_dict(cls: Type[A], src_dict: Dict[str, Any]) -> A: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -99,7 +100,12 @@ class FileMass: error = d.pop("error", UNSET) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) mass = d.pop("mass", UNSET) diff --git a/kittycad/models/file_surface_area.py b/kittycad/models/file_surface_area.py index dd82b5fff..8ec4ef8d9 100644 --- a/kittycad/models/file_surface_area.py +++ b/kittycad/models/file_surface_area.py @@ -6,9 +6,10 @@ from dateutil.parser import isoparse from ..models.api_call_status import ApiCallStatus from ..models.file_import_format import FileImportFormat +from ..models.uuid import Uuid from ..types import UNSET, Unset -Y = TypeVar("Y", bound="FileSurfaceArea") +H = TypeVar("H", bound="FileSurfaceArea") @attr.s(auto_attribs=True) @@ -77,7 +78,7 @@ class FileSurfaceArea: return field_dict @classmethod - def from_dict(cls: Type[Y], src_dict: Dict[str, Any]) -> Y: + def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -95,7 +96,12 @@ class FileSurfaceArea: error = d.pop("error", UNSET) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) _src_format = d.pop("src_format", UNSET) src_format: Union[Unset, FileImportFormat] diff --git a/kittycad/models/file_system_metadata.py b/kittycad/models/file_system_metadata.py index 4243b3dc1..d8db98e71 100644 --- a/kittycad/models/file_system_metadata.py +++ b/kittycad/models/file_system_metadata.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -H = TypeVar("H", bound="FileSystemMetadata") +E = TypeVar("E", bound="FileSystemMetadata") @attr.s(auto_attribs=True) @@ -29,7 +29,7 @@ class FileSystemMetadata: return field_dict @classmethod - def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H: + def from_dict(cls: Type[E], src_dict: Dict[str, Any]) -> E: d = src_dict.copy() ok = d.pop("ok", UNSET) diff --git a/kittycad/models/file_volume.py b/kittycad/models/file_volume.py index 8b3e2eee6..df7168d3d 100644 --- a/kittycad/models/file_volume.py +++ b/kittycad/models/file_volume.py @@ -6,9 +6,10 @@ from dateutil.parser import isoparse from ..models.api_call_status import ApiCallStatus from ..models.file_import_format import FileImportFormat +from ..models.uuid import Uuid from ..types import UNSET, Unset -K = TypeVar("K", bound="FileVolume") +G = TypeVar("G", bound="FileVolume") @attr.s(auto_attribs=True) @@ -77,7 +78,7 @@ class FileVolume: return field_dict @classmethod - def from_dict(cls: Type[K], src_dict: Dict[str, Any]) -> K: + def from_dict(cls: Type[G], src_dict: Dict[str, Any]) -> G: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -95,7 +96,12 @@ class FileVolume: error = d.pop("error", UNSET) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) _src_format = d.pop("src_format", UNSET) src_format: Union[Unset, FileImportFormat] diff --git a/kittycad/models/gateway.py b/kittycad/models/gateway.py index 0355b56db..81180b479 100644 --- a/kittycad/models/gateway.py +++ b/kittycad/models/gateway.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -V = TypeVar("V", bound="Gateway") +J = TypeVar("J", bound="Gateway") @attr.s(auto_attribs=True) @@ -43,7 +43,7 @@ class Gateway: return field_dict @classmethod - def from_dict(cls: Type[V], src_dict: Dict[str, Any]) -> V: + def from_dict(cls: Type[J], src_dict: Dict[str, Any]) -> J: d = src_dict.copy() auth_timeout = d.pop("auth_timeout", UNSET) diff --git a/kittycad/models/invoice.py b/kittycad/models/invoice.py index ed4fdb66a..8ae8d9f99 100644 --- a/kittycad/models/invoice.py +++ b/kittycad/models/invoice.py @@ -8,7 +8,7 @@ from ..models.currency import Currency from ..models.invoice_status import InvoiceStatus from ..types import UNSET, Unset -N = TypeVar("N", bound="Invoice") +L = TypeVar("L", bound="Invoice") @attr.s(auto_attribs=True) @@ -133,7 +133,7 @@ class Invoice: return field_dict @classmethod - def from_dict(cls: Type[N], src_dict: Dict[str, Any]) -> N: + def from_dict(cls: Type[L], src_dict: Dict[str, Any]) -> L: d = src_dict.copy() amount_due = d.pop("amount_due", UNSET) diff --git a/kittycad/models/invoice_line_item.py b/kittycad/models/invoice_line_item.py index fbe9197b8..232488edb 100644 --- a/kittycad/models/invoice_line_item.py +++ b/kittycad/models/invoice_line_item.py @@ -5,7 +5,7 @@ import attr from ..models.currency import Currency from ..types import UNSET, Unset -P = TypeVar("P", bound="InvoiceLineItem") +Y = TypeVar("Y", bound="InvoiceLineItem") @attr.s(auto_attribs=True) @@ -49,7 +49,7 @@ class InvoiceLineItem: return field_dict @classmethod - def from_dict(cls: Type[P], src_dict: Dict[str, Any]) -> P: + def from_dict(cls: Type[Y], src_dict: Dict[str, Any]) -> Y: d = src_dict.copy() amount = d.pop("amount", UNSET) diff --git a/kittycad/models/jetstream.py b/kittycad/models/jetstream.py index 29765540a..c9457c167 100644 --- a/kittycad/models/jetstream.py +++ b/kittycad/models/jetstream.py @@ -7,7 +7,7 @@ from ..models.jetstream_stats import JetstreamStats from ..models.meta_cluster_info import MetaClusterInfo from ..types import UNSET, Unset -C = TypeVar("C", bound="Jetstream") +H = TypeVar("H", bound="Jetstream") @attr.s(auto_attribs=True) @@ -41,7 +41,7 @@ class Jetstream: return field_dict @classmethod - def from_dict(cls: Type[C], src_dict: Dict[str, Any]) -> C: + def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H: d = src_dict.copy() _config = d.pop("config", UNSET) config: Union[Unset, JetstreamConfig] diff --git a/kittycad/models/jetstream_api_stats.py b/kittycad/models/jetstream_api_stats.py index be29a58c2..cf6f02dbf 100644 --- a/kittycad/models/jetstream_api_stats.py +++ b/kittycad/models/jetstream_api_stats.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -U = TypeVar("U", bound="JetstreamApiStats") +K = TypeVar("K", bound="JetstreamApiStats") @attr.s(auto_attribs=True) @@ -35,7 +35,7 @@ class JetstreamApiStats: return field_dict @classmethod - def from_dict(cls: Type[U], src_dict: Dict[str, Any]) -> U: + def from_dict(cls: Type[K], src_dict: Dict[str, Any]) -> K: d = src_dict.copy() errors = d.pop("errors", UNSET) diff --git a/kittycad/models/jetstream_config.py b/kittycad/models/jetstream_config.py index 7c99b9207..9d3bb8204 100644 --- a/kittycad/models/jetstream_config.py +++ b/kittycad/models/jetstream_config.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -S = TypeVar("S", bound="JetstreamConfig") +V = TypeVar("V", bound="JetstreamConfig") @attr.s(auto_attribs=True) @@ -39,7 +39,7 @@ class JetstreamConfig: return field_dict @classmethod - def from_dict(cls: Type[S], src_dict: Dict[str, Any]) -> S: + def from_dict(cls: Type[V], src_dict: Dict[str, Any]) -> V: d = src_dict.copy() domain = d.pop("domain", UNSET) diff --git a/kittycad/models/jetstream_stats.py b/kittycad/models/jetstream_stats.py index 5b4739222..57fa96d6f 100644 --- a/kittycad/models/jetstream_stats.py +++ b/kittycad/models/jetstream_stats.py @@ -5,7 +5,7 @@ import attr from ..models.jetstream_api_stats import JetstreamApiStats from ..types import UNSET, Unset -K = TypeVar("K", bound="JetstreamStats") +R = TypeVar("R", bound="JetstreamStats") @attr.s(auto_attribs=True) @@ -53,7 +53,7 @@ class JetstreamStats: return field_dict @classmethod - def from_dict(cls: Type[K], src_dict: Dict[str, Any]) -> K: + def from_dict(cls: Type[R], src_dict: Dict[str, Any]) -> R: d = src_dict.copy() accounts = d.pop("accounts", UNSET) diff --git a/kittycad/models/leaf_node.py b/kittycad/models/leaf_node.py index d295817f6..b4257ecd6 100644 --- a/kittycad/models/leaf_node.py +++ b/kittycad/models/leaf_node.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -Q = TypeVar("Q", bound="LeafNode") +N = TypeVar("N", bound="LeafNode") @attr.s(auto_attribs=True) @@ -39,7 +39,7 @@ class LeafNode: return field_dict @classmethod - def from_dict(cls: Type[Q], src_dict: Dict[str, Any]) -> Q: + def from_dict(cls: Type[N], src_dict: Dict[str, Any]) -> N: d = src_dict.copy() auth_timeout = d.pop("auth_timeout", UNSET) diff --git a/kittycad/models/line3d.py b/kittycad/models/line3d.py new file mode 100644 index 000000000..c32ed8545 --- /dev/null +++ b/kittycad/models/line3d.py @@ -0,0 +1,75 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.point3d import Point3d +from ..types import UNSET, Unset + +P = TypeVar("P", bound="Line3d") + + +@attr.s(auto_attribs=True) +class Line3d: + """Command for adding a line.""" # noqa: E501 + + from_: Union[Unset, Point3d] = UNSET + to: Union[Unset, Point3d] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.from_, Unset): + from_ = self.from_ + if not isinstance(self.to, Unset): + to = self.to + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if from_ is not UNSET: + field_dict["from"] = from_ + if to is not UNSET: + field_dict["to"] = to + + return field_dict + + @classmethod + def from_dict(cls: Type[P], src_dict: Dict[str, Any]) -> P: + d = src_dict.copy() + _from_ = d.pop("from", UNSET) + from_: Union[Unset, Point3d] + if isinstance(_from_, Unset): + from_ = UNSET + else: + from_ = Point3d(_from_) + + _to = d.pop("to", UNSET) + to: Union[Unset, Point3d] + if isinstance(_to, Unset): + to = UNSET + else: + to = Point3d(_to) + + line3d = cls( + from_=from_, + to=to, + ) + + line3d.additional_properties = d + return line3d + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/mesh.py b/kittycad/models/mesh.py index 0bb3d373d..833196892 100644 --- a/kittycad/models/mesh.py +++ b/kittycad/models/mesh.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -F = TypeVar("F", bound="Mesh") +C = TypeVar("C", bound="Mesh") @attr.s(auto_attribs=True) @@ -25,7 +25,7 @@ class Mesh: return field_dict @classmethod - def from_dict(cls: Type[F], src_dict: Dict[str, Any]) -> F: + def from_dict(cls: Type[C], src_dict: Dict[str, Any]) -> C: d = src_dict.copy() mesh = d.pop("mesh", UNSET) diff --git a/kittycad/models/meta_cluster_info.py b/kittycad/models/meta_cluster_info.py index ae2d40979..819d0a67a 100644 --- a/kittycad/models/meta_cluster_info.py +++ b/kittycad/models/meta_cluster_info.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -H = TypeVar("H", bound="MetaClusterInfo") +U = TypeVar("U", bound="MetaClusterInfo") @attr.s(auto_attribs=True) @@ -35,7 +35,7 @@ class MetaClusterInfo: return field_dict @classmethod - def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H: + def from_dict(cls: Type[U], src_dict: Dict[str, Any]) -> U: d = src_dict.copy() cluster_size = d.pop("cluster_size", UNSET) diff --git a/kittycad/models/metadata.py b/kittycad/models/metadata.py index 95f4b579d..804e48155 100644 --- a/kittycad/models/metadata.py +++ b/kittycad/models/metadata.py @@ -11,7 +11,7 @@ from ..models.file_system_metadata import FileSystemMetadata from ..models.point_e_metadata import PointEMetadata from ..types import UNSET, Unset -N = TypeVar("N", bound="Metadata") +S = TypeVar("S", bound="Metadata") @attr.s(auto_attribs=True) @@ -71,7 +71,7 @@ class Metadata: return field_dict @classmethod - def from_dict(cls: Type[N], src_dict: Dict[str, Any]) -> N: + def from_dict(cls: Type[S], src_dict: Dict[str, Any]) -> S: d = src_dict.copy() _cache = d.pop("cache", UNSET) cache: Union[Unset, CacheMetadata] diff --git a/kittycad/models/modeling_cmd.py b/kittycad/models/modeling_cmd.py new file mode 100644 index 000000000..4fa30945d --- /dev/null +++ b/kittycad/models/modeling_cmd.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.point2d import Point2d +from ..types import UNSET, Unset +from .extrude import Extrude +from .line3d import Line3d + +AddLine = Line3d + + +K = TypeVar("K", bound="SelectionClick") + + +@attr.s(auto_attribs=True) +class SelectionClick: + at: Union[Unset, Point2d] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.at, Unset): + at = self.at + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if at is not UNSET: + field_dict["at"] = at + + return field_dict + + @classmethod + def from_dict(cls: Type[K], src_dict: Dict[str, Any]) -> K: + d = src_dict.copy() + _at = d.pop("at", UNSET) + at: Union[Unset, Point2d] + if isinstance(_at, Unset): + at = UNSET + else: + at = Point2d(_at) + + selection_click = cls( + at=at, + ) + + selection_click.additional_properties = d + return selection_click + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +ModelingCmd = Union[AddLine, Extrude, SelectionClick] diff --git a/kittycad/models/drawing_cmd_id.py b/kittycad/models/modeling_cmd_id.py similarity index 65% rename from kittycad/models/drawing_cmd_id.py rename to kittycad/models/modeling_cmd_id.py index b799bacca..a2fce8cff 100644 --- a/kittycad/models/drawing_cmd_id.py +++ b/kittycad/models/modeling_cmd_id.py @@ -1,3 +1,3 @@ -class DrawingCmdId(str): +class ModelingCmdId(str): def __str__(self) -> str: return self diff --git a/kittycad/models/drawing_cmd_req.py b/kittycad/models/modeling_cmd_req.py similarity index 75% rename from kittycad/models/drawing_cmd_req.py rename to kittycad/models/modeling_cmd_req.py index e5cbb8843..96ff73c13 100644 --- a/kittycad/models/drawing_cmd_req.py +++ b/kittycad/models/modeling_cmd_req.py @@ -2,19 +2,19 @@ from typing import Any, Dict, List, Type, TypeVar, Union import attr -from ..models.drawing_cmd import DrawingCmd -from ..models.drawing_cmd_id import DrawingCmdId +from ..models.modeling_cmd import ModelingCmd +from ..models.modeling_cmd_id import ModelingCmdId from ..types import UNSET, Unset -L = TypeVar("L", bound="DrawingCmdReq") +Q = TypeVar("Q", bound="ModelingCmdReq") @attr.s(auto_attribs=True) -class DrawingCmdReq: - """A graphics command submitted to the KittyCAD engine via the Drawing API.""" # noqa: E501 +class ModelingCmdReq: + """A graphics command submitted to the KittyCAD engine via the Modeling API.""" # noqa: E501 - cmd: Union[Unset, DrawingCmd] = UNSET - cmd_id: Union[Unset, DrawingCmdId] = UNSET + cmd: Union[Unset, ModelingCmd] = UNSET + cmd_id: Union[Unset, ModelingCmdId] = UNSET file_id: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -39,32 +39,32 @@ class DrawingCmdReq: return field_dict @classmethod - def from_dict(cls: Type[L], src_dict: Dict[str, Any]) -> L: + def from_dict(cls: Type[Q], src_dict: Dict[str, Any]) -> Q: d = src_dict.copy() _cmd = d.pop("cmd", UNSET) - cmd: Union[Unset, DrawingCmd] + cmd: Union[Unset, ModelingCmd] if isinstance(_cmd, Unset): cmd = UNSET else: cmd = _cmd # type: ignore[arg-type] _cmd_id = d.pop("cmd_id", UNSET) - cmd_id: Union[Unset, DrawingCmdId] + cmd_id: Union[Unset, ModelingCmdId] if isinstance(_cmd_id, Unset): cmd_id = UNSET else: - cmd_id = DrawingCmdId(_cmd_id) + cmd_id = ModelingCmdId(_cmd_id) file_id = d.pop("file_id", UNSET) - drawing_cmd_req = cls( + modeling_cmd_req = cls( cmd=cmd, cmd_id=cmd_id, file_id=file_id, ) - drawing_cmd_req.additional_properties = d - return drawing_cmd_req + modeling_cmd_req.additional_properties = d + return modeling_cmd_req @property def additional_keys(self) -> List[str]: diff --git a/kittycad/models/drawing_cmd_req_batch.py b/kittycad/models/modeling_cmd_req_batch.py similarity index 81% rename from kittycad/models/drawing_cmd_req_batch.py rename to kittycad/models/modeling_cmd_req_batch.py index ae8ec3686..4f13c40e3 100644 --- a/kittycad/models/drawing_cmd_req_batch.py +++ b/kittycad/models/modeling_cmd_req_batch.py @@ -4,12 +4,12 @@ import attr from ..types import UNSET, Unset -E = TypeVar("E", bound="DrawingCmdReqBatch") +F = TypeVar("F", bound="ModelingCmdReqBatch") @attr.s(auto_attribs=True) -class DrawingCmdReqBatch: - """A batch set of graphics commands submitted to the KittyCAD engine via the Drawing API.""" # noqa: E501 +class ModelingCmdReqBatch: + """A batch set of graphics commands submitted to the KittyCAD engine via the Modeling API.""" # noqa: E501 cmds: Union[Unset, Any] = UNSET file_id: Union[Unset, str] = UNSET @@ -31,18 +31,18 @@ class DrawingCmdReqBatch: return field_dict @classmethod - def from_dict(cls: Type[E], src_dict: Dict[str, Any]) -> E: + def from_dict(cls: Type[F], src_dict: Dict[str, Any]) -> F: d = src_dict.copy() cmds = d.pop("cmds", UNSET) file_id = d.pop("file_id", UNSET) - drawing_cmd_req_batch = cls( + modeling_cmd_req_batch = cls( cmds=cmds, file_id=file_id, ) - drawing_cmd_req_batch.additional_properties = d - return drawing_cmd_req_batch + modeling_cmd_req_batch.additional_properties = d + return modeling_cmd_req_batch @property def additional_keys(self) -> List[str]: diff --git a/kittycad/models/drawing_error.py b/kittycad/models/modeling_error.py similarity index 87% rename from kittycad/models/drawing_error.py rename to kittycad/models/modeling_error.py index bfa81f932..f32d123e1 100644 --- a/kittycad/models/drawing_error.py +++ b/kittycad/models/modeling_error.py @@ -4,12 +4,12 @@ import attr from ..types import UNSET, Unset -Y = TypeVar("Y", bound="DrawingError") +H = TypeVar("H", bound="ModelingError") @attr.s(auto_attribs=True) -class DrawingError: - """Why a command submitted to the Drawing API failed.""" # noqa: E501 +class ModelingError: + """Why a command submitted to the Modeling API failed.""" # noqa: E501 error_code: Union[Unset, str] = UNSET external_message: Union[Unset, str] = UNSET @@ -39,7 +39,7 @@ class DrawingError: return field_dict @classmethod - def from_dict(cls: Type[Y], src_dict: Dict[str, Any]) -> Y: + def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H: d = src_dict.copy() error_code = d.pop("error_code", UNSET) @@ -49,15 +49,15 @@ class DrawingError: status_code = d.pop("status_code", UNSET) - drawing_error = cls( + modeling_error = cls( error_code=error_code, external_message=external_message, internal_message=internal_message, status_code=status_code, ) - drawing_error.additional_properties = d - return drawing_error + modeling_error.additional_properties = d + return modeling_error @property def additional_keys(self) -> List[str]: diff --git a/kittycad/models/drawing_outcome.py b/kittycad/models/modeling_outcome.py similarity index 77% rename from kittycad/models/drawing_outcome.py rename to kittycad/models/modeling_outcome.py index 4164ee71c..04696e1f5 100644 --- a/kittycad/models/drawing_outcome.py +++ b/kittycad/models/modeling_outcome.py @@ -2,22 +2,22 @@ from typing import Any, Dict, List, Type, TypeVar, Union import attr -from ..models.drawing_cmd_id import DrawingCmdId +from ..models.modeling_cmd_id import ModelingCmdId from ..types import UNSET, Unset -from .drawing_error import DrawingError +from .modeling_error import ModelingError Success = Any -Error = DrawingError +Error = ModelingError -H = TypeVar("H", bound="Cancelled") +N = TypeVar("N", bound="Cancelled") @attr.s(auto_attribs=True) class Cancelled: - what_failed: Union[Unset, DrawingCmdId] = UNSET + what_failed: Union[Unset, ModelingCmdId] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -34,14 +34,14 @@ class Cancelled: return field_dict @classmethod - def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H: + def from_dict(cls: Type[N], src_dict: Dict[str, Any]) -> N: d = src_dict.copy() _what_failed = d.pop("what_failed", UNSET) - what_failed: Union[Unset, DrawingCmdId] + what_failed: Union[Unset, ModelingCmdId] if isinstance(_what_failed, Unset): what_failed = UNSET else: - what_failed = DrawingCmdId(_what_failed) + what_failed = ModelingCmdId(_what_failed) cancelled = cls( what_failed=what_failed, @@ -67,4 +67,4 @@ class Cancelled: return key in self.additional_properties -DrawingOutcome = Union[Success, Error, Cancelled] +ModelingOutcome = Union[Success, Error, Cancelled] diff --git a/kittycad/models/drawing_outcomes.py b/kittycad/models/modeling_outcomes.py similarity index 78% rename from kittycad/models/drawing_outcomes.py rename to kittycad/models/modeling_outcomes.py index f07333ba2..74772437f 100644 --- a/kittycad/models/drawing_outcomes.py +++ b/kittycad/models/modeling_outcomes.py @@ -4,12 +4,12 @@ import attr from ..types import UNSET, Unset -T = TypeVar("T", bound="DrawingOutcomes") +H = TypeVar("H", bound="ModelingOutcomes") @attr.s(auto_attribs=True) -class DrawingOutcomes: - """The result from a batch of drawing commands.""" # noqa: E501 +class ModelingOutcomes: + """The result from a batch of modeling commands.""" # noqa: E501 outcomes: Union[Unset, Any] = UNSET @@ -27,16 +27,16 @@ class DrawingOutcomes: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H: d = src_dict.copy() outcomes = d.pop("outcomes", UNSET) - drawing_outcomes = cls( + modeling_outcomes = cls( outcomes=outcomes, ) - drawing_outcomes.additional_properties = d - return drawing_outcomes + modeling_outcomes.additional_properties = d + return modeling_outcomes @property def additional_keys(self) -> List[str]: diff --git a/kittycad/models/new_address.py b/kittycad/models/new_address.py index 69494ca27..d498b8924 100644 --- a/kittycad/models/new_address.py +++ b/kittycad/models/new_address.py @@ -5,7 +5,7 @@ import attr from ..models.country_code import CountryCode from ..types import UNSET, Unset -H = TypeVar("H", bound="NewAddress") +B = TypeVar("B", bound="NewAddress") @attr.s(auto_attribs=True) @@ -53,7 +53,7 @@ class NewAddress: return field_dict @classmethod - def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H: + def from_dict(cls: Type[B], src_dict: Dict[str, Any]) -> B: d = src_dict.copy() city = d.pop("city", UNSET) diff --git a/kittycad/models/onboarding.py b/kittycad/models/onboarding.py index ef95144a8..0a8e1d033 100644 --- a/kittycad/models/onboarding.py +++ b/kittycad/models/onboarding.py @@ -4,31 +4,31 @@ import attr from ..types import UNSET, Unset -B = TypeVar("B", bound="Onboarding") +P = TypeVar("P", bound="Onboarding") @attr.s(auto_attribs=True) class Onboarding: """Onboarding details""" # noqa: E501 - first_call_from_their_machine_date: Union[Unset, str] = UNSET + first_call_from__their_machine_date: Union[Unset, str] = UNSET first_litterbox_execute_date: Union[Unset, str] = UNSET first_token_date: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: - first_call_from_their_machine_date = self.first_call_from_their_machine_date + first_call_from__their_machine_date = self.first_call_from__their_machine_date first_litterbox_execute_date = self.first_litterbox_execute_date first_token_date = self.first_token_date field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) - if first_call_from_their_machine_date is not UNSET: + if first_call_from__their_machine_date is not UNSET: field_dict[ "first_call_from_their_machine_date" - ] = first_call_from_their_machine_date + ] = first_call_from__their_machine_date if first_litterbox_execute_date is not UNSET: field_dict["first_litterbox_execute_date"] = first_litterbox_execute_date if first_token_date is not UNSET: @@ -37,9 +37,9 @@ class Onboarding: return field_dict @classmethod - def from_dict(cls: Type[B], src_dict: Dict[str, Any]) -> B: + def from_dict(cls: Type[P], src_dict: Dict[str, Any]) -> P: d = src_dict.copy() - first_call_from_their_machine_date = d.pop( + first_call_from__their_machine_date = d.pop( "first_call_from_their_machine_date", UNSET ) @@ -48,7 +48,7 @@ class Onboarding: first_token_date = d.pop("first_token_date", UNSET) onboarding = cls( - first_call_from_their_machine_date=first_call_from_their_machine_date, + first_call_from__their_machine_date=first_call_from__their_machine_date, first_litterbox_execute_date=first_litterbox_execute_date, first_token_date=first_token_date, ) diff --git a/kittycad/models/output_file.py b/kittycad/models/output_file.py index 9b042880b..e89851a91 100644 --- a/kittycad/models/output_file.py +++ b/kittycad/models/output_file.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -P = TypeVar("P", bound="OutputFile") +J = TypeVar("J", bound="OutputFile") @attr.s(auto_attribs=True) @@ -31,7 +31,7 @@ class OutputFile: return field_dict @classmethod - def from_dict(cls: Type[P], src_dict: Dict[str, Any]) -> P: + def from_dict(cls: Type[J], src_dict: Dict[str, Any]) -> J: d = src_dict.copy() contents = d.pop("contents", UNSET) diff --git a/kittycad/models/payment_intent.py b/kittycad/models/payment_intent.py index fafcdbd0e..69aa1acea 100644 --- a/kittycad/models/payment_intent.py +++ b/kittycad/models/payment_intent.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -J = TypeVar("J", bound="PaymentIntent") +T = TypeVar("T", bound="PaymentIntent") @attr.s(auto_attribs=True) @@ -27,7 +27,7 @@ class PaymentIntent: return field_dict @classmethod - def from_dict(cls: Type[J], src_dict: Dict[str, Any]) -> J: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() client_secret = d.pop("client_secret", UNSET) diff --git a/kittycad/models/payment_method.py b/kittycad/models/payment_method.py index add1b6925..f21b2cb36 100644 --- a/kittycad/models/payment_method.py +++ b/kittycad/models/payment_method.py @@ -9,7 +9,7 @@ from ..models.card_details import CardDetails from ..models.payment_method_type import PaymentMethodType from ..types import UNSET, Unset -T = TypeVar("T", bound="PaymentMethod") +V = TypeVar("V", bound="PaymentMethod") @attr.s(auto_attribs=True) @@ -57,7 +57,7 @@ class PaymentMethod: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: Type[V], src_dict: Dict[str, Any]) -> V: d = src_dict.copy() _billing_info = d.pop("billing_info", UNSET) billing_info: Union[Unset, BillingInfo] diff --git a/kittycad/models/payment_method_card_checks.py b/kittycad/models/payment_method_card_checks.py index de66901a2..965a56e0b 100644 --- a/kittycad/models/payment_method_card_checks.py +++ b/kittycad/models/payment_method_card_checks.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -V = TypeVar("V", bound="PaymentMethodCardChecks") +C = TypeVar("C", bound="PaymentMethodCardChecks") @attr.s(auto_attribs=True) @@ -35,7 +35,7 @@ class PaymentMethodCardChecks: return field_dict @classmethod - def from_dict(cls: Type[V], src_dict: Dict[str, Any]) -> V: + def from_dict(cls: Type[C], src_dict: Dict[str, Any]) -> C: d = src_dict.copy() address_line1_check = d.pop("address_line1_check", UNSET) diff --git a/kittycad/models/physics_constant.py b/kittycad/models/physics_constant.py index bb1018cb5..8b143688f 100644 --- a/kittycad/models/physics_constant.py +++ b/kittycad/models/physics_constant.py @@ -6,9 +6,10 @@ from dateutil.parser import isoparse from ..models.api_call_status import ApiCallStatus from ..models.physics_constant_name import PhysicsConstantName +from ..models.uuid import Uuid from ..types import UNSET, Unset -C = TypeVar("C", bound="PhysicsConstant") +R = TypeVar("R", bound="PhysicsConstant") @attr.s(auto_attribs=True) @@ -77,7 +78,7 @@ class PhysicsConstant: return field_dict @classmethod - def from_dict(cls: Type[C], src_dict: Dict[str, Any]) -> C: + def from_dict(cls: Type[R], src_dict: Dict[str, Any]) -> R: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -102,7 +103,12 @@ class PhysicsConstant: error = d.pop("error", UNSET) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) _started_at = d.pop("started_at", UNSET) started_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/plugins_info.py b/kittycad/models/plugins_info.py index 268f28d88..e106ed1f4 100644 --- a/kittycad/models/plugins_info.py +++ b/kittycad/models/plugins_info.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -R = TypeVar("R", bound="PluginsInfo") +C = TypeVar("C", bound="PluginsInfo") @attr.s(auto_attribs=True) @@ -49,7 +49,7 @@ class PluginsInfo: return field_dict @classmethod - def from_dict(cls: Type[R], src_dict: Dict[str, Any]) -> R: + def from_dict(cls: Type[C], src_dict: Dict[str, Any]) -> C: d = src_dict.copy() authorization = cast(List[str], d.pop("authorization", UNSET)) diff --git a/kittycad/models/point2d.py b/kittycad/models/point2d.py new file mode 100644 index 000000000..c31b5b7c8 --- /dev/null +++ b/kittycad/models/point2d.py @@ -0,0 +1,62 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +E = TypeVar("E", bound="Point2d") + + +@attr.s(auto_attribs=True) +class Point2d: + """A point in 2D space""" # noqa: E501 + + x: Union[Unset, float] = UNSET + y: Union[Unset, float] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + x = self.x + y = self.y + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if x is not UNSET: + field_dict["x"] = x + if y is not UNSET: + field_dict["y"] = y + + return field_dict + + @classmethod + def from_dict(cls: Type[E], src_dict: Dict[str, Any]) -> E: + d = src_dict.copy() + x = d.pop("x", UNSET) + + y = d.pop("y", UNSET) + + point2d = cls( + x=x, + y=y, + ) + + point2d.additional_properties = d + return point2d + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/point3d.py b/kittycad/models/point3d.py new file mode 100644 index 000000000..1f635862a --- /dev/null +++ b/kittycad/models/point3d.py @@ -0,0 +1,69 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +M = TypeVar("M", bound="Point3d") + + +@attr.s(auto_attribs=True) +class Point3d: + """A point in 3D space""" # noqa: E501 + + x: Union[Unset, float] = UNSET + y: Union[Unset, float] = UNSET + z: Union[Unset, float] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + x = self.x + y = self.y + z = self.z + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if x is not UNSET: + field_dict["x"] = x + if y is not UNSET: + field_dict["y"] = y + if z is not UNSET: + field_dict["z"] = z + + return field_dict + + @classmethod + def from_dict(cls: Type[M], src_dict: Dict[str, Any]) -> M: + d = src_dict.copy() + x = d.pop("x", UNSET) + + y = d.pop("y", UNSET) + + z = d.pop("z", UNSET) + + point3d = cls( + x=x, + y=y, + z=z, + ) + + point3d.additional_properties = d + return point3d + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/point_e_metadata.py b/kittycad/models/point_e_metadata.py index 23f1e74d6..a0c5b2648 100644 --- a/kittycad/models/point_e_metadata.py +++ b/kittycad/models/point_e_metadata.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -C = TypeVar("C", bound="PointEMetadata") +S = TypeVar("S", bound="PointEMetadata") @attr.s(auto_attribs=True) @@ -29,7 +29,7 @@ class PointEMetadata: return field_dict @classmethod - def from_dict(cls: Type[C], src_dict: Dict[str, Any]) -> C: + def from_dict(cls: Type[S], src_dict: Dict[str, Any]) -> S: d = src_dict.copy() ok = d.pop("ok", UNSET) diff --git a/kittycad/models/pong.py b/kittycad/models/pong.py index 00996be27..0305cee53 100644 --- a/kittycad/models/pong.py +++ b/kittycad/models/pong.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -E = TypeVar("E", bound="Pong") +L = TypeVar("L", bound="Pong") @attr.s(auto_attribs=True) @@ -27,7 +27,7 @@ class Pong: return field_dict @classmethod - def from_dict(cls: Type[E], src_dict: Dict[str, Any]) -> E: + def from_dict(cls: Type[L], src_dict: Dict[str, Any]) -> L: d = src_dict.copy() message = d.pop("message", UNSET) diff --git a/kittycad/models/registry_service_config.py b/kittycad/models/registry_service_config.py index 90957805c..31a606b00 100644 --- a/kittycad/models/registry_service_config.py +++ b/kittycad/models/registry_service_config.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -M = TypeVar("M", bound="RegistryServiceConfig") +T = TypeVar("T", bound="RegistryServiceConfig") @attr.s(auto_attribs=True) @@ -59,7 +59,7 @@ class RegistryServiceConfig: return field_dict @classmethod - def from_dict(cls: Type[M], src_dict: Dict[str, Any]) -> M: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() allow_nondistributable_artifacts_cid_rs = cast( List[str], d.pop("allow_nondistributable_artifacts_cid_rs", UNSET) diff --git a/kittycad/models/runtime.py b/kittycad/models/runtime.py index 734119cdb..5187c84b3 100644 --- a/kittycad/models/runtime.py +++ b/kittycad/models/runtime.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -S = TypeVar("S", bound="Runtime") +E = TypeVar("E", bound="Runtime") @attr.s(auto_attribs=True) @@ -33,7 +33,7 @@ class Runtime: return field_dict @classmethod - def from_dict(cls: Type[S], src_dict: Dict[str, Any]) -> S: + def from_dict(cls: Type[E], src_dict: Dict[str, Any]) -> E: d = src_dict.copy() path = d.pop("path", UNSET) diff --git a/kittycad/models/session.py b/kittycad/models/session.py index cf3d504dc..d1f271a1a 100644 --- a/kittycad/models/session.py +++ b/kittycad/models/session.py @@ -4,9 +4,10 @@ from typing import Any, Dict, List, Type, TypeVar, Union import attr from dateutil.parser import isoparse +from ..models.uuid import Uuid from ..types import UNSET, Unset -L = TypeVar("L", bound="Session") +D = TypeVar("D", bound="Session") @attr.s(auto_attribs=True) @@ -57,7 +58,7 @@ class Session: return field_dict @classmethod - def from_dict(cls: Type[L], src_dict: Dict[str, Any]) -> L: + def from_dict(cls: Type[D], src_dict: Dict[str, Any]) -> D: d = src_dict.copy() _created_at = d.pop("created_at", UNSET) created_at: Union[Unset, datetime.datetime] @@ -75,7 +76,12 @@ class Session: id = d.pop("id", UNSET) - session_token = d.pop("session_token", UNSET) + _session_token = d.pop("session_token", UNSET) + session_token: Union[Unset, Uuid] + if isinstance(_session_token, Unset): + session_token = UNSET + else: + session_token = Uuid(_session_token) _updated_at = d.pop("updated_at", UNSET) updated_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/system_info_default_address_pools.py b/kittycad/models/system_info_default_address_pools.py index 963855490..635daf8dd 100644 --- a/kittycad/models/system_info_default_address_pools.py +++ b/kittycad/models/system_info_default_address_pools.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -T = TypeVar("T", bound="SystemInfoDefaultAddressPools") +Y = TypeVar("Y", bound="SystemInfoDefaultAddressPools") @attr.s(auto_attribs=True) @@ -29,7 +29,7 @@ class SystemInfoDefaultAddressPools: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: Type[Y], src_dict: Dict[str, Any]) -> Y: d = src_dict.copy() base = d.pop("base", UNSET) diff --git a/kittycad/models/unit_acceleration_conversion.py b/kittycad/models/unit_acceleration_conversion.py index 5ddcab5a0..58e5ad04f 100644 --- a/kittycad/models/unit_acceleration_conversion.py +++ b/kittycad/models/unit_acceleration_conversion.py @@ -6,9 +6,10 @@ from dateutil.parser import isoparse from ..models.api_call_status import ApiCallStatus from ..models.unit_acceleration_format import UnitAccelerationFormat +from ..models.uuid import Uuid from ..types import UNSET, Unset -E = TypeVar("E", bound="UnitAccelerationConversion") +Y = TypeVar("Y", bound="UnitAccelerationConversion") @attr.s(auto_attribs=True) @@ -86,7 +87,7 @@ class UnitAccelerationConversion: return field_dict @classmethod - def from_dict(cls: Type[E], src_dict: Dict[str, Any]) -> E: + def from_dict(cls: Type[Y], src_dict: Dict[str, Any]) -> Y: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -104,7 +105,12 @@ class UnitAccelerationConversion: error = d.pop("error", UNSET) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) input = d.pop("input", UNSET) diff --git a/kittycad/models/unit_angle_conversion.py b/kittycad/models/unit_angle_conversion.py index deb20632f..a80f73418 100644 --- a/kittycad/models/unit_angle_conversion.py +++ b/kittycad/models/unit_angle_conversion.py @@ -6,6 +6,7 @@ from dateutil.parser import isoparse from ..models.api_call_status import ApiCallStatus from ..models.unit_angle_format import UnitAngleFormat +from ..models.uuid import Uuid from ..types import UNSET, Unset D = TypeVar("D", bound="UnitAngleConversion") @@ -104,7 +105,12 @@ class UnitAngleConversion: error = d.pop("error", UNSET) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) input = d.pop("input", UNSET) diff --git a/kittycad/models/unit_angular_velocity_conversion.py b/kittycad/models/unit_angular_velocity_conversion.py index ad7eb130f..a53d52c85 100644 --- a/kittycad/models/unit_angular_velocity_conversion.py +++ b/kittycad/models/unit_angular_velocity_conversion.py @@ -6,9 +6,10 @@ from dateutil.parser import isoparse from ..models.api_call_status import ApiCallStatus from ..models.unit_angular_velocity_format import UnitAngularVelocityFormat +from ..models.uuid import Uuid from ..types import UNSET, Unset -Y = TypeVar("Y", bound="UnitAngularVelocityConversion") +F = TypeVar("F", bound="UnitAngularVelocityConversion") @attr.s(auto_attribs=True) @@ -86,7 +87,7 @@ class UnitAngularVelocityConversion: return field_dict @classmethod - def from_dict(cls: Type[Y], src_dict: Dict[str, Any]) -> Y: + def from_dict(cls: Type[F], src_dict: Dict[str, Any]) -> F: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -104,7 +105,12 @@ class UnitAngularVelocityConversion: error = d.pop("error", UNSET) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) input = d.pop("input", UNSET) diff --git a/kittycad/models/unit_area_conversion.py b/kittycad/models/unit_area_conversion.py index a1c64e397..dbdbb47c8 100644 --- a/kittycad/models/unit_area_conversion.py +++ b/kittycad/models/unit_area_conversion.py @@ -6,9 +6,10 @@ from dateutil.parser import isoparse from ..models.api_call_status import ApiCallStatus from ..models.unit_area_format import UnitAreaFormat +from ..models.uuid import Uuid from ..types import UNSET, Unset -Y = TypeVar("Y", bound="UnitAreaConversion") +Z = TypeVar("Z", bound="UnitAreaConversion") @attr.s(auto_attribs=True) @@ -86,7 +87,7 @@ class UnitAreaConversion: return field_dict @classmethod - def from_dict(cls: Type[Y], src_dict: Dict[str, Any]) -> Y: + def from_dict(cls: Type[Z], src_dict: Dict[str, Any]) -> Z: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -104,7 +105,12 @@ class UnitAreaConversion: error = d.pop("error", UNSET) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) input = d.pop("input", UNSET) diff --git a/kittycad/models/unit_charge_conversion.py b/kittycad/models/unit_charge_conversion.py index 7aebf72be..4e0c2924b 100644 --- a/kittycad/models/unit_charge_conversion.py +++ b/kittycad/models/unit_charge_conversion.py @@ -6,9 +6,10 @@ from dateutil.parser import isoparse from ..models.api_call_status import ApiCallStatus from ..models.unit_charge_format import UnitChargeFormat +from ..models.uuid import Uuid from ..types import UNSET, Unset -D = TypeVar("D", bound="UnitChargeConversion") +G = TypeVar("G", bound="UnitChargeConversion") @attr.s(auto_attribs=True) @@ -86,7 +87,7 @@ class UnitChargeConversion: return field_dict @classmethod - def from_dict(cls: Type[D], src_dict: Dict[str, Any]) -> D: + def from_dict(cls: Type[G], src_dict: Dict[str, Any]) -> G: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -104,7 +105,12 @@ class UnitChargeConversion: error = d.pop("error", UNSET) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) input = d.pop("input", UNSET) diff --git a/kittycad/models/unit_concentration_conversion.py b/kittycad/models/unit_concentration_conversion.py index 7771b2ebe..2c580081a 100644 --- a/kittycad/models/unit_concentration_conversion.py +++ b/kittycad/models/unit_concentration_conversion.py @@ -6,9 +6,10 @@ from dateutil.parser import isoparse from ..models.api_call_status import ApiCallStatus from ..models.unit_concentration_format import UnitConcentrationFormat +from ..models.uuid import Uuid from ..types import UNSET, Unset -F = TypeVar("F", bound="UnitConcentrationConversion") +L = TypeVar("L", bound="UnitConcentrationConversion") @attr.s(auto_attribs=True) @@ -86,7 +87,7 @@ class UnitConcentrationConversion: return field_dict @classmethod - def from_dict(cls: Type[F], src_dict: Dict[str, Any]) -> F: + def from_dict(cls: Type[L], src_dict: Dict[str, Any]) -> L: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -104,7 +105,12 @@ class UnitConcentrationConversion: error = d.pop("error", UNSET) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) input = d.pop("input", UNSET) diff --git a/kittycad/models/unit_data_conversion.py b/kittycad/models/unit_data_conversion.py index 018584fd6..127730096 100644 --- a/kittycad/models/unit_data_conversion.py +++ b/kittycad/models/unit_data_conversion.py @@ -6,9 +6,10 @@ from dateutil.parser import isoparse from ..models.api_call_status import ApiCallStatus from ..models.unit_data_format import UnitDataFormat +from ..models.uuid import Uuid from ..types import UNSET, Unset -Z = TypeVar("Z", bound="UnitDataConversion") +N = TypeVar("N", bound="UnitDataConversion") @attr.s(auto_attribs=True) @@ -86,7 +87,7 @@ class UnitDataConversion: return field_dict @classmethod - def from_dict(cls: Type[Z], src_dict: Dict[str, Any]) -> Z: + def from_dict(cls: Type[N], src_dict: Dict[str, Any]) -> N: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -104,7 +105,12 @@ class UnitDataConversion: error = d.pop("error", UNSET) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) input = d.pop("input", UNSET) diff --git a/kittycad/models/unit_data_transfer_rate_conversion.py b/kittycad/models/unit_data_transfer_rate_conversion.py index 75968655c..46c613b5a 100644 --- a/kittycad/models/unit_data_transfer_rate_conversion.py +++ b/kittycad/models/unit_data_transfer_rate_conversion.py @@ -6,9 +6,10 @@ from dateutil.parser import isoparse from ..models.api_call_status import ApiCallStatus from ..models.unit_data_transfer_rate_format import UnitDataTransferRateFormat +from ..models.uuid import Uuid from ..types import UNSET, Unset -G = TypeVar("G", bound="UnitDataTransferRateConversion") +N = TypeVar("N", bound="UnitDataTransferRateConversion") @attr.s(auto_attribs=True) @@ -86,7 +87,7 @@ class UnitDataTransferRateConversion: return field_dict @classmethod - def from_dict(cls: Type[G], src_dict: Dict[str, Any]) -> G: + def from_dict(cls: Type[N], src_dict: Dict[str, Any]) -> N: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -104,7 +105,12 @@ class UnitDataTransferRateConversion: error = d.pop("error", UNSET) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) input = d.pop("input", UNSET) diff --git a/kittycad/models/unit_density_conversion.py b/kittycad/models/unit_density_conversion.py index 5b426a7ec..f0a172145 100644 --- a/kittycad/models/unit_density_conversion.py +++ b/kittycad/models/unit_density_conversion.py @@ -6,9 +6,10 @@ from dateutil.parser import isoparse from ..models.api_call_status import ApiCallStatus from ..models.unit_density_format import UnitDensityFormat +from ..models.uuid import Uuid from ..types import UNSET, Unset -L = TypeVar("L", bound="UnitDensityConversion") +H = TypeVar("H", bound="UnitDensityConversion") @attr.s(auto_attribs=True) @@ -86,7 +87,7 @@ class UnitDensityConversion: return field_dict @classmethod - def from_dict(cls: Type[L], src_dict: Dict[str, Any]) -> L: + def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -104,7 +105,12 @@ class UnitDensityConversion: error = d.pop("error", UNSET) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) input = d.pop("input", UNSET) diff --git a/kittycad/models/unit_energy_conversion.py b/kittycad/models/unit_energy_conversion.py index 297fdf14a..7eb5637c3 100644 --- a/kittycad/models/unit_energy_conversion.py +++ b/kittycad/models/unit_energy_conversion.py @@ -6,9 +6,10 @@ from dateutil.parser import isoparse from ..models.api_call_status import ApiCallStatus from ..models.unit_energy_format import UnitEnergyFormat +from ..models.uuid import Uuid from ..types import UNSET, Unset -N = TypeVar("N", bound="UnitEnergyConversion") +V = TypeVar("V", bound="UnitEnergyConversion") @attr.s(auto_attribs=True) @@ -86,7 +87,7 @@ class UnitEnergyConversion: return field_dict @classmethod - def from_dict(cls: Type[N], src_dict: Dict[str, Any]) -> N: + def from_dict(cls: Type[V], src_dict: Dict[str, Any]) -> V: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -104,7 +105,12 @@ class UnitEnergyConversion: error = d.pop("error", UNSET) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) input = d.pop("input", UNSET) diff --git a/kittycad/models/unit_force_conversion.py b/kittycad/models/unit_force_conversion.py index 003be67d2..bdf65da00 100644 --- a/kittycad/models/unit_force_conversion.py +++ b/kittycad/models/unit_force_conversion.py @@ -6,9 +6,10 @@ from dateutil.parser import isoparse from ..models.api_call_status import ApiCallStatus from ..models.unit_force_format import UnitForceFormat +from ..models.uuid import Uuid from ..types import UNSET, Unset -N = TypeVar("N", bound="UnitForceConversion") +E = TypeVar("E", bound="UnitForceConversion") @attr.s(auto_attribs=True) @@ -86,7 +87,7 @@ class UnitForceConversion: return field_dict @classmethod - def from_dict(cls: Type[N], src_dict: Dict[str, Any]) -> N: + def from_dict(cls: Type[E], src_dict: Dict[str, Any]) -> E: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -104,7 +105,12 @@ class UnitForceConversion: error = d.pop("error", UNSET) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) input = d.pop("input", UNSET) diff --git a/kittycad/models/unit_illuminance_conversion.py b/kittycad/models/unit_illuminance_conversion.py index 70d2bd4c0..a9ab589a1 100644 --- a/kittycad/models/unit_illuminance_conversion.py +++ b/kittycad/models/unit_illuminance_conversion.py @@ -6,9 +6,10 @@ from dateutil.parser import isoparse from ..models.api_call_status import ApiCallStatus from ..models.unit_illuminance_format import UnitIlluminanceFormat +from ..models.uuid import Uuid from ..types import UNSET, Unset -H = TypeVar("H", bound="UnitIlluminanceConversion") +T = TypeVar("T", bound="UnitIlluminanceConversion") @attr.s(auto_attribs=True) @@ -86,7 +87,7 @@ class UnitIlluminanceConversion: return field_dict @classmethod - def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H: + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -104,7 +105,12 @@ class UnitIlluminanceConversion: error = d.pop("error", UNSET) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) input = d.pop("input", UNSET) diff --git a/kittycad/models/unit_length_conversion.py b/kittycad/models/unit_length_conversion.py index f42ac858c..a4ca33d99 100644 --- a/kittycad/models/unit_length_conversion.py +++ b/kittycad/models/unit_length_conversion.py @@ -6,9 +6,10 @@ from dateutil.parser import isoparse from ..models.api_call_status import ApiCallStatus from ..models.unit_length_format import UnitLengthFormat +from ..models.uuid import Uuid from ..types import UNSET, Unset -V = TypeVar("V", bound="UnitLengthConversion") +Q = TypeVar("Q", bound="UnitLengthConversion") @attr.s(auto_attribs=True) @@ -86,7 +87,7 @@ class UnitLengthConversion: return field_dict @classmethod - def from_dict(cls: Type[V], src_dict: Dict[str, Any]) -> V: + def from_dict(cls: Type[Q], src_dict: Dict[str, Any]) -> Q: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -104,7 +105,12 @@ class UnitLengthConversion: error = d.pop("error", UNSET) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) input = d.pop("input", UNSET) diff --git a/kittycad/models/unit_magnetic_field_strength_conversion.py b/kittycad/models/unit_magnetic_field_strength_conversion.py index 6ff32691c..80dc0ca7b 100644 --- a/kittycad/models/unit_magnetic_field_strength_conversion.py +++ b/kittycad/models/unit_magnetic_field_strength_conversion.py @@ -6,9 +6,10 @@ from dateutil.parser import isoparse from ..models.api_call_status import ApiCallStatus from ..models.unit_magnetic_field_strength_format import UnitMagneticFieldStrengthFormat +from ..models.uuid import Uuid from ..types import UNSET, Unset -E = TypeVar("E", bound="UnitMagneticFieldStrengthConversion") +F = TypeVar("F", bound="UnitMagneticFieldStrengthConversion") @attr.s(auto_attribs=True) @@ -86,7 +87,7 @@ class UnitMagneticFieldStrengthConversion: return field_dict @classmethod - def from_dict(cls: Type[E], src_dict: Dict[str, Any]) -> E: + def from_dict(cls: Type[F], src_dict: Dict[str, Any]) -> F: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -104,7 +105,12 @@ class UnitMagneticFieldStrengthConversion: error = d.pop("error", UNSET) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) input = d.pop("input", UNSET) diff --git a/kittycad/models/unit_magnetic_flux_conversion.py b/kittycad/models/unit_magnetic_flux_conversion.py index 7509a545c..9ff50af10 100644 --- a/kittycad/models/unit_magnetic_flux_conversion.py +++ b/kittycad/models/unit_magnetic_flux_conversion.py @@ -6,9 +6,10 @@ from dateutil.parser import isoparse from ..models.api_call_status import ApiCallStatus from ..models.unit_magnetic_flux_format import UnitMagneticFluxFormat +from ..models.uuid import Uuid from ..types import UNSET, Unset -T = TypeVar("T", bound="UnitMagneticFluxConversion") +D = TypeVar("D", bound="UnitMagneticFluxConversion") @attr.s(auto_attribs=True) @@ -86,7 +87,7 @@ class UnitMagneticFluxConversion: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: Type[D], src_dict: Dict[str, Any]) -> D: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -104,7 +105,12 @@ class UnitMagneticFluxConversion: error = d.pop("error", UNSET) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) input = d.pop("input", UNSET) diff --git a/kittycad/models/unit_mass_conversion.py b/kittycad/models/unit_mass_conversion.py index 5549bfe6c..b17346e42 100644 --- a/kittycad/models/unit_mass_conversion.py +++ b/kittycad/models/unit_mass_conversion.py @@ -6,9 +6,10 @@ from dateutil.parser import isoparse from ..models.api_call_status import ApiCallStatus from ..models.unit_mass_format import UnitMassFormat +from ..models.uuid import Uuid from ..types import UNSET, Unset -Q = TypeVar("Q", bound="UnitMassConversion") +J = TypeVar("J", bound="UnitMassConversion") @attr.s(auto_attribs=True) @@ -86,7 +87,7 @@ class UnitMassConversion: return field_dict @classmethod - def from_dict(cls: Type[Q], src_dict: Dict[str, Any]) -> Q: + def from_dict(cls: Type[J], src_dict: Dict[str, Any]) -> J: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -104,7 +105,12 @@ class UnitMassConversion: error = d.pop("error", UNSET) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) input = d.pop("input", UNSET) diff --git a/kittycad/models/unit_metric_power_conversion.py b/kittycad/models/unit_metric_power_conversion.py index 732d2ee6c..b137d0147 100644 --- a/kittycad/models/unit_metric_power_conversion.py +++ b/kittycad/models/unit_metric_power_conversion.py @@ -6,6 +6,7 @@ from dateutil.parser import isoparse from ..models.api_call_status import ApiCallStatus from ..models.unit_metric_power import UnitMetricPower +from ..models.uuid import Uuid from ..types import UNSET, Unset F = TypeVar("F", bound="UnitMetricPowerConversion") @@ -104,7 +105,12 @@ class UnitMetricPowerConversion: error = d.pop("error", UNSET) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) input = d.pop("input", UNSET) diff --git a/kittycad/models/unit_metric_power_cubed_conversion.py b/kittycad/models/unit_metric_power_cubed_conversion.py index e1b147c97..22e07d28d 100644 --- a/kittycad/models/unit_metric_power_cubed_conversion.py +++ b/kittycad/models/unit_metric_power_cubed_conversion.py @@ -6,9 +6,10 @@ from dateutil.parser import isoparse from ..models.api_call_status import ApiCallStatus from ..models.unit_metric_power import UnitMetricPower +from ..models.uuid import Uuid from ..types import UNSET, Unset -D = TypeVar("D", bound="UnitMetricPowerCubedConversion") +V = TypeVar("V", bound="UnitMetricPowerCubedConversion") @attr.s(auto_attribs=True) @@ -86,7 +87,7 @@ class UnitMetricPowerCubedConversion: return field_dict @classmethod - def from_dict(cls: Type[D], src_dict: Dict[str, Any]) -> D: + def from_dict(cls: Type[V], src_dict: Dict[str, Any]) -> V: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -104,7 +105,12 @@ class UnitMetricPowerCubedConversion: error = d.pop("error", UNSET) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) input = d.pop("input", UNSET) diff --git a/kittycad/models/unit_metric_power_squared_conversion.py b/kittycad/models/unit_metric_power_squared_conversion.py index 21b96df58..73a57827a 100644 --- a/kittycad/models/unit_metric_power_squared_conversion.py +++ b/kittycad/models/unit_metric_power_squared_conversion.py @@ -6,9 +6,10 @@ from dateutil.parser import isoparse from ..models.api_call_status import ApiCallStatus from ..models.unit_metric_power import UnitMetricPower +from ..models.uuid import Uuid from ..types import UNSET, Unset -J = TypeVar("J", bound="UnitMetricPowerSquaredConversion") +U = TypeVar("U", bound="UnitMetricPowerSquaredConversion") @attr.s(auto_attribs=True) @@ -86,7 +87,7 @@ class UnitMetricPowerSquaredConversion: return field_dict @classmethod - def from_dict(cls: Type[J], src_dict: Dict[str, Any]) -> J: + def from_dict(cls: Type[U], src_dict: Dict[str, Any]) -> U: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -104,7 +105,12 @@ class UnitMetricPowerSquaredConversion: error = d.pop("error", UNSET) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) input = d.pop("input", UNSET) diff --git a/kittycad/models/unit_power_conversion.py b/kittycad/models/unit_power_conversion.py index 979c33e0c..7006aefa9 100644 --- a/kittycad/models/unit_power_conversion.py +++ b/kittycad/models/unit_power_conversion.py @@ -6,6 +6,7 @@ from dateutil.parser import isoparse from ..models.api_call_status import ApiCallStatus from ..models.unit_power_format import UnitPowerFormat +from ..models.uuid import Uuid from ..types import UNSET, Unset F = TypeVar("F", bound="UnitPowerConversion") @@ -104,7 +105,12 @@ class UnitPowerConversion: error = d.pop("error", UNSET) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) input = d.pop("input", UNSET) diff --git a/kittycad/models/unit_pressure_conversion.py b/kittycad/models/unit_pressure_conversion.py index 24f727116..15967e3b0 100644 --- a/kittycad/models/unit_pressure_conversion.py +++ b/kittycad/models/unit_pressure_conversion.py @@ -6,9 +6,10 @@ from dateutil.parser import isoparse from ..models.api_call_status import ApiCallStatus from ..models.unit_pressure_format import UnitPressureFormat +from ..models.uuid import Uuid from ..types import UNSET, Unset -V = TypeVar("V", bound="UnitPressureConversion") +Y = TypeVar("Y", bound="UnitPressureConversion") @attr.s(auto_attribs=True) @@ -86,7 +87,7 @@ class UnitPressureConversion: return field_dict @classmethod - def from_dict(cls: Type[V], src_dict: Dict[str, Any]) -> V: + def from_dict(cls: Type[Y], src_dict: Dict[str, Any]) -> Y: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -104,7 +105,12 @@ class UnitPressureConversion: error = d.pop("error", UNSET) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) input = d.pop("input", UNSET) diff --git a/kittycad/models/unit_radiation_conversion.py b/kittycad/models/unit_radiation_conversion.py index 1377e63e0..66ed0983d 100644 --- a/kittycad/models/unit_radiation_conversion.py +++ b/kittycad/models/unit_radiation_conversion.py @@ -6,9 +6,10 @@ from dateutil.parser import isoparse from ..models.api_call_status import ApiCallStatus from ..models.unit_radiation_format import UnitRadiationFormat +from ..models.uuid import Uuid from ..types import UNSET, Unset -U = TypeVar("U", bound="UnitRadiationConversion") +F = TypeVar("F", bound="UnitRadiationConversion") @attr.s(auto_attribs=True) @@ -86,7 +87,7 @@ class UnitRadiationConversion: return field_dict @classmethod - def from_dict(cls: Type[U], src_dict: Dict[str, Any]) -> U: + def from_dict(cls: Type[F], src_dict: Dict[str, Any]) -> F: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -104,7 +105,12 @@ class UnitRadiationConversion: error = d.pop("error", UNSET) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) input = d.pop("input", UNSET) diff --git a/kittycad/models/unit_radioactivity_conversion.py b/kittycad/models/unit_radioactivity_conversion.py index c0b359bcc..5990b1ffc 100644 --- a/kittycad/models/unit_radioactivity_conversion.py +++ b/kittycad/models/unit_radioactivity_conversion.py @@ -6,9 +6,10 @@ from dateutil.parser import isoparse from ..models.api_call_status import ApiCallStatus from ..models.unit_radioactivity_format import UnitRadioactivityFormat +from ..models.uuid import Uuid from ..types import UNSET, Unset -F = TypeVar("F", bound="UnitRadioactivityConversion") +P = TypeVar("P", bound="UnitRadioactivityConversion") @attr.s(auto_attribs=True) @@ -86,7 +87,7 @@ class UnitRadioactivityConversion: return field_dict @classmethod - def from_dict(cls: Type[F], src_dict: Dict[str, Any]) -> F: + def from_dict(cls: Type[P], src_dict: Dict[str, Any]) -> P: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -104,7 +105,12 @@ class UnitRadioactivityConversion: error = d.pop("error", UNSET) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) input = d.pop("input", UNSET) diff --git a/kittycad/models/unit_solid_angle_conversion.py b/kittycad/models/unit_solid_angle_conversion.py index 6ed13e8d0..018491175 100644 --- a/kittycad/models/unit_solid_angle_conversion.py +++ b/kittycad/models/unit_solid_angle_conversion.py @@ -6,6 +6,7 @@ from dateutil.parser import isoparse from ..models.api_call_status import ApiCallStatus from ..models.unit_solid_angle_format import UnitSolidAngleFormat +from ..models.uuid import Uuid from ..types import UNSET, Unset Y = TypeVar("Y", bound="UnitSolidAngleConversion") @@ -104,7 +105,12 @@ class UnitSolidAngleConversion: error = d.pop("error", UNSET) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) input = d.pop("input", UNSET) diff --git a/kittycad/models/unit_temperature_conversion.py b/kittycad/models/unit_temperature_conversion.py index 92cee7ef1..63390f520 100644 --- a/kittycad/models/unit_temperature_conversion.py +++ b/kittycad/models/unit_temperature_conversion.py @@ -6,9 +6,10 @@ from dateutil.parser import isoparse from ..models.api_call_status import ApiCallStatus from ..models.unit_temperature_format import UnitTemperatureFormat +from ..models.uuid import Uuid from ..types import UNSET, Unset -F = TypeVar("F", bound="UnitTemperatureConversion") +L = TypeVar("L", bound="UnitTemperatureConversion") @attr.s(auto_attribs=True) @@ -86,7 +87,7 @@ class UnitTemperatureConversion: return field_dict @classmethod - def from_dict(cls: Type[F], src_dict: Dict[str, Any]) -> F: + def from_dict(cls: Type[L], src_dict: Dict[str, Any]) -> L: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -104,7 +105,12 @@ class UnitTemperatureConversion: error = d.pop("error", UNSET) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) input = d.pop("input", UNSET) diff --git a/kittycad/models/unit_time_conversion.py b/kittycad/models/unit_time_conversion.py index cce605986..88133681f 100644 --- a/kittycad/models/unit_time_conversion.py +++ b/kittycad/models/unit_time_conversion.py @@ -6,9 +6,10 @@ from dateutil.parser import isoparse from ..models.api_call_status import ApiCallStatus from ..models.unit_time_format import UnitTimeFormat +from ..models.uuid import Uuid from ..types import UNSET, Unset -P = TypeVar("P", bound="UnitTimeConversion") +K = TypeVar("K", bound="UnitTimeConversion") @attr.s(auto_attribs=True) @@ -86,7 +87,7 @@ class UnitTimeConversion: return field_dict @classmethod - def from_dict(cls: Type[P], src_dict: Dict[str, Any]) -> P: + def from_dict(cls: Type[K], src_dict: Dict[str, Any]) -> K: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -104,7 +105,12 @@ class UnitTimeConversion: error = d.pop("error", UNSET) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) input = d.pop("input", UNSET) diff --git a/kittycad/models/unit_velocity_conversion.py b/kittycad/models/unit_velocity_conversion.py index cd9265218..a4dbb0c5c 100644 --- a/kittycad/models/unit_velocity_conversion.py +++ b/kittycad/models/unit_velocity_conversion.py @@ -6,9 +6,10 @@ from dateutil.parser import isoparse from ..models.api_call_status import ApiCallStatus from ..models.unit_velocity_format import UnitVelocityFormat +from ..models.uuid import Uuid from ..types import UNSET, Unset -Y = TypeVar("Y", bound="UnitVelocityConversion") +N = TypeVar("N", bound="UnitVelocityConversion") @attr.s(auto_attribs=True) @@ -86,7 +87,7 @@ class UnitVelocityConversion: return field_dict @classmethod - def from_dict(cls: Type[Y], src_dict: Dict[str, Any]) -> Y: + def from_dict(cls: Type[N], src_dict: Dict[str, Any]) -> N: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -104,7 +105,12 @@ class UnitVelocityConversion: error = d.pop("error", UNSET) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) input = d.pop("input", UNSET) diff --git a/kittycad/models/unit_voltage_conversion.py b/kittycad/models/unit_voltage_conversion.py index 65459c6e4..71b806169 100644 --- a/kittycad/models/unit_voltage_conversion.py +++ b/kittycad/models/unit_voltage_conversion.py @@ -6,9 +6,10 @@ from dateutil.parser import isoparse from ..models.api_call_status import ApiCallStatus from ..models.unit_voltage_format import UnitVoltageFormat +from ..models.uuid import Uuid from ..types import UNSET, Unset -L = TypeVar("L", bound="UnitVoltageConversion") +H = TypeVar("H", bound="UnitVoltageConversion") @attr.s(auto_attribs=True) @@ -86,7 +87,7 @@ class UnitVoltageConversion: return field_dict @classmethod - def from_dict(cls: Type[L], src_dict: Dict[str, Any]) -> L: + def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -104,7 +105,12 @@ class UnitVoltageConversion: error = d.pop("error", UNSET) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) input = d.pop("input", UNSET) diff --git a/kittycad/models/unit_volume_conversion.py b/kittycad/models/unit_volume_conversion.py index 3bd164542..f80fd733e 100644 --- a/kittycad/models/unit_volume_conversion.py +++ b/kittycad/models/unit_volume_conversion.py @@ -6,9 +6,10 @@ from dateutil.parser import isoparse from ..models.api_call_status import ApiCallStatus from ..models.unit_volume_format import UnitVolumeFormat +from ..models.uuid import Uuid from ..types import UNSET, Unset -K = TypeVar("K", bound="UnitVolumeConversion") +A = TypeVar("A", bound="UnitVolumeConversion") @attr.s(auto_attribs=True) @@ -86,7 +87,7 @@ class UnitVolumeConversion: return field_dict @classmethod - def from_dict(cls: Type[K], src_dict: Dict[str, Any]) -> K: + def from_dict(cls: Type[A], src_dict: Dict[str, Any]) -> A: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -104,7 +105,12 @@ class UnitVolumeConversion: error = d.pop("error", UNSET) - id = d.pop("id", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = Uuid(_id) input = d.pop("input", UNSET) diff --git a/kittycad/models/update_user.py b/kittycad/models/update_user.py index a352a2167..97dfa11d0 100644 --- a/kittycad/models/update_user.py +++ b/kittycad/models/update_user.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -N = TypeVar("N", bound="UpdateUser") +R = TypeVar("R", bound="UpdateUser") @attr.s(auto_attribs=True) @@ -47,7 +47,7 @@ class UpdateUser: return field_dict @classmethod - def from_dict(cls: Type[N], src_dict: Dict[str, Any]) -> N: + def from_dict(cls: Type[R], src_dict: Dict[str, Any]) -> R: d = src_dict.copy() company = d.pop("company", UNSET) diff --git a/kittycad/models/user.py b/kittycad/models/user.py index f2feeea21..5edb39a94 100644 --- a/kittycad/models/user.py +++ b/kittycad/models/user.py @@ -6,7 +6,7 @@ from dateutil.parser import isoparse from ..types import UNSET, Unset -H = TypeVar("H", bound="User") +W = TypeVar("W", bound="User") @attr.s(auto_attribs=True) @@ -83,7 +83,7 @@ class User: return field_dict @classmethod - def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H: + def from_dict(cls: Type[W], src_dict: Dict[str, Any]) -> W: d = src_dict.copy() company = d.pop("company", UNSET) diff --git a/kittycad/models/user_results_page.py b/kittycad/models/user_results_page.py index 7ec68e8e6..8be6f782d 100644 --- a/kittycad/models/user_results_page.py +++ b/kittycad/models/user_results_page.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -A = TypeVar("A", bound="UserResultsPage") +B = TypeVar("B", bound="UserResultsPage") @attr.s(auto_attribs=True) @@ -37,7 +37,7 @@ class UserResultsPage: return field_dict @classmethod - def from_dict(cls: Type[A], src_dict: Dict[str, Any]) -> A: + def from_dict(cls: Type[B], src_dict: Dict[str, Any]) -> B: d = src_dict.copy() from ..models.user import User diff --git a/kittycad/models/verification_token.py b/kittycad/models/verification_token.py index 72136ca48..fec249380 100644 --- a/kittycad/models/verification_token.py +++ b/kittycad/models/verification_token.py @@ -6,7 +6,7 @@ from dateutil.parser import isoparse from ..types import UNSET, Unset -R = TypeVar("R", bound="VerificationToken") +K = TypeVar("K", bound="VerificationToken") @attr.s(auto_attribs=True) @@ -53,7 +53,7 @@ class VerificationToken: return field_dict @classmethod - def from_dict(cls: Type[R], src_dict: Dict[str, Any]) -> R: + def from_dict(cls: Type[K], src_dict: Dict[str, Any]) -> K: d = src_dict.copy() _created_at = d.pop("created_at", UNSET) created_at: Union[Unset, datetime.datetime] diff --git a/pyproject.toml b/pyproject.toml index 85c6082b1..53b125979 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "kittycad" -version = "0.4.1" +version = "0.4.2" description = "A client library for accessing KittyCAD" authors = [] diff --git a/spec.json b/spec.json index c4164eba3..4016be153 100644 --- a/spec.json +++ b/spec.json @@ -5041,224 +5041,6 @@ }, "type": "object" }, - "DrawingCmd": { - "description": "Commands that the KittyCAD engine can execute.", - "oneOf": [ - { - "additionalProperties": false, - "description": "Draw a circle.", - "properties": { - "DrawCircle": { - "properties": { - "center": { - "description": "The center of the circle.", - "items": { - "format": "float", - "type": "number" - }, - "maxItems": 3, - "minItems": 3, - "type": "array" - }, - "radius": { - "description": "The radius of the circle.", - "format": "float", - "type": "number" - } - }, - "required": [ - "center", - "radius" - ], - "type": "object" - } - }, - "required": [ - "DrawCircle" - ], - "type": "object" - }, - { - "additionalProperties": false, - "description": "Extrude a sketch.", - "properties": { - "Extrude": { - "properties": { - "distance": { - "description": "How far to extrude.", - "format": "float", - "type": "number" - }, - "sketch": { - "allOf": [ - { - "$ref": "#/components/schemas/DrawingCmdId" - } - ], - "description": "Which sketch to extrude." - } - }, - "required": [ - "distance", - "sketch" - ], - "type": "object" - } - }, - "required": [ - "Extrude" - ], - "type": "object" - } - ] - }, - "DrawingCmdId": { - "description": "All commands have unique IDs. These should be randomly generated.", - "format": "uuid", - "type": "string" - }, - "DrawingCmdReq": { - "description": "A graphics command submitted to the KittyCAD engine via the Drawing API.", - "properties": { - "cmd": { - "$ref": "#/components/schemas/DrawingCmd" - }, - "cmd_id": { - "$ref": "#/components/schemas/DrawingCmdId" - }, - "file_id": { - "type": "string" - } - }, - "required": [ - "cmd", - "cmd_id", - "file_id" - ], - "type": "object" - }, - "DrawingCmdReqBatch": { - "description": "A batch set of graphics commands submitted to the KittyCAD engine via the Drawing API.", - "properties": { - "cmds": { - "additionalProperties": { - "$ref": "#/components/schemas/DrawingCmdReq" - }, - "description": "A set of commands to submit to the KittyCAD engine in a batch.", - "type": "object" - }, - "file_id": { - "description": "Which file is being drawn in.", - "type": "string" - } - }, - "required": [ - "cmds", - "file_id" - ], - "type": "object" - }, - "DrawingError": { - "description": "Why a command submitted to the Drawing API failed.", - "properties": { - "error_code": { - "description": "A string error code which refers to a family of errors. E.g. \"InvalidInput\".", - "type": "string" - }, - "external_message": { - "description": "Describe the specific error which occurred. Will be shown to users, not logged.", - "type": "string" - }, - "internal_message": { - "description": "Describe the specific error which occurred. Will be logged, not shown to users.", - "type": "string" - }, - "status_code": { - "description": "A HTTP status code.", - "format": "uint16", - "minimum": 0, - "type": "integer" - } - }, - "required": [ - "error_code", - "external_message", - "internal_message", - "status_code" - ], - "type": "object" - }, - "DrawingOutcome": { - "description": "The result from one drawing command in a batch.", - "oneOf": [ - { - "additionalProperties": false, - "description": "Each successful command has some result. Unfortunately this isn't strongly typed, because the result depends on the command. This means the OpenAPI schema for this won't be very useful.", - "properties": { - "Success": {} - }, - "required": [ - "Success" - ], - "type": "object" - }, - { - "additionalProperties": false, - "description": "It failed. Why? See 'struct Error' above.", - "properties": { - "Error": { - "$ref": "#/components/schemas/DrawingError" - } - }, - "required": [ - "Error" - ], - "type": "object" - }, - { - "additionalProperties": false, - "description": "Cancelled because it required the output of a previous command, which failed.", - "properties": { - "Cancelled": { - "properties": { - "what_failed": { - "allOf": [ - { - "$ref": "#/components/schemas/DrawingCmdId" - } - ], - "description": "The ID of the command that failed, cancelling this command." - } - }, - "required": [ - "what_failed" - ], - "type": "object" - } - }, - "required": [ - "Cancelled" - ], - "type": "object" - } - ] - }, - "DrawingOutcomes": { - "description": "The result from a batch of drawing commands.", - "properties": { - "outcomes": { - "additionalProperties": { - "$ref": "#/components/schemas/DrawingOutcome" - }, - "description": "The results from each command in the batch.", - "type": "object" - } - }, - "required": [ - "outcomes" - ], - "type": "object" - }, "EmailAuthenticationForm": { "description": "The body of the form for email authentication.", "properties": { @@ -5335,12 +5117,29 @@ }, "Environment": { "description": "The environment the server is running in.", - "enum": [ - "DEVELOPMENT", - "PREVIEW", - "PRODUCTION" - ], - "type": "string" + "oneOf": [ + { + "description": "The development environment. This is for running locally.", + "enum": [ + "DEVELOPMENT" + ], + "type": "string" + }, + { + "description": "The preview environment. This is when PRs are created and a service is deployed for testing.", + "enum": [ + "PREVIEW" + ], + "type": "string" + }, + { + "description": "The production environment.", + "enum": [ + "PRODUCTION" + ], + "type": "string" + } + ] }, "Error": { "description": "Error information from a response.", @@ -5504,6 +5303,29 @@ ], "type": "object" }, + "Extrude": { + "description": "Command for extruding a solid.", + "properties": { + "distance": { + "description": "How far off the plane to extrude", + "format": "double", + "type": "number" + }, + "target": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelingCmdId" + } + ], + "description": "Which sketch to extrude" + } + }, + "required": [ + "distance", + "target" + ], + "type": "object" + }, "FileCenterOfMass": { "description": "A file center of mass result.", "properties": { @@ -6632,6 +6454,32 @@ }, "type": "object" }, + "Line3d": { + "description": "Command for adding a line.", + "properties": { + "from": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" + } + ], + "description": "Start of the line" + }, + "to": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" + } + ], + "description": "End of the line" + } + }, + "required": [ + "from", + "to" + ], + "type": "object" + }, "Mesh": { "properties": { "mesh": { @@ -6816,6 +6664,221 @@ } ] }, + "ModelingCmd": { + "description": "Commands that the KittyCAD engine can execute.", + "oneOf": [ + { + "additionalProperties": false, + "description": "Add a line", + "properties": { + "AddLine": { + "$ref": "#/components/schemas/Line3d" + } + }, + "required": [ + "AddLine" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "Extrude a solid", + "properties": { + "Extrude": { + "$ref": "#/components/schemas/Extrude" + } + }, + "required": [ + "Extrude" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "Mouse clicked on the engine window, trying to select some surface.", + "properties": { + "SelectionClick": { + "properties": { + "at": { + "allOf": [ + { + "$ref": "#/components/schemas/Point2d" + } + ], + "description": "Where the mouse was clicked. TODO engine#1035: Choose a coordinate system for this." + } + }, + "required": [ + "at" + ], + "type": "object" + } + }, + "required": [ + "SelectionClick" + ], + "type": "object" + } + ] + }, + "ModelingCmdId": { + "description": "All commands have unique IDs. These should be randomly generated.", + "format": "uuid", + "type": "string" + }, + "ModelingCmdReq": { + "description": "A graphics command submitted to the KittyCAD engine via the Modeling API.", + "properties": { + "cmd": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelingCmd" + } + ], + "description": "Which command to submit to the Kittycad engine." + }, + "cmd_id": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelingCmdId" + } + ], + "description": "ID of command being submitted." + }, + "file_id": { + "description": "ID of the model's file.", + "type": "string" + } + }, + "required": [ + "cmd", + "cmd_id", + "file_id" + ], + "type": "object" + }, + "ModelingCmdReqBatch": { + "description": "A batch set of graphics commands submitted to the KittyCAD engine via the Modeling API.", + "properties": { + "cmds": { + "additionalProperties": { + "$ref": "#/components/schemas/ModelingCmdReq" + }, + "description": "A set of commands to submit to the KittyCAD engine in a batch.", + "type": "object" + }, + "file_id": { + "description": "Which file is being drawn in.", + "type": "string" + } + }, + "required": [ + "cmds", + "file_id" + ], + "type": "object" + }, + "ModelingError": { + "description": "Why a command submitted to the Modeling API failed.", + "properties": { + "error_code": { + "description": "A string error code which refers to a family of errors. E.g. \"InvalidInput\".", + "type": "string" + }, + "external_message": { + "description": "Describe the specific error which occurred. Will be shown to users, not logged.", + "type": "string" + }, + "internal_message": { + "description": "Describe the specific error which occurred. Will be logged, not shown to users.", + "type": "string" + }, + "status_code": { + "description": "A HTTP status code.", + "format": "uint16", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "error_code", + "external_message", + "internal_message", + "status_code" + ], + "type": "object" + }, + "ModelingOutcome": { + "description": "The result from one modeling command in a batch.", + "oneOf": [ + { + "additionalProperties": false, + "description": "Each successful command has some result. Unfortunately this isn't strongly typed, because the result depends on the command. This means the OpenAPI schema for this won't be very useful.", + "properties": { + "Success": {} + }, + "required": [ + "Success" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "It failed. Why? See 'struct Error' above.", + "properties": { + "Error": { + "$ref": "#/components/schemas/ModelingError" + } + }, + "required": [ + "Error" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "Cancelled because it required the output of a previous command, which failed.", + "properties": { + "Cancelled": { + "properties": { + "what_failed": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelingCmdId" + } + ], + "description": "The ID of the command that failed, cancelling this command." + } + }, + "required": [ + "what_failed" + ], + "type": "object" + } + }, + "required": [ + "Cancelled" + ], + "type": "object" + } + ] + }, + "ModelingOutcomes": { + "description": "The result from a batch of modeling commands.", + "properties": { + "outcomes": { + "additionalProperties": { + "$ref": "#/components/schemas/ModelingOutcome" + }, + "description": "The results from each command in the batch.", + "type": "object" + } + }, + "required": [ + "outcomes" + ], + "type": "object" + }, "NewAddress": { "description": "The struct that is used to create a new record. This is automatically generated and has all the same fields as the main struct only it is missing the `id`.", "properties": { @@ -7366,6 +7429,47 @@ }, "type": "object" }, + "Point2d": { + "description": "A point in 2D space", + "properties": { + "x": { + "format": "float", + "type": "number" + }, + "y": { + "format": "float", + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "type": "object" + }, + "Point3d": { + "description": "A point in 3D space", + "properties": { + "x": { + "format": "float", + "type": "number" + }, + "y": { + "format": "float", + "type": "number" + }, + "z": { + "format": "float", + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "type": "object" + }, "PointEMetadata": { "description": "Metadata about our point-e instance.\n\nThis is mostly used for internal purposes and debugging.", "properties": { @@ -13292,255 +13396,6 @@ ] } }, - "/drawing/cmd": { - "options": { - "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_cmd", - "responses": { - "204": { - "description": "successful operation, no content", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "OPTIONS endpoint.", - "tags": [ - "hidden" - ] - }, - "post": { - "description": "Response depends on which command was submitted, so unfortunately the OpenAPI schema can't generate the right response type.", - "operationId": "cmd", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DrawingCmdReq" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": {} - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Submit one drawing operation.", - "tags": [ - "drawing", - "hidden" - ] - } - }, - "/drawing/cmd_batch": { - "options": { - "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_cmd_batch", - "responses": { - "204": { - "description": "successful operation, no content", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "OPTIONS endpoint.", - "tags": [ - "hidden" - ] - }, - "post": { - "operationId": "cmd_batch", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DrawingCmdReqBatch" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DrawingOutcomes" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Submit many drawing operations.", - "tags": [ - "drawing", - "hidden" - ] - } - }, "/file/center-of-mass": { "options": { "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", @@ -13596,7 +13451,7 @@ ] }, "post": { - "description": "Get the center of mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", + "description": "We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.\nCurrently, this endpoint returns the cartesian co-ordinate in world space measure units.\nIn the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.\nGet the center of mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", "operationId": "create_file_center_of_mass", "parameters": [ { @@ -13675,7 +13530,8 @@ "summary": "Get CAD file center of mass.", "tags": [ "file", - "beta" + "beta", + "hidden" ] } }, @@ -13900,7 +13756,7 @@ ] }, "post": { - "description": "Get the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", + "description": "We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.\nCurrently, this endpoint assumes if you are giving a material mass in a specific mass units, we return a density in mass unit per cubic measure unit.\nIn the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.\nGet the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", "operationId": "create_file_density", "parameters": [ { @@ -14205,7 +14061,7 @@ ] }, "post": { - "description": "Get the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", + "description": "We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.\nCurrently, this endpoint assumes if you are giving a material density in a specific mass unit per cubic measure unit, we return a mass in mass units. The same mass units as passed in the material density.\nIn the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.\nGet the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", "operationId": "create_file_mass", "parameters": [ { @@ -14353,7 +14209,7 @@ ] }, "post": { - "description": "Get the surface area of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", + "description": "We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.\nCurrently, this endpoint returns the square measure units.\nIn the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.\nGet the surface area of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", "operationId": "create_file_surface_area", "parameters": [ { @@ -14432,7 +14288,8 @@ "summary": "Get CAD file surface area.", "tags": [ "file", - "beta" + "beta", + "hidden" ] } }, @@ -14491,7 +14348,7 @@ ] }, "post": { - "description": "Get the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", + "description": "We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.\nCurrently, this endpoint returns the cubic measure units.\nIn the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.\nGet the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", "operationId": "create_file_volume", "parameters": [ { @@ -14570,7 +14427,8 @@ "summary": "Get CAD file volume.", "tags": [ "file", - "beta" + "beta", + "hidden" ] } }, @@ -14690,6 +14548,255 @@ ] } }, + "/modeling/cmd": { + "options": { + "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", + "operationId": "options_cmd", + "responses": { + "204": { + "description": "successful operation, no content", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "OPTIONS endpoint.", + "tags": [ + "hidden" + ] + }, + "post": { + "description": "Response depends on which command was submitted, so unfortunately the OpenAPI schema can't generate the right response type.", + "operationId": "cmd", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelingCmdReq" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": {} + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Submit one modeling operation.", + "tags": [ + "modeling", + "hidden" + ] + } + }, + "/modeling/cmd_batch": { + "options": { + "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", + "operationId": "options_cmd_batch", + "responses": { + "204": { + "description": "successful operation, no content", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "OPTIONS endpoint.", + "tags": [ + "hidden" + ] + }, + "post": { + "operationId": "cmd_batch", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelingCmdReqBatch" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelingOutcomes" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Submit many modeling operations.", + "tags": [ + "modeling", + "hidden" + ] + } + }, "/oauth2/device/auth": { "options": { "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", @@ -20372,6 +20479,28 @@ ], "x-dropshot-websocket": {} } + }, + "/ws/modeling/commands": { + "get": { + "description": "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.", + "operationId": "modeling_commands_ws", + "responses": { + "default": { + "content": { + "*/*": { + "schema": {} + } + }, + "description": "" + } + }, + "summary": "Open a websocket which accepts modeling commands.", + "tags": [ + "modeling", + "hidden" + ], + "x-dropshot-websocket": {} + } } }, "tags": [ @@ -20417,13 +20546,6 @@ }, "name": "constant" }, - { - "description": "Drawing API for updating your 3D files using the KittyCAD engine.", - "externalDocs": { - "url": "https://docs.kittycad.io/api/drawing" - }, - "name": "drawing" - }, { "description": "Endpoints that allow for code execution or creation of code execution environments.", "externalDocs": { @@ -20452,6 +20574,13 @@ }, "name": "meta" }, + { + "description": "Modeling API for updating your 3D files using the KittyCAD engine.", + "externalDocs": { + "url": "https://docs.kittycad.io/api/modeling" + }, + "name": "modeling" + }, { "description": "Endpoints that implement OAuth 2.0 grant flows.", "externalDocs": { @@ -20481,4 +20610,4 @@ "name": "users" } ] -} +} \ No newline at end of file