diff --git a/docs/conf.py b/docs/conf.py index a4c3e90b7..f73e28422 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -126,6 +126,7 @@ intersphinx_mapping = { "python": ("https://docs.python.org/3", None), } + # This is a function linkcode_resolve(domain, info), which should return the URL # to source code corresponding to the object in given domain with given information. # FROM: https://www.sphinx-doc.org/en/master/usage/extensions/linkcode.html diff --git a/generate/generate.py b/generate/generate.py index 34db87526..49794033c 100755 --- a/generate/generate.py +++ b/generate/generate.py @@ -293,6 +293,17 @@ def generateTypeAndExamplePython( raise Exception("Unknown parameter type") elif "oneOf" in schema and len(schema["oneOf"]) > 0: one_of = schema["oneOf"][0] + # Start Path is a weird one, let's skip it. + # Technically we should be able to handle it, but it's not worth the effort. + # We should also have a more algorithmic way of handling this for any other weird cases. + # But for now, let's just skip it. + if ( + "enum" in one_of + and len(one_of["enum"]) > 0 + and one_of["enum"][0] == "StartPath" + ): + one_of = schema["oneOf"][1] + # Check if each of these only has a object w 1 property. if isNestedObjectOneOf(schema): if "properties" in one_of: @@ -307,7 +318,7 @@ def generateTypeAndExamplePython( name, one_of, data, camel_to_snake(name) ) - return generateTypeAndExamplePython(name, schema["oneOf"][0], data, None) + return generateTypeAndExamplePython(name, one_of, data, None) elif "allOf" in schema and len(schema["allOf"]) == 1: return generateTypeAndExamplePython(name, schema["allOf"][0], data, None) elif "$ref" in schema: @@ -1976,7 +1987,7 @@ def renderTypeFromDict(f, property_name: str, property_schema: dict, data: dict) elif "$ref" in property_schema: ref = property_schema["$ref"].replace("#/components/schemas/", "") # Get the type for the reference. - ref_schema = data["components"]["schemas"][ref] + data["components"]["schemas"][ref] f.write( "\t\t_" @@ -1998,24 +2009,14 @@ def renderTypeFromDict(f, property_name: str, property_schema: dict, data: dict) f.write("\t\t\t" + clean_parameter_name(property_name) + " = UNSET\n") f.write("\t\telse:\n") - if isNestedObjectOneOf(ref_schema): - f.write( - "\t\t\t" - + clean_parameter_name(property_name) - + " = _" - + clean_parameter_name(property_name) - + " # type: ignore[arg-type]\n" - ) - else: - f.write( - "\t\t\t" - + clean_parameter_name(property_name) - + " = " - + ref - + "(_" - + clean_parameter_name(property_name) - + ")\n" - ) + f.write( + "\t\t\t" + + clean_parameter_name(property_name) + + " = _" + + clean_parameter_name(property_name) + + " # type: ignore[arg-type]\n" + ) + f.write("\n") elif "allOf" in property_schema: if len(property_schema["allOf"]) != 1: @@ -2396,12 +2397,19 @@ def getDetailedFunctionResultType(endpoint: dict, endpoint_refs: List[str]) -> s return "Response[" + getFunctionResultType(endpoint, endpoint_refs) + "]" -# generate a random letter in the range A - Z +letters: List[str] = [] + + +# generate a random letter combination in the range A - Z # do not use O or I. -def randletter(): - letter = chr(random.randint(ord("A"), ord("Z"))) - while letter == "I" or letter == "O": - letter = chr(random.randint(ord("A"), ord("Z"))) +# make sure we do not use a letter we have already used. +def randletter() -> str: + letter1 = chr(random.randint(ord("A"), ord("Z"))) + letter2 = chr(random.randint(ord("A"), ord("Z"))) + letter = letter1 + letter2 + while letter in letters: + return randletter() + letters.append(letter) return letter diff --git a/generate/run.sh b/generate/run.sh index ec565a0b4..f4b7e3452 100755 --- a/generate/run.sh +++ b/generate/run.sh @@ -17,8 +17,7 @@ poetry run python generate/generate.py poetry run isort . poetry run black . generate/generate.py docs/conf.py kittycad/client_test.py kittycad/examples_test.py poetry run ruff check --fix . -# We ignore errors here but we should eventually fix them. -poetry run mypy . || true +poetry run mypy . # Run the tests. diff --git a/kittycad.py.patch.json b/kittycad.py.patch.json index 521e8eeea..20694b492 100644 --- a/kittycad.py.patch.json +++ b/kittycad.py.patch.json @@ -1 +1 @@ -[{"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/~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/~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~1pressure~1{input_unit}~1{output_unit}/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 import UnitPressure\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 input_unit=UnitPressure.ATMOSPHERES,\n output_unit=UnitPressure.ATMOSPHERES,\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/~1unit~1conversion~1torque~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_torque_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitTorqueConversion\nfrom kittycad.models.unit_torque import UnitTorque\nfrom kittycad.types import Response\n\n\ndef example_get_torque_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitTorqueConversion, Error]\n ] = get_torque_unit_conversion.sync(\n client=client,\n input_unit=UnitTorque.NEWTON_METRES,\n output_unit=UnitTorque.NEWTON_METRES,\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: UnitTorqueConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_torque_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/~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/~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~1area~1{input_unit}~1{output_unit}/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 import UnitArea\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 input_unit=UnitArea.ACRES,\n output_unit=UnitArea.ACRES,\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/~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/~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.modeling_cmd import ModelingCmd\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.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=ModelingCmd.START_PATH,\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~1temperature~1{input_unit}~1{output_unit}/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 import UnitTemperature\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 input_unit=UnitTemperature.CELSIUS,\n output_unit=UnitTemperature.CELSIUS,\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/~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/~1unit~1conversion~1volume~1{input_unit}~1{output_unit}/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 import UnitVolume\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 input_unit=UnitVolume.CUBIC_CENTIMETRES,\n output_unit=UnitVolume.CUBIC_CENTIMETRES,\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/~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~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/~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/~1modeling~1cmd/post/x-python", "value": {"example": "from kittycad.api.modeling import cmd\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models.modeling_cmd import ModelingCmd\nfrom kittycad.models.modeling_cmd_id import ModelingCmdId\nfrom kittycad.models.modeling_cmd_req import ModelingCmdReq\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=ModelingCmd.START_PATH,\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/~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/~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/~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/~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/~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/~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/~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/~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~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/~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/~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~1angle~1{input_unit}~1{output_unit}/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 import UnitAngle\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 input_unit=UnitAngle.DEGREES,\n output_unit=UnitAngle.DEGREES,\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/~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/~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/~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/~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~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/~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/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/~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/~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/~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~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~1length~1{input_unit}~1{output_unit}/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 import UnitLength\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 input_unit=UnitLength.CENTIMETRES,\n output_unit=UnitLength.CENTIMETRES,\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~1power~1{input_unit}~1{output_unit}/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 import UnitPower\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 input_unit=UnitPower.BTU_PER_MINUTE,\n output_unit=UnitPower.BTU_PER_MINUTE,\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/~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~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/~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/~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/~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/~1unit~1conversion~1mass~1{input_unit}~1{output_unit}/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 import UnitMass\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 input_unit=UnitMass.CARATS,\n output_unit=UnitMass.CARATS,\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/~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/~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/~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/~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/~1unit~1conversion~1energy~1{input_unit}~1{output_unit}/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 import UnitEnergy\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 input_unit=UnitEnergy.BTU,\n output_unit=UnitEnergy.BTU,\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/~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~1force~1{input_unit}~1{output_unit}/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 import UnitForce\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 input_unit=UnitForce.DYNES,\n output_unit=UnitForce.DYNES,\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/~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/~1unit~1conversion~1frequency~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_frequency_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitFrequencyConversion\nfrom kittycad.models.unit_frequency import UnitFrequency\nfrom kittycad.types import Response\n\n\ndef example_get_frequency_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitFrequencyConversion, Error]\n ] = get_frequency_unit_conversion.sync(\n client=client,\n input_unit=UnitFrequency.GIGAHERTZ,\n output_unit=UnitFrequency.GIGAHERTZ,\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: UnitFrequencyConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_frequency_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/~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/~1unit~1conversion~1current~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_current_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitCurrentConversion\nfrom kittycad.models.unit_current import UnitCurrent\nfrom kittycad.types import Response\n\n\ndef example_get_current_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitCurrentConversion, Error]\n ] = get_current_unit_conversion.sync(\n client=client,\n input_unit=UnitCurrent.AMPERES,\n output_unit=UnitCurrent.AMPERES,\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: UnitCurrentConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_current_unit_conversion.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/~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/~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/~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": "/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/UnitForce/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitForce/enum", "value": ["dynes", "kiloponds", "micronewtons", "millinewtons", "newtons", "poundals", "pounds"]}, {"op": "add", "path": "/components/schemas/UnitCurrent/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitCurrent/enum", "value": ["amperes", "microamperes", "milliamperes", "nanoamperes"]}, {"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/UnitMass/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitMass/enum", "value": ["carats", "grains", "grams", "kilograms", "long_tons", "metric_tons", "micrograms", "milligrams", "ounces", "pennyweights", "pounds", "short_tons", "stones", "troy_ounces", "troy_pounds"]}, {"op": "add", "path": "/components/schemas/FileExportFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/FileExportFormat/enum", "value": ["dae", "dxf", "fbx", "fbxb", "gltf", "obj", "ply", "step", "stl"]}, {"op": "add", "path": "/components/schemas/UnitTorque/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitTorque/enum", "value": ["newton_metres", "pound_foot"]}, {"op": "add", "path": "/components/schemas/UnitEnergy/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitEnergy/enum", "value": ["btu", "electronvolts", "joules", "kilocalories", "kilowatt_hours", "watt_hours"]}, {"op": "add", "path": "/components/schemas/FileImportFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/FileImportFormat/enum", "value": ["dae", "dxf", "fbx", "gltf", "obj", "ply", "step", "stl"]}, {"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/AiPluginHttpAuthType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/AiPluginHttpAuthType/enum", "value": ["basic", "bearer"]}, {"op": "add", "path": "/components/schemas/UnitPower/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitPower/enum", "value": ["btu_per_minute", "horsepower", "kilowatts", "metric_horsepower", "microwatts", "milliwatts", "watts"]}, {"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/UnitArea/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitArea/enum", "value": ["acres", "hectares", "square_centimetres", "square_decimetres", "square_feet", "square_hectometres", "square_inches", "square_kilometres", "square_metres", "square_micrometres", "square_miles", "square_millimetres", "square_nanometres", "square_yards"]}, {"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/Storage/type", "value": "string"}, {"op": "add", "path": "/components/schemas/Storage/enum", "value": ["binary", "standard", "embedded"]}, {"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/CodeLanguage/type", "value": "string"}, {"op": "add", "path": "/components/schemas/CodeLanguage/enum", "value": ["go", "python", "node"]}, {"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/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/Direction/type", "value": "string"}, {"op": "add", "path": "/components/schemas/Direction/enum", "value": ["positive", "negative"]}, {"op": "add", "path": "/components/schemas/UnitPressure/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitPressure/enum", "value": ["atmospheres", "bars", "hectopascals", "kilopascals", "millibars", "pascals", "psi"]}, {"op": "add", "path": "/components/schemas/Axis/type", "value": "string"}, {"op": "add", "path": "/components/schemas/Axis/enum", "value": ["y", "z"]}, {"op": "add", "path": "/components/schemas/UnitVolume/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitVolume/enum", "value": ["cubic_centimetres", "cubic_feet", "cubic_inches", "cubic_metres", "cubic_yards", "cups", "drams", "drops", "fluid_ounces", "fluid_ounces_uk", "gallons", "gallons_uk", "litres", "millilitres", "pints", "pints_uk", "quarts", "tablespoons", "teaspoons"]}, {"op": "add", "path": "/components/schemas/AccountProvider/type", "value": "string"}, {"op": "add", "path": "/components/schemas/AccountProvider/enum", "value": ["google", "github"]}, {"op": "add", "path": "/components/schemas/CameraDragInteractionType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/CameraDragInteractionType/enum", "value": ["pan", "rotate", "zoom"]}, {"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/PaymentMethodType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/PaymentMethodType/enum", "value": ["card"]}, {"op": "add", "path": "/components/schemas/AiPluginApiType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/AiPluginApiType/enum", "value": ["openapi"]}, {"op": "add", "path": "/components/schemas/UnitLength/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitLength/enum", "value": ["centimetres", "decimetres", "feet", "furlongs", "hectometres", "inches", "kilometres", "metres", "micrometres", "miles", "millimetres", "nanometres", "yards"]}, {"op": "add", "path": "/components/schemas/UnitAngle/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitAngle/enum", "value": ["degrees", "radians"]}, {"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/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/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/UnitFrequency/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitFrequency/enum", "value": ["gigahertz", "hertz", "kilohertz", "megahertz", "microhertz", "millihertz", "nanohertz", "terahertz"]}, {"op": "add", "path": "/components/schemas/UnitTemperature/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitTemperature/enum", "value": ["celsius", "fahrenheit", "kelvin", "rankine"]}, {"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"}}] \ No newline at end of file +[{"op": "add", "path": "/components/schemas/UnitEnergy/enum", "value": ["btu", "electronvolts", "joules", "kilocalories", "kilowatt_hours", "watt_hours"]}, {"op": "add", "path": "/components/schemas/UnitEnergy/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitForce/enum", "value": ["dynes", "kiloponds", "micronewtons", "millinewtons", "newtons", "poundals", "pounds"]}, {"op": "add", "path": "/components/schemas/UnitForce/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitFrequency/enum", "value": ["gigahertz", "hertz", "kilohertz", "megahertz", "microhertz", "millihertz", "nanohertz", "terahertz"]}, {"op": "add", "path": "/components/schemas/UnitFrequency/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/AsyncApiCallType/enum", "value": ["FileConversion", "FileVolume", "FileCenterOfMass", "FileMass", "FileDensity", "FileSurfaceArea"]}, {"op": "add", "path": "/components/schemas/AsyncApiCallType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitAngle/enum", "value": ["degrees", "radians"]}, {"op": "add", "path": "/components/schemas/UnitAngle/type", "value": "string"}, {"op": "add", "path": "/components/schemas/Direction/enum", "value": ["positive", "negative"]}, {"op": "add", "path": "/components/schemas/Direction/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/UnitTorque/enum", "value": ["newton_metres", "pound_foot"]}, {"op": "add", "path": "/components/schemas/UnitTorque/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitArea/enum", "value": ["cm2", "dm2", "ft2", "in2", "km2", "m2", "mm2", "yd2"]}, {"op": "add", "path": "/components/schemas/UnitArea/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/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/FileImportFormat/enum", "value": ["dae", "fbx", "gltf", "obj", "ply", "step", "stl"]}, {"op": "add", "path": "/components/schemas/FileImportFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitCurrent/enum", "value": ["amperes", "microamperes", "milliamperes", "nanoamperes"]}, {"op": "add", "path": "/components/schemas/UnitCurrent/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/CameraDragInteractionType/enum", "value": ["pan", "rotate", "zoom"]}, {"op": "add", "path": "/components/schemas/CameraDragInteractionType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitPressure/enum", "value": ["atmospheres", "bars", "hectopascals", "kilopascals", "millibars", "pascals", "psi"]}, {"op": "add", "path": "/components/schemas/UnitPressure/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitVolume/enum", "value": ["cm3", "ft3", "in3", "m3", "yd3", "usfloz", "usgal", "l", "ml"]}, {"op": "add", "path": "/components/schemas/UnitVolume/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/UnitMass/enum", "value": ["g", "kg", "lb"]}, {"op": "add", "path": "/components/schemas/UnitMass/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/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/CodeLanguage/enum", "value": ["go", "python", "node"]}, {"op": "add", "path": "/components/schemas/CodeLanguage/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/UnitDensity/enum", "value": ["lb:ft3", "kg:m3"]}, {"op": "add", "path": "/components/schemas/UnitDensity/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/AiPluginApiType/enum", "value": ["openapi"]}, {"op": "add", "path": "/components/schemas/AiPluginApiType/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/AccountProvider/enum", "value": ["google", "github"]}, {"op": "add", "path": "/components/schemas/AccountProvider/type", "value": "string"}, {"op": "add", "path": "/components/schemas/Environment/enum", "value": ["DEVELOPMENT", "PREVIEW", "PRODUCTION"]}, {"op": "add", "path": "/components/schemas/Environment/type", "value": "string"}, {"op": "add", "path": "/components/schemas/FileExportFormat/enum", "value": ["dae", "fbx", "fbxb", "gltf", "obj", "ply", "step", "stl"]}, {"op": "add", "path": "/components/schemas/FileExportFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/Axis/enum", "value": ["y", "z"]}, {"op": "add", "path": "/components/schemas/Axis/type", "value": "string"}, {"op": "add", "path": "/components/schemas/Storage/enum", "value": ["binary", "standard", "embedded"]}, {"op": "add", "path": "/components/schemas/Storage/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitTemperature/enum", "value": ["celsius", "fahrenheit", "kelvin", "rankine"]}, {"op": "add", "path": "/components/schemas/UnitTemperature/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/UnitPower/enum", "value": ["btu_per_minute", "horsepower", "kilowatts", "metric_horsepower", "microwatts", "milliwatts", "watts"]}, {"op": "add", "path": "/components/schemas/UnitPower/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitLength/enum", "value": ["cm", "ft", "in", "m", "mm", "yd"]}, {"op": "add", "path": "/components/schemas/UnitLength/type", "value": "string"}, {"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/~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/~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/~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/~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/~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/~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~1pressure~1{input_unit}~1{output_unit}/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 import UnitPressure\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 input_unit=UnitPressure.ATMOSPHERES,\n output_unit=UnitPressure.ATMOSPHERES,\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/~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/~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/~1unit~1conversion~1volume~1{input_unit}~1{output_unit}/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 import UnitVolume\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 input_unit=UnitVolume.CM3,\n output_unit=UnitVolume.CM3,\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/~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/~1unit~1conversion~1angle~1{input_unit}~1{output_unit}/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 import UnitAngle\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 input_unit=UnitAngle.DEGREES,\n output_unit=UnitAngle.DEGREES,\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/~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/~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/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/~1modeling~1cmd/post/x-python", "value": {"example": "from kittycad.api.modeling import cmd\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models.modeling_cmd import MovePathPen\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=MovePathPen(\n path=ModelingCmdId(\"\"),\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/~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/~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.models.unit_area import UnitArea\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 output_unit=UnitArea.CM2,\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~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/~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.modeling_cmd import MovePathPen\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=MovePathPen(\n path=ModelingCmdId(\"\"),\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/~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.models.unit_volume import UnitVolume\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 output_unit=UnitVolume.CM3,\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/~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/~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/~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~1energy~1{input_unit}~1{output_unit}/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 import UnitEnergy\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 input_unit=UnitEnergy.BTU,\n output_unit=UnitEnergy.BTU,\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~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/~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/~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/~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/~1unit~1conversion~1area~1{input_unit}~1{output_unit}/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 import UnitArea\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 input_unit=UnitArea.CM2,\n output_unit=UnitArea.CM2,\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/~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/~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~1length~1{input_unit}~1{output_unit}/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 import UnitLength\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 input_unit=UnitLength.CM,\n output_unit=UnitLength.CM,\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/~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/~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.models.unit_density import UnitDensity\nfrom kittycad.models.unit_mass import UnitMass\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 material_mass_unit=UnitMass.G,\n output_unit=UnitDensity.LB_FT3,\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/~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/~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~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/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/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/~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/~1unit~1conversion~1mass~1{input_unit}~1{output_unit}/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 import UnitMass\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 input_unit=UnitMass.G,\n output_unit=UnitMass.G,\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/~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/~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.models.unit_density import UnitDensity\nfrom kittycad.models.unit_mass import UnitMass\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 material_density_unit=UnitDensity.LB_FT3,\n output_unit=UnitMass.G,\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/~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~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/~1unit~1conversion~1torque~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_torque_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitTorqueConversion\nfrom kittycad.models.unit_torque import UnitTorque\nfrom kittycad.types import Response\n\n\ndef example_get_torque_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitTorqueConversion, Error]\n ] = get_torque_unit_conversion.sync(\n client=client,\n input_unit=UnitTorque.NEWTON_METRES,\n output_unit=UnitTorque.NEWTON_METRES,\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: UnitTorqueConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_torque_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/~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/~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/~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/~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.models.unit_length import UnitLength\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 output_unit=UnitLength.CM,\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/~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/~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/~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/~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/~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/~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~1temperature~1{input_unit}~1{output_unit}/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 import UnitTemperature\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 input_unit=UnitTemperature.CELSIUS,\n output_unit=UnitTemperature.CELSIUS,\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/~1unit~1conversion~1frequency~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_frequency_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitFrequencyConversion\nfrom kittycad.models.unit_frequency import UnitFrequency\nfrom kittycad.types import Response\n\n\ndef example_get_frequency_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitFrequencyConversion, Error]\n ] = get_frequency_unit_conversion.sync(\n client=client,\n input_unit=UnitFrequency.GIGAHERTZ,\n output_unit=UnitFrequency.GIGAHERTZ,\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: UnitFrequencyConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_frequency_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/~1unit~1conversion~1power~1{input_unit}~1{output_unit}/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 import UnitPower\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 input_unit=UnitPower.BTU_PER_MINUTE,\n output_unit=UnitPower.BTU_PER_MINUTE,\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/~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/~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~1force~1{input_unit}~1{output_unit}/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 import UnitForce\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 input_unit=UnitForce.DYNES,\n output_unit=UnitForce.DYNES,\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~1current~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_current_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitCurrentConversion\nfrom kittycad.models.unit_current import UnitCurrent\nfrom kittycad.types import Response\n\n\ndef example_get_current_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitCurrentConversion, Error]\n ] = get_current_unit_conversion.sync(\n client=client,\n input_unit=UnitCurrent.AMPERES,\n output_unit=UnitCurrent.AMPERES,\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: UnitCurrentConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_current_unit_conversion.html"}}, {"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"}}] \ No newline at end of file diff --git a/kittycad/api/api_calls/get_async_operation.py b/kittycad/api/api_calls/get_async_operation.py index 9bd1f9de1..95aa73ec8 100644 --- a/kittycad/api/api_calls/get_async_operation.py +++ b/kittycad/api/api_calls/get_async_operation.py @@ -180,7 +180,8 @@ def sync( """Get the status and output of an async operation. This endpoint requires authentication by any KittyCAD user. It returns details of the requested async operation for the user. If the user is not authenticated to view the specified async operation, then it is not returned. - Only KittyCAD employees with the proper access can view async operations for other users.""" # noqa: E501 + Only KittyCAD employees with the proper access can view async operations for other users. + """ # noqa: E501 return sync_detailed( id=id, @@ -234,7 +235,8 @@ async def asyncio( """Get the status and output of an async operation. This endpoint requires authentication by any KittyCAD user. It returns details of the requested async operation for the user. If the user is not authenticated to view the specified async operation, then it is not returned. - Only KittyCAD employees with the proper access can view async operations for other users.""" # noqa: E501 + Only KittyCAD employees with the proper access can view async operations for other users. + """ # noqa: E501 return ( await asyncio_detailed( diff --git a/kittycad/api/api_calls/list_api_calls_for_user.py b/kittycad/api/api_calls/list_api_calls_for_user.py index 55a631c59..a29b32bcc 100644 --- a/kittycad/api/api_calls/list_api_calls_for_user.py +++ b/kittycad/api/api_calls/list_api_calls_for_user.py @@ -106,7 +106,8 @@ def sync( """This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user if "me" is passed as the user id. Alternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user. If the authenticated user is a KittyCAD employee, then the API calls are returned for the user specified by the user id. - The API calls are returned in order of creation, with the most recently created API calls first.""" # noqa: E501 + The API calls are returned in order of creation, with the most recently created API calls first. + """ # noqa: E501 return sync_detailed( id=id, @@ -150,7 +151,8 @@ async def asyncio( """This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user if "me" is passed as the user id. Alternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user. If the authenticated user is a KittyCAD employee, then the API calls are returned for the user specified by the user id. - The API calls are returned in order of creation, with the most recently created API calls first.""" # noqa: E501 + The API calls are returned in order of creation, with the most recently created API calls first. + """ # noqa: E501 return ( await asyncio_detailed( diff --git a/kittycad/api/api_calls/user_list_api_calls.py b/kittycad/api/api_calls/user_list_api_calls.py index 591aaf5a6..eac4d11ba 100644 --- a/kittycad/api/api_calls/user_list_api_calls.py +++ b/kittycad/api/api_calls/user_list_api_calls.py @@ -100,7 +100,8 @@ def sync( page_token: Optional[str] = None, ) -> Optional[Union[ApiCallWithPriceResultsPage, Error]]: """This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user. - The API calls are returned in order of creation, with the most recently created API calls first.""" # noqa: E501 + The API calls are returned in order of creation, with the most recently created API calls first. + """ # noqa: E501 return sync_detailed( limit=limit, @@ -138,7 +139,8 @@ async def asyncio( page_token: Optional[str] = None, ) -> Optional[Union[ApiCallWithPriceResultsPage, Error]]: """This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user. - The API calls are returned in order of creation, with the most recently created API calls first.""" # noqa: E501 + The API calls are returned in order of creation, with the most recently created API calls first. + """ # noqa: E501 return ( await asyncio_detailed( diff --git a/kittycad/api/api_tokens/delete_api_token_for_user.py b/kittycad/api/api_tokens/delete_api_token_for_user.py index c62507666..15f67f9db 100644 --- a/kittycad/api/api_tokens/delete_api_token_for_user.py +++ b/kittycad/api/api_tokens/delete_api_token_for_user.py @@ -71,7 +71,8 @@ def sync( client: Client, ) -> Optional[Error]: """This endpoint requires authentication by any KittyCAD user. It deletes the requested API token for the user. - This endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes.""" # noqa: E501 + This endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes. + """ # noqa: E501 return sync_detailed( token=token, @@ -101,7 +102,8 @@ async def asyncio( client: Client, ) -> Optional[Error]: """This endpoint requires authentication by any KittyCAD user. It deletes the requested API token for the user. - This endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes.""" # noqa: E501 + This endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes. + """ # noqa: E501 return ( await asyncio_detailed( diff --git a/kittycad/api/api_tokens/list_api_tokens_for_user.py b/kittycad/api/api_tokens/list_api_tokens_for_user.py index bf93246bd..28ccf9c65 100644 --- a/kittycad/api/api_tokens/list_api_tokens_for_user.py +++ b/kittycad/api/api_tokens/list_api_tokens_for_user.py @@ -100,7 +100,8 @@ def sync( page_token: Optional[str] = None, ) -> Optional[Union[ApiTokenResultsPage, Error]]: """This endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user. - The API tokens are returned in order of creation, with the most recently created API tokens first.""" # noqa: E501 + The API tokens are returned in order of creation, with the most recently created API tokens first. + """ # noqa: E501 return sync_detailed( limit=limit, @@ -138,7 +139,8 @@ async def asyncio( page_token: Optional[str] = None, ) -> Optional[Union[ApiTokenResultsPage, Error]]: """This endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user. - The API tokens are returned in order of creation, with the most recently created API tokens first.""" # noqa: E501 + The API tokens are returned in order of creation, with the most recently created API tokens first. + """ # noqa: E501 return ( await asyncio_detailed( diff --git a/kittycad/api/apps/apps_github_callback.py b/kittycad/api/apps/apps_github_callback.py index eaf24bfb8..b82a6cf73 100644 --- a/kittycad/api/apps/apps_github_callback.py +++ b/kittycad/api/apps/apps_github_callback.py @@ -65,7 +65,8 @@ def sync( client: Client, ) -> Optional[Error]: """This is different than OAuth 2.0 authentication for users. This endpoint grants access for KittyCAD to access user's repos. - The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.""" # noqa: E501 + The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos. + """ # noqa: E501 return sync_detailed( client=client, @@ -91,7 +92,8 @@ async def asyncio( client: Client, ) -> Optional[Error]: """This is different than OAuth 2.0 authentication for users. This endpoint grants access for KittyCAD to access user's repos. - The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.""" # noqa: E501 + The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos. + """ # noqa: E501 return ( await asyncio_detailed( diff --git a/kittycad/api/apps/apps_github_consent.py b/kittycad/api/apps/apps_github_consent.py index 44dba3298..400bab7b9 100644 --- a/kittycad/api/apps/apps_github_consent.py +++ b/kittycad/api/apps/apps_github_consent.py @@ -72,7 +72,8 @@ def sync( client: Client, ) -> Optional[Union[AppClientInfo, Error]]: """This is different than OAuth 2.0 authentication for users. This endpoint grants access for KittyCAD to access user's repos. - The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.""" # noqa: E501 + The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos. + """ # noqa: E501 return sync_detailed( client=client, @@ -98,7 +99,8 @@ async def asyncio( client: Client, ) -> Optional[Union[AppClientInfo, Error]]: """This is different than OAuth 2.0 authentication for users. This endpoint grants access for KittyCAD to access user's repos. - The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.""" # noqa: E501 + The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos. + """ # noqa: E501 return ( await asyncio_detailed( diff --git a/kittycad/api/constant/get_physics_constant.py b/kittycad/api/constant/get_physics_constant.py index 2751a325a..4e307be71 100644 --- a/kittycad/api/constant/get_physics_constant.py +++ b/kittycad/api/constant/get_physics_constant.py @@ -78,7 +78,6 @@ def sync( *, client: Client, ) -> Optional[Union[PhysicsConstant, Error]]: - return sync_detailed( constant=constant, client=client, @@ -106,7 +105,6 @@ async def asyncio( *, client: Client, ) -> Optional[Union[PhysicsConstant, Error]]: - return ( await asyncio_detailed( constant=constant, diff --git a/kittycad/api/executor/create_file_execution.py b/kittycad/api/executor/create_file_execution.py index cb6086da1..265cc3861 100644 --- a/kittycad/api/executor/create_file_execution.py +++ b/kittycad/api/executor/create_file_execution.py @@ -88,7 +88,6 @@ def sync( client: Client, output: Optional[str] = None, ) -> Optional[Union[CodeOutput, Error]]: - return sync_detailed( lang=lang, output=output, @@ -124,7 +123,6 @@ async def asyncio( client: Client, output: Optional[str] = None, ) -> Optional[Union[CodeOutput, Error]]: - return ( await asyncio_detailed( lang=lang, diff --git a/kittycad/api/file/create_file_center_of_mass.py b/kittycad/api/file/create_file_center_of_mass.py index 4a0ce2e09..cc5ab8ac0 100644 --- a/kittycad/api/file/create_file_center_of_mass.py +++ b/kittycad/api/file/create_file_center_of_mass.py @@ -6,16 +6,23 @@ from ...client import Client from ...models.error import Error from ...models.file_center_of_mass import FileCenterOfMass from ...models.file_import_format import FileImportFormat +from ...models.unit_length import UnitLength from ...types import Response def _get_kwargs( + output_unit: UnitLength, src_format: FileImportFormat, body: bytes, *, client: Client, ) -> Dict[str, Any]: url = "{}/file/center-of-mass".format(client.base_url) # noqa: E501 + if output_unit is not None: + if "?" in url: + url = url + "&output_unit=" + str(output_unit) + else: + url = url + "?output_unit=" + str(output_unit) if src_format is not None: if "?" in url: url = url + "&src_format=" + str(src_format) @@ -61,12 +68,14 @@ def _build_response( def sync_detailed( + output_unit: UnitLength, src_format: FileImportFormat, body: bytes, *, client: Client, ) -> Response[Optional[Union[FileCenterOfMass, Error]]]: kwargs = _get_kwargs( + output_unit=output_unit, src_format=src_format, body=body, client=client, @@ -81,6 +90,7 @@ def sync_detailed( def sync( + output_unit: UnitLength, src_format: FileImportFormat, body: bytes, *, @@ -90,9 +100,11 @@ def sync( 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 + 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( + output_unit=output_unit, src_format=src_format, body=body, client=client, @@ -100,12 +112,14 @@ def sync( async def asyncio_detailed( + output_unit: UnitLength, src_format: FileImportFormat, body: bytes, *, client: Client, ) -> Response[Optional[Union[FileCenterOfMass, Error]]]: kwargs = _get_kwargs( + output_unit=output_unit, src_format=src_format, body=body, client=client, @@ -118,6 +132,7 @@ async def asyncio_detailed( async def asyncio( + output_unit: UnitLength, src_format: FileImportFormat, body: bytes, *, @@ -127,10 +142,12 @@ async def asyncio( 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 + 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 ( await asyncio_detailed( + output_unit=output_unit, src_format=src_format, body=body, client=client, diff --git a/kittycad/api/file/create_file_conversion.py b/kittycad/api/file/create_file_conversion.py index ce8b6ed8d..305bed911 100644 --- a/kittycad/api/file/create_file_conversion.py +++ b/kittycad/api/file/create_file_conversion.py @@ -91,7 +91,8 @@ def sync( """If you wish to specify the conversion options, use the `/file/conversion` endpoint instead. Convert a CAD file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously. If the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string. - 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 + 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( output_format=output_format, @@ -131,7 +132,8 @@ async def asyncio( """If you wish to specify the conversion options, use the `/file/conversion` endpoint instead. Convert a CAD file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously. If the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string. - 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 + 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 ( await asyncio_detailed( diff --git a/kittycad/api/file/create_file_density.py b/kittycad/api/file/create_file_density.py index 25744b851..44982556d 100644 --- a/kittycad/api/file/create_file_density.py +++ b/kittycad/api/file/create_file_density.py @@ -6,11 +6,15 @@ from ...client import Client from ...models.error import Error from ...models.file_density import FileDensity from ...models.file_import_format import FileImportFormat +from ...models.unit_density import UnitDensity +from ...models.unit_mass import UnitMass from ...types import Response def _get_kwargs( material_mass: float, + material_mass_unit: UnitMass, + output_unit: UnitDensity, src_format: FileImportFormat, body: bytes, *, @@ -22,6 +26,16 @@ def _get_kwargs( url = url + "&material_mass=" + str(material_mass) else: url = url + "?material_mass=" + str(material_mass) + if material_mass_unit is not None: + if "?" in url: + url = url + "&material_mass_unit=" + str(material_mass_unit) + else: + url = url + "?material_mass_unit=" + str(material_mass_unit) + if output_unit is not None: + if "?" in url: + url = url + "&output_unit=" + str(output_unit) + else: + url = url + "?output_unit=" + str(output_unit) if src_format is not None: if "?" in url: url = url + "&src_format=" + str(src_format) @@ -66,6 +80,8 @@ def _build_response( def sync_detailed( material_mass: float, + material_mass_unit: UnitMass, + output_unit: UnitDensity, src_format: FileImportFormat, body: bytes, *, @@ -73,6 +89,8 @@ def sync_detailed( ) -> Response[Optional[Union[FileDensity, Error]]]: kwargs = _get_kwargs( material_mass=material_mass, + material_mass_unit=material_mass_unit, + output_unit=output_unit, src_format=src_format, body=body, client=client, @@ -88,6 +106,8 @@ def sync_detailed( def sync( material_mass: float, + material_mass_unit: UnitMass, + output_unit: UnitDensity, src_format: FileImportFormat, body: bytes, *, @@ -97,10 +117,13 @@ def sync( 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 + 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( material_mass=material_mass, + material_mass_unit=material_mass_unit, + output_unit=output_unit, src_format=src_format, body=body, client=client, @@ -109,6 +132,8 @@ def sync( async def asyncio_detailed( material_mass: float, + material_mass_unit: UnitMass, + output_unit: UnitDensity, src_format: FileImportFormat, body: bytes, *, @@ -116,6 +141,8 @@ async def asyncio_detailed( ) -> Response[Optional[Union[FileDensity, Error]]]: kwargs = _get_kwargs( material_mass=material_mass, + material_mass_unit=material_mass_unit, + output_unit=output_unit, src_format=src_format, body=body, client=client, @@ -129,6 +156,8 @@ async def asyncio_detailed( async def asyncio( material_mass: float, + material_mass_unit: UnitMass, + output_unit: UnitDensity, src_format: FileImportFormat, body: bytes, *, @@ -138,11 +167,14 @@ async def asyncio( 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 + 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 ( await asyncio_detailed( material_mass=material_mass, + material_mass_unit=material_mass_unit, + output_unit=output_unit, src_format=src_format, body=body, client=client, diff --git a/kittycad/api/file/create_file_mass.py b/kittycad/api/file/create_file_mass.py index 591c21b7b..49354ddd9 100644 --- a/kittycad/api/file/create_file_mass.py +++ b/kittycad/api/file/create_file_mass.py @@ -6,11 +6,15 @@ from ...client import Client from ...models.error import Error from ...models.file_import_format import FileImportFormat from ...models.file_mass import FileMass +from ...models.unit_density import UnitDensity +from ...models.unit_mass import UnitMass from ...types import Response def _get_kwargs( material_density: float, + material_density_unit: UnitDensity, + output_unit: UnitMass, src_format: FileImportFormat, body: bytes, *, @@ -22,6 +26,16 @@ def _get_kwargs( url = url + "&material_density=" + str(material_density) else: url = url + "?material_density=" + str(material_density) + if material_density_unit is not None: + if "?" in url: + url = url + "&material_density_unit=" + str(material_density_unit) + else: + url = url + "?material_density_unit=" + str(material_density_unit) + if output_unit is not None: + if "?" in url: + url = url + "&output_unit=" + str(output_unit) + else: + url = url + "?output_unit=" + str(output_unit) if src_format is not None: if "?" in url: url = url + "&src_format=" + str(src_format) @@ -66,6 +80,8 @@ def _build_response( def sync_detailed( material_density: float, + material_density_unit: UnitDensity, + output_unit: UnitMass, src_format: FileImportFormat, body: bytes, *, @@ -73,6 +89,8 @@ def sync_detailed( ) -> Response[Optional[Union[FileMass, Error]]]: kwargs = _get_kwargs( material_density=material_density, + material_density_unit=material_density_unit, + output_unit=output_unit, src_format=src_format, body=body, client=client, @@ -88,6 +106,8 @@ def sync_detailed( def sync( material_density: float, + material_density_unit: UnitDensity, + output_unit: UnitMass, src_format: FileImportFormat, body: bytes, *, @@ -97,10 +117,13 @@ def sync( 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 + 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( material_density=material_density, + material_density_unit=material_density_unit, + output_unit=output_unit, src_format=src_format, body=body, client=client, @@ -109,6 +132,8 @@ def sync( async def asyncio_detailed( material_density: float, + material_density_unit: UnitDensity, + output_unit: UnitMass, src_format: FileImportFormat, body: bytes, *, @@ -116,6 +141,8 @@ async def asyncio_detailed( ) -> Response[Optional[Union[FileMass, Error]]]: kwargs = _get_kwargs( material_density=material_density, + material_density_unit=material_density_unit, + output_unit=output_unit, src_format=src_format, body=body, client=client, @@ -129,6 +156,8 @@ async def asyncio_detailed( async def asyncio( material_density: float, + material_density_unit: UnitDensity, + output_unit: UnitMass, src_format: FileImportFormat, body: bytes, *, @@ -138,11 +167,14 @@ async def asyncio( 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 + 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 ( await asyncio_detailed( material_density=material_density, + material_density_unit=material_density_unit, + output_unit=output_unit, src_format=src_format, body=body, client=client, diff --git a/kittycad/api/file/create_file_surface_area.py b/kittycad/api/file/create_file_surface_area.py index c93b1d788..34de1af6f 100644 --- a/kittycad/api/file/create_file_surface_area.py +++ b/kittycad/api/file/create_file_surface_area.py @@ -6,16 +6,23 @@ from ...client import Client from ...models.error import Error from ...models.file_import_format import FileImportFormat from ...models.file_surface_area import FileSurfaceArea +from ...models.unit_area import UnitArea from ...types import Response def _get_kwargs( + output_unit: UnitArea, src_format: FileImportFormat, body: bytes, *, client: Client, ) -> Dict[str, Any]: url = "{}/file/surface-area".format(client.base_url) # noqa: E501 + if output_unit is not None: + if "?" in url: + url = url + "&output_unit=" + str(output_unit) + else: + url = url + "?output_unit=" + str(output_unit) if src_format is not None: if "?" in url: url = url + "&src_format=" + str(src_format) @@ -61,12 +68,14 @@ def _build_response( def sync_detailed( + output_unit: UnitArea, src_format: FileImportFormat, body: bytes, *, client: Client, ) -> Response[Optional[Union[FileSurfaceArea, Error]]]: kwargs = _get_kwargs( + output_unit=output_unit, src_format=src_format, body=body, client=client, @@ -81,6 +90,7 @@ def sync_detailed( def sync( + output_unit: UnitArea, src_format: FileImportFormat, body: bytes, *, @@ -90,9 +100,11 @@ def sync( 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 + 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( + output_unit=output_unit, src_format=src_format, body=body, client=client, @@ -100,12 +112,14 @@ def sync( async def asyncio_detailed( + output_unit: UnitArea, src_format: FileImportFormat, body: bytes, *, client: Client, ) -> Response[Optional[Union[FileSurfaceArea, Error]]]: kwargs = _get_kwargs( + output_unit=output_unit, src_format=src_format, body=body, client=client, @@ -118,6 +132,7 @@ async def asyncio_detailed( async def asyncio( + output_unit: UnitArea, src_format: FileImportFormat, body: bytes, *, @@ -127,10 +142,12 @@ async def asyncio( 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 + 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 ( await asyncio_detailed( + output_unit=output_unit, src_format=src_format, body=body, client=client, diff --git a/kittycad/api/file/create_file_volume.py b/kittycad/api/file/create_file_volume.py index 64d905e48..b63f4f687 100644 --- a/kittycad/api/file/create_file_volume.py +++ b/kittycad/api/file/create_file_volume.py @@ -6,16 +6,23 @@ from ...client import Client from ...models.error import Error from ...models.file_import_format import FileImportFormat from ...models.file_volume import FileVolume +from ...models.unit_volume import UnitVolume from ...types import Response def _get_kwargs( + output_unit: UnitVolume, src_format: FileImportFormat, body: bytes, *, client: Client, ) -> Dict[str, Any]: url = "{}/file/volume".format(client.base_url) # noqa: E501 + if output_unit is not None: + if "?" in url: + url = url + "&output_unit=" + str(output_unit) + else: + url = url + "?output_unit=" + str(output_unit) if src_format is not None: if "?" in url: url = url + "&src_format=" + str(src_format) @@ -59,12 +66,14 @@ def _build_response( def sync_detailed( + output_unit: UnitVolume, src_format: FileImportFormat, body: bytes, *, client: Client, ) -> Response[Optional[Union[FileVolume, Error]]]: kwargs = _get_kwargs( + output_unit=output_unit, src_format=src_format, body=body, client=client, @@ -79,6 +88,7 @@ def sync_detailed( def sync( + output_unit: UnitVolume, src_format: FileImportFormat, body: bytes, *, @@ -88,9 +98,11 @@ def sync( 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 + 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( + output_unit=output_unit, src_format=src_format, body=body, client=client, @@ -98,12 +110,14 @@ def sync( async def asyncio_detailed( + output_unit: UnitVolume, src_format: FileImportFormat, body: bytes, *, client: Client, ) -> Response[Optional[Union[FileVolume, Error]]]: kwargs = _get_kwargs( + output_unit=output_unit, src_format=src_format, body=body, client=client, @@ -116,6 +130,7 @@ async def asyncio_detailed( async def asyncio( + output_unit: UnitVolume, src_format: FileImportFormat, body: bytes, *, @@ -125,10 +140,12 @@ async def asyncio( 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 + 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 ( await asyncio_detailed( + output_unit=output_unit, src_format=src_format, body=body, client=client, diff --git a/kittycad/api/hidden/auth_email.py b/kittycad/api/hidden/auth_email.py index 127686fae..55b0e9f63 100644 --- a/kittycad/api/hidden/auth_email.py +++ b/kittycad/api/hidden/auth_email.py @@ -77,7 +77,6 @@ def sync( *, client: Client, ) -> Optional[Union[VerificationToken, Error]]: - return sync_detailed( body=body, client=client, @@ -105,7 +104,6 @@ async def asyncio( *, client: Client, ) -> Optional[Union[VerificationToken, Error]]: - return ( await asyncio_detailed( body=body, diff --git a/kittycad/api/hidden/auth_email_callback.py b/kittycad/api/hidden/auth_email_callback.py index a7f74df47..eb5326387 100644 --- a/kittycad/api/hidden/auth_email_callback.py +++ b/kittycad/api/hidden/auth_email_callback.py @@ -91,7 +91,6 @@ def sync( client: Client, callback_url: Optional[str] = None, ) -> Optional[Error]: - return sync_detailed( callback_url=callback_url, email=email, @@ -127,7 +126,6 @@ async def asyncio( client: Client, callback_url: Optional[str] = None, ) -> Optional[Error]: - return ( await asyncio_detailed( callback_url=callback_url, diff --git a/kittycad/api/meta/get_ai_plugin_manifest.py b/kittycad/api/meta/get_ai_plugin_manifest.py index fa7e858ca..14e8176c3 100644 --- a/kittycad/api/meta/get_ai_plugin_manifest.py +++ b/kittycad/api/meta/get_ai_plugin_manifest.py @@ -71,7 +71,6 @@ def sync( *, client: Client, ) -> Optional[Union[AiPluginManifest, Error]]: - return sync_detailed( client=client, ).parsed @@ -95,7 +94,6 @@ async def asyncio( *, client: Client, ) -> Optional[Union[AiPluginManifest, Error]]: - return ( await asyncio_detailed( client=client, diff --git a/kittycad/api/meta/get_schema.py b/kittycad/api/meta/get_schema.py index 5ec2817bf..c307f44a6 100644 --- a/kittycad/api/meta/get_schema.py +++ b/kittycad/api/meta/get_schema.py @@ -68,7 +68,6 @@ def sync( *, client: Client, ) -> Optional[Union[dict, Error]]: - return sync_detailed( client=client, ).parsed @@ -92,7 +91,6 @@ async def asyncio( *, client: Client, ) -> Optional[Union[dict, Error]]: - return ( await asyncio_detailed( client=client, diff --git a/kittycad/api/meta/ping.py b/kittycad/api/meta/ping.py index 234ca143b..4fc71a20d 100644 --- a/kittycad/api/meta/ping.py +++ b/kittycad/api/meta/ping.py @@ -69,7 +69,6 @@ def sync( *, client: Client, ) -> Optional[Union[Pong, Error]]: - return sync_detailed( client=client, ).parsed @@ -93,7 +92,6 @@ async def asyncio( *, client: Client, ) -> Optional[Union[Pong, Error]]: - return ( await asyncio_detailed( client=client, diff --git a/kittycad/api/modeling/cmd_batch.py b/kittycad/api/modeling/cmd_batch.py index dd61e858e..6ea2494c1 100644 --- a/kittycad/api/modeling/cmd_batch.py +++ b/kittycad/api/modeling/cmd_batch.py @@ -77,7 +77,6 @@ def sync( *, client: Client, ) -> Optional[Union[ModelingOutcomes, Error]]: - return sync_detailed( body=body, client=client, @@ -105,7 +104,6 @@ async def asyncio( *, client: Client, ) -> Optional[Union[ModelingOutcomes, Error]]: - return ( await asyncio_detailed( body=body, diff --git a/kittycad/api/payments/create_payment_information_for_user.py b/kittycad/api/payments/create_payment_information_for_user.py index e7ab7e6ca..207937bb7 100644 --- a/kittycad/api/payments/create_payment_information_for_user.py +++ b/kittycad/api/payments/create_payment_information_for_user.py @@ -76,7 +76,8 @@ def sync( client: Client, ) -> Optional[Union[Customer, Error]]: """This includes billing address, phone, and name. - This endpoint requires authentication by any KittyCAD user. It creates the payment information for the authenticated user.""" # noqa: E501 + This endpoint requires authentication by any KittyCAD user. It creates the payment information for the authenticated user. + """ # noqa: E501 return sync_detailed( body=body, @@ -106,7 +107,8 @@ async def asyncio( client: Client, ) -> Optional[Union[Customer, Error]]: """This includes billing address, phone, and name. - This endpoint requires authentication by any KittyCAD user. It creates the payment information for the authenticated user.""" # noqa: E501 + This endpoint requires authentication by any KittyCAD user. It creates the payment information for the authenticated user. + """ # noqa: E501 return ( await asyncio_detailed( diff --git a/kittycad/api/payments/delete_payment_information_for_user.py b/kittycad/api/payments/delete_payment_information_for_user.py index de1079c6b..4ce884a4b 100644 --- a/kittycad/api/payments/delete_payment_information_for_user.py +++ b/kittycad/api/payments/delete_payment_information_for_user.py @@ -65,7 +65,8 @@ def sync( client: Client, ) -> Optional[Error]: """This includes billing address, phone, and name. - This endpoint requires authentication by any KittyCAD user. It deletes the payment information for the authenticated user.""" # noqa: E501 + This endpoint requires authentication by any KittyCAD user. It deletes the payment information for the authenticated user. + """ # noqa: E501 return sync_detailed( client=client, @@ -91,7 +92,8 @@ async def asyncio( client: Client, ) -> Optional[Error]: """This includes billing address, phone, and name. - This endpoint requires authentication by any KittyCAD user. It deletes the payment information for the authenticated user.""" # noqa: E501 + This endpoint requires authentication by any KittyCAD user. It deletes the payment information for the authenticated user. + """ # noqa: E501 return ( await asyncio_detailed( diff --git a/kittycad/api/payments/get_payment_information_for_user.py b/kittycad/api/payments/get_payment_information_for_user.py index ec2d0dcfa..f913f7364 100644 --- a/kittycad/api/payments/get_payment_information_for_user.py +++ b/kittycad/api/payments/get_payment_information_for_user.py @@ -70,7 +70,8 @@ def sync( client: Client, ) -> Optional[Union[Customer, Error]]: """This includes billing address, phone, and name. - This endpoint requires authentication by any KittyCAD user. It gets the payment information for the authenticated user.""" # noqa: E501 + This endpoint requires authentication by any KittyCAD user. It gets the payment information for the authenticated user. + """ # noqa: E501 return sync_detailed( client=client, @@ -96,7 +97,8 @@ async def asyncio( client: Client, ) -> Optional[Union[Customer, Error]]: """This includes billing address, phone, and name. - This endpoint requires authentication by any KittyCAD user. It gets the payment information for the authenticated user.""" # noqa: E501 + This endpoint requires authentication by any KittyCAD user. It gets the payment information for the authenticated user. + """ # noqa: E501 return ( await asyncio_detailed( diff --git a/kittycad/api/payments/update_payment_information_for_user.py b/kittycad/api/payments/update_payment_information_for_user.py index 6e6fc748b..4086935b9 100644 --- a/kittycad/api/payments/update_payment_information_for_user.py +++ b/kittycad/api/payments/update_payment_information_for_user.py @@ -76,7 +76,8 @@ def sync( client: Client, ) -> Optional[Union[Customer, Error]]: """This includes billing address, phone, and name. - This endpoint requires authentication by any KittyCAD user. It updates the payment information for the authenticated user.""" # noqa: E501 + This endpoint requires authentication by any KittyCAD user. It updates the payment information for the authenticated user. + """ # noqa: E501 return sync_detailed( body=body, @@ -106,7 +107,8 @@ async def asyncio( client: Client, ) -> Optional[Union[Customer, Error]]: """This includes billing address, phone, and name. - This endpoint requires authentication by any KittyCAD user. It updates the payment information for the authenticated user.""" # noqa: E501 + This endpoint requires authentication by any KittyCAD user. It updates the payment information for the authenticated user. + """ # noqa: E501 return ( await asyncio_detailed( diff --git a/kittycad/api/users/delete_user_self.py b/kittycad/api/users/delete_user_self.py index 7d9d1797f..3ed3a7b68 100644 --- a/kittycad/api/users/delete_user_self.py +++ b/kittycad/api/users/delete_user_self.py @@ -65,7 +65,8 @@ def sync( client: Client, ) -> Optional[Error]: """This endpoint requires authentication by any KittyCAD user. It deletes the authenticated user from KittyCAD's database. - This call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance.""" # noqa: E501 + This call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance. + """ # noqa: E501 return sync_detailed( client=client, @@ -91,7 +92,8 @@ async def asyncio( client: Client, ) -> Optional[Error]: """This endpoint requires authentication by any KittyCAD user. It deletes the authenticated user from KittyCAD's database. - This call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance.""" # noqa: E501 + This call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance. + """ # noqa: E501 return ( await asyncio_detailed( diff --git a/kittycad/client_test.py b/kittycad/client_test.py index 3dc4f9b23..5b2e31d9e 100644 --- a/kittycad/client_test.py +++ b/kittycad/client_test.py @@ -24,6 +24,9 @@ from .models import ( FileMass, FileVolume, Pong, + UnitDensity, + UnitMass, + UnitVolume, User, ) @@ -171,6 +174,8 @@ def test_file_mass(): body=content, src_format=FileImportFormat.OBJ, material_density=1.0, + material_density_unit=UnitDensity.KG_M3, + output_unit=UnitMass.G, ) assert isinstance(result, FileMass) @@ -198,7 +203,10 @@ def test_file_volume(): # Get the fc. result: Union[FileVolume, Error, None] = create_file_volume.sync( - client=client, body=content, src_format=FileImportFormat.OBJ + client=client, + body=content, + src_format=FileImportFormat.OBJ, + output_unit=UnitVolume.CM3, ) assert isinstance(result, FileVolume) diff --git a/kittycad/examples_test.py b/kittycad/examples_test.py index 7cf512d5f..bf345892a 100644 --- a/kittycad/examples_test.py +++ b/kittycad/examples_test.py @@ -142,14 +142,16 @@ 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.modeling_cmd import ModelingCmd +from kittycad.models.modeling_cmd import MovePathPen 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_angle import UnitAngle from kittycad.models.unit_area import UnitArea from kittycad.models.unit_current import UnitCurrent +from kittycad.models.unit_density import UnitDensity from kittycad.models.unit_energy import UnitEnergy from kittycad.models.unit_force import UnitForce from kittycad.models.unit_frequency import UnitFrequency @@ -981,6 +983,7 @@ def test_create_file_center_of_mass(): result: Optional[Union[FileCenterOfMass, Error]] = create_file_center_of_mass.sync( client=client, + output_unit=UnitLength.CM, src_format=FileImportFormat.DAE, body=bytes("some bytes", "utf-8"), ) @@ -997,6 +1000,7 @@ def test_create_file_center_of_mass(): Optional[Union[FileCenterOfMass, Error]] ] = create_file_center_of_mass.sync_detailed( client=client, + output_unit=UnitLength.CM, src_format=FileImportFormat.DAE, body=bytes("some bytes", "utf-8"), ) @@ -1013,6 +1017,7 @@ async def test_create_file_center_of_mass_async(): Union[FileCenterOfMass, Error] ] = await create_file_center_of_mass.asyncio( client=client, + output_unit=UnitLength.CM, src_format=FileImportFormat.DAE, body=bytes("some bytes", "utf-8"), ) @@ -1022,6 +1027,7 @@ async def test_create_file_center_of_mass_async(): Optional[Union[FileCenterOfMass, Error]] ] = await create_file_center_of_mass.asyncio_detailed( client=client, + output_unit=UnitLength.CM, src_format=FileImportFormat.DAE, body=bytes("some bytes", "utf-8"), ) @@ -1094,6 +1100,8 @@ def test_create_file_density(): result: Optional[Union[FileDensity, Error]] = create_file_density.sync( client=client, material_mass=3.14, + material_mass_unit=UnitMass.G, + output_unit=UnitDensity.LB_FT3, src_format=FileImportFormat.DAE, body=bytes("some bytes", "utf-8"), ) @@ -1111,6 +1119,8 @@ def test_create_file_density(): ] = create_file_density.sync_detailed( client=client, material_mass=3.14, + material_mass_unit=UnitMass.G, + output_unit=UnitDensity.LB_FT3, src_format=FileImportFormat.DAE, body=bytes("some bytes", "utf-8"), ) @@ -1126,6 +1136,8 @@ async def test_create_file_density_async(): result: Optional[Union[FileDensity, Error]] = await create_file_density.asyncio( client=client, material_mass=3.14, + material_mass_unit=UnitMass.G, + output_unit=UnitDensity.LB_FT3, src_format=FileImportFormat.DAE, body=bytes("some bytes", "utf-8"), ) @@ -1136,6 +1148,8 @@ async def test_create_file_density_async(): ] = await create_file_density.asyncio_detailed( client=client, material_mass=3.14, + material_mass_unit=UnitMass.G, + output_unit=UnitDensity.LB_FT3, src_format=FileImportFormat.DAE, body=bytes("some bytes", "utf-8"), ) @@ -1204,6 +1218,8 @@ def test_create_file_mass(): result: Optional[Union[FileMass, Error]] = create_file_mass.sync( client=client, material_density=3.14, + material_density_unit=UnitDensity.LB_FT3, + output_unit=UnitMass.G, src_format=FileImportFormat.DAE, body=bytes("some bytes", "utf-8"), ) @@ -1221,6 +1237,8 @@ def test_create_file_mass(): ] = create_file_mass.sync_detailed( client=client, material_density=3.14, + material_density_unit=UnitDensity.LB_FT3, + output_unit=UnitMass.G, src_format=FileImportFormat.DAE, body=bytes("some bytes", "utf-8"), ) @@ -1236,6 +1254,8 @@ async def test_create_file_mass_async(): result: Optional[Union[FileMass, Error]] = await create_file_mass.asyncio( client=client, material_density=3.14, + material_density_unit=UnitDensity.LB_FT3, + output_unit=UnitMass.G, src_format=FileImportFormat.DAE, body=bytes("some bytes", "utf-8"), ) @@ -1246,6 +1266,8 @@ async def test_create_file_mass_async(): ] = await create_file_mass.asyncio_detailed( client=client, material_density=3.14, + material_density_unit=UnitDensity.LB_FT3, + output_unit=UnitMass.G, src_format=FileImportFormat.DAE, body=bytes("some bytes", "utf-8"), ) @@ -1258,6 +1280,7 @@ def test_create_file_surface_area(): result: Optional[Union[FileSurfaceArea, Error]] = create_file_surface_area.sync( client=client, + output_unit=UnitArea.CM2, src_format=FileImportFormat.DAE, body=bytes("some bytes", "utf-8"), ) @@ -1274,6 +1297,7 @@ def test_create_file_surface_area(): Optional[Union[FileSurfaceArea, Error]] ] = create_file_surface_area.sync_detailed( client=client, + output_unit=UnitArea.CM2, src_format=FileImportFormat.DAE, body=bytes("some bytes", "utf-8"), ) @@ -1290,6 +1314,7 @@ async def test_create_file_surface_area_async(): Union[FileSurfaceArea, Error] ] = await create_file_surface_area.asyncio( client=client, + output_unit=UnitArea.CM2, src_format=FileImportFormat.DAE, body=bytes("some bytes", "utf-8"), ) @@ -1299,6 +1324,7 @@ async def test_create_file_surface_area_async(): Optional[Union[FileSurfaceArea, Error]] ] = await create_file_surface_area.asyncio_detailed( client=client, + output_unit=UnitArea.CM2, src_format=FileImportFormat.DAE, body=bytes("some bytes", "utf-8"), ) @@ -1311,6 +1337,7 @@ def test_create_file_volume(): result: Optional[Union[FileVolume, Error]] = create_file_volume.sync( client=client, + output_unit=UnitVolume.CM3, src_format=FileImportFormat.DAE, body=bytes("some bytes", "utf-8"), ) @@ -1327,6 +1354,7 @@ def test_create_file_volume(): Optional[Union[FileVolume, Error]] ] = create_file_volume.sync_detailed( client=client, + output_unit=UnitVolume.CM3, src_format=FileImportFormat.DAE, body=bytes("some bytes", "utf-8"), ) @@ -1341,6 +1369,7 @@ async def test_create_file_volume_async(): result: Optional[Union[FileVolume, Error]] = await create_file_volume.asyncio( client=client, + output_unit=UnitVolume.CM3, src_format=FileImportFormat.DAE, body=bytes("some bytes", "utf-8"), ) @@ -1350,6 +1379,7 @@ async def test_create_file_volume_async(): Optional[Union[FileVolume, Error]] ] = await create_file_volume.asyncio_detailed( client=client, + output_unit=UnitVolume.CM3, src_format=FileImportFormat.DAE, body=bytes("some bytes", "utf-8"), ) @@ -1402,7 +1432,14 @@ def test_cmd(): cmd.sync( client=client, body=ModelingCmdReq( - cmd=ModelingCmd.START_PATH, + cmd=MovePathPen( + path=ModelingCmdId(""), + to=Point3d( + x=3.14, + y=3.14, + z=3.14, + ), + ), cmd_id=ModelingCmdId(""), file_id="", ), @@ -1412,7 +1449,14 @@ def test_cmd(): cmd.sync_detailed( client=client, body=ModelingCmdReq( - cmd=ModelingCmd.START_PATH, + cmd=MovePathPen( + path=ModelingCmdId(""), + to=Point3d( + x=3.14, + y=3.14, + z=3.14, + ), + ), cmd_id=ModelingCmdId(""), file_id="", ), @@ -1429,7 +1473,14 @@ async def test_cmd_async(): await cmd.asyncio( client=client, body=ModelingCmdReq( - cmd=ModelingCmd.START_PATH, + cmd=MovePathPen( + path=ModelingCmdId(""), + to=Point3d( + x=3.14, + y=3.14, + z=3.14, + ), + ), cmd_id=ModelingCmdId(""), file_id="", ), @@ -1439,7 +1490,14 @@ async def test_cmd_async(): await cmd.asyncio_detailed( client=client, body=ModelingCmdReq( - cmd=ModelingCmd.START_PATH, + cmd=MovePathPen( + path=ModelingCmdId(""), + to=Point3d( + x=3.14, + y=3.14, + z=3.14, + ), + ), cmd_id=ModelingCmdId(""), file_id="", ), @@ -1456,7 +1514,14 @@ def test_cmd_batch(): body=ModelingCmdReqBatch( cmds={ "": ModelingCmdReq( - cmd=ModelingCmd.START_PATH, + cmd=MovePathPen( + path=ModelingCmdId(""), + to=Point3d( + x=3.14, + y=3.14, + z=3.14, + ), + ), cmd_id=ModelingCmdId(""), file_id="", ) @@ -1480,7 +1545,14 @@ def test_cmd_batch(): body=ModelingCmdReqBatch( cmds={ "": ModelingCmdReq( - cmd=ModelingCmd.START_PATH, + cmd=MovePathPen( + path=ModelingCmdId(""), + to=Point3d( + x=3.14, + y=3.14, + z=3.14, + ), + ), cmd_id=ModelingCmdId(""), file_id="", ) @@ -1502,7 +1574,14 @@ async def test_cmd_batch_async(): body=ModelingCmdReqBatch( cmds={ "": ModelingCmdReq( - cmd=ModelingCmd.START_PATH, + cmd=MovePathPen( + path=ModelingCmdId(""), + to=Point3d( + x=3.14, + y=3.14, + z=3.14, + ), + ), cmd_id=ModelingCmdId(""), file_id="", ) @@ -1519,7 +1598,14 @@ async def test_cmd_batch_async(): body=ModelingCmdReqBatch( cmds={ "": ModelingCmdReq( - cmd=ModelingCmd.START_PATH, + cmd=MovePathPen( + path=ModelingCmdId(""), + to=Point3d( + x=3.14, + y=3.14, + z=3.14, + ), + ), cmd_id=ModelingCmdId(""), file_id="", ) @@ -1666,8 +1752,8 @@ def test_get_area_unit_conversion(): result: Optional[Union[UnitAreaConversion, Error]] = get_area_unit_conversion.sync( client=client, - input_unit=UnitArea.ACRES, - output_unit=UnitArea.ACRES, + input_unit=UnitArea.CM2, + output_unit=UnitArea.CM2, value=3.14, ) @@ -1683,8 +1769,8 @@ def test_get_area_unit_conversion(): Optional[Union[UnitAreaConversion, Error]] ] = get_area_unit_conversion.sync_detailed( client=client, - input_unit=UnitArea.ACRES, - output_unit=UnitArea.ACRES, + input_unit=UnitArea.CM2, + output_unit=UnitArea.CM2, value=3.14, ) @@ -1700,8 +1786,8 @@ async def test_get_area_unit_conversion_async(): Union[UnitAreaConversion, Error] ] = await get_area_unit_conversion.asyncio( client=client, - input_unit=UnitArea.ACRES, - output_unit=UnitArea.ACRES, + input_unit=UnitArea.CM2, + output_unit=UnitArea.CM2, value=3.14, ) @@ -1710,8 +1796,8 @@ async def test_get_area_unit_conversion_async(): Optional[Union[UnitAreaConversion, Error]] ] = await get_area_unit_conversion.asyncio_detailed( client=client, - input_unit=UnitArea.ACRES, - output_unit=UnitArea.ACRES, + input_unit=UnitArea.CM2, + output_unit=UnitArea.CM2, value=3.14, ) @@ -1961,8 +2047,8 @@ def test_get_length_unit_conversion(): Union[UnitLengthConversion, Error] ] = get_length_unit_conversion.sync( client=client, - input_unit=UnitLength.CENTIMETRES, - output_unit=UnitLength.CENTIMETRES, + input_unit=UnitLength.CM, + output_unit=UnitLength.CM, value=3.14, ) @@ -1978,8 +2064,8 @@ def test_get_length_unit_conversion(): Optional[Union[UnitLengthConversion, Error]] ] = get_length_unit_conversion.sync_detailed( client=client, - input_unit=UnitLength.CENTIMETRES, - output_unit=UnitLength.CENTIMETRES, + input_unit=UnitLength.CM, + output_unit=UnitLength.CM, value=3.14, ) @@ -1995,8 +2081,8 @@ async def test_get_length_unit_conversion_async(): Union[UnitLengthConversion, Error] ] = await get_length_unit_conversion.asyncio( client=client, - input_unit=UnitLength.CENTIMETRES, - output_unit=UnitLength.CENTIMETRES, + input_unit=UnitLength.CM, + output_unit=UnitLength.CM, value=3.14, ) @@ -2005,8 +2091,8 @@ async def test_get_length_unit_conversion_async(): Optional[Union[UnitLengthConversion, Error]] ] = await get_length_unit_conversion.asyncio_detailed( client=client, - input_unit=UnitLength.CENTIMETRES, - output_unit=UnitLength.CENTIMETRES, + input_unit=UnitLength.CM, + output_unit=UnitLength.CM, value=3.14, ) @@ -2018,8 +2104,8 @@ def test_get_mass_unit_conversion(): result: Optional[Union[UnitMassConversion, Error]] = get_mass_unit_conversion.sync( client=client, - input_unit=UnitMass.CARATS, - output_unit=UnitMass.CARATS, + input_unit=UnitMass.G, + output_unit=UnitMass.G, value=3.14, ) @@ -2035,8 +2121,8 @@ def test_get_mass_unit_conversion(): Optional[Union[UnitMassConversion, Error]] ] = get_mass_unit_conversion.sync_detailed( client=client, - input_unit=UnitMass.CARATS, - output_unit=UnitMass.CARATS, + input_unit=UnitMass.G, + output_unit=UnitMass.G, value=3.14, ) @@ -2052,8 +2138,8 @@ async def test_get_mass_unit_conversion_async(): Union[UnitMassConversion, Error] ] = await get_mass_unit_conversion.asyncio( client=client, - input_unit=UnitMass.CARATS, - output_unit=UnitMass.CARATS, + input_unit=UnitMass.G, + output_unit=UnitMass.G, value=3.14, ) @@ -2062,8 +2148,8 @@ async def test_get_mass_unit_conversion_async(): Optional[Union[UnitMassConversion, Error]] ] = await get_mass_unit_conversion.asyncio_detailed( client=client, - input_unit=UnitMass.CARATS, - output_unit=UnitMass.CARATS, + input_unit=UnitMass.G, + output_unit=UnitMass.G, value=3.14, ) @@ -2313,8 +2399,8 @@ def test_get_volume_unit_conversion(): Union[UnitVolumeConversion, Error] ] = get_volume_unit_conversion.sync( client=client, - input_unit=UnitVolume.CUBIC_CENTIMETRES, - output_unit=UnitVolume.CUBIC_CENTIMETRES, + input_unit=UnitVolume.CM3, + output_unit=UnitVolume.CM3, value=3.14, ) @@ -2330,8 +2416,8 @@ def test_get_volume_unit_conversion(): Optional[Union[UnitVolumeConversion, Error]] ] = get_volume_unit_conversion.sync_detailed( client=client, - input_unit=UnitVolume.CUBIC_CENTIMETRES, - output_unit=UnitVolume.CUBIC_CENTIMETRES, + input_unit=UnitVolume.CM3, + output_unit=UnitVolume.CM3, value=3.14, ) @@ -2347,8 +2433,8 @@ async def test_get_volume_unit_conversion_async(): Union[UnitVolumeConversion, Error] ] = await get_volume_unit_conversion.asyncio( client=client, - input_unit=UnitVolume.CUBIC_CENTIMETRES, - output_unit=UnitVolume.CUBIC_CENTIMETRES, + input_unit=UnitVolume.CM3, + output_unit=UnitVolume.CM3, value=3.14, ) @@ -2357,8 +2443,8 @@ async def test_get_volume_unit_conversion_async(): Optional[Union[UnitVolumeConversion, Error]] ] = await get_volume_unit_conversion.asyncio_detailed( client=client, - input_unit=UnitVolume.CUBIC_CENTIMETRES, - output_unit=UnitVolume.CUBIC_CENTIMETRES, + input_unit=UnitVolume.CM3, + output_unit=UnitVolume.CM3, value=3.14, ) diff --git a/kittycad/models/__init__.py b/kittycad/models/__init__.py index 8a5e7b50b..96db6289b 100644 --- a/kittycad/models/__init__.py +++ b/kittycad/models/__init__.py @@ -115,6 +115,7 @@ from .unit_area import UnitArea from .unit_area_conversion import UnitAreaConversion from .unit_current import UnitCurrent from .unit_current_conversion import UnitCurrentConversion +from .unit_density import UnitDensity from .unit_energy import UnitEnergy from .unit_energy_conversion import UnitEnergyConversion from .unit_force import UnitForce diff --git a/kittycad/models/ai_plugin_api.py b/kittycad/models/ai_plugin_api.py index cce7c8791..e5d2c2e0e 100644 --- a/kittycad/models/ai_plugin_api.py +++ b/kittycad/models/ai_plugin_api.py @@ -5,7 +5,7 @@ import attr from ..models.ai_plugin_api_type import AiPluginApiType from ..types import UNSET, Unset -S = TypeVar("S", bound="AiPluginApi") +SB = TypeVar("SB", bound="AiPluginApi") @attr.s(auto_attribs=True) @@ -37,7 +37,7 @@ class AiPluginApi: return field_dict @classmethod - def from_dict(cls: Type[S], src_dict: Dict[str, Any]) -> S: + def from_dict(cls: Type[SB], src_dict: Dict[str, Any]) -> SB: d = src_dict.copy() is_user_authenticated = d.pop("is_user_authenticated", UNSET) diff --git a/kittycad/models/ai_plugin_auth.py b/kittycad/models/ai_plugin_auth.py index 0b798b6fc..022281367 100644 --- a/kittycad/models/ai_plugin_auth.py +++ b/kittycad/models/ai_plugin_auth.py @@ -6,7 +6,7 @@ from ..models.ai_plugin_auth_type import AiPluginAuthType from ..models.ai_plugin_http_auth_type import AiPluginHttpAuthType from ..types import UNSET, Unset -B = TypeVar("B", bound="AiPluginAuth") +NP = TypeVar("NP", bound="AiPluginAuth") @attr.s(auto_attribs=True) @@ -35,7 +35,7 @@ class AiPluginAuth: return field_dict @classmethod - def from_dict(cls: Type[B], src_dict: Dict[str, Any]) -> B: + def from_dict(cls: Type[NP], src_dict: Dict[str, Any]) -> NP: d = src_dict.copy() _authorization_type = d.pop("authorization_type", UNSET) authorization_type: Union[Unset, AiPluginHttpAuthType] diff --git a/kittycad/models/ai_plugin_manifest.py b/kittycad/models/ai_plugin_manifest.py index fa52564ee..b59b1ca30 100644 --- a/kittycad/models/ai_plugin_manifest.py +++ b/kittycad/models/ai_plugin_manifest.py @@ -6,14 +6,15 @@ from ..models.ai_plugin_api import AiPluginApi from ..models.ai_plugin_auth import AiPluginAuth from ..types import UNSET, Unset -N = TypeVar("N", bound="AiPluginManifest") +SA = TypeVar("SA", bound="AiPluginManifest") @attr.s(auto_attribs=True) class AiPluginManifest: """AI plugin manifest. - This is used for OpenAI's ChatGPT plugins. You can read more about them [here](https://platform.openai.com/docs/plugins/getting-started/plugin-manifest).""" # noqa: E501 + This is used for OpenAI's ChatGPT plugins. You can read more about them [here](https://platform.openai.com/docs/plugins/getting-started/plugin-manifest). + """ # noqa: E501 api: Union[Unset, AiPluginApi] = UNSET auth: Union[Unset, AiPluginAuth] = UNSET @@ -69,21 +70,21 @@ class AiPluginManifest: return field_dict @classmethod - def from_dict(cls: Type[N], src_dict: Dict[str, Any]) -> N: + def from_dict(cls: Type[SA], src_dict: Dict[str, Any]) -> SA: d = src_dict.copy() _api = d.pop("api", UNSET) api: Union[Unset, AiPluginApi] if isinstance(_api, Unset): api = UNSET else: - api = AiPluginApi(_api) + api = _api # type: ignore[arg-type] _auth = d.pop("auth", UNSET) auth: Union[Unset, AiPluginAuth] if isinstance(_auth, Unset): auth = UNSET else: - auth = AiPluginAuth(_auth) + auth = _auth # type: ignore[arg-type] contact_email = d.pop("contact_email", UNSET) diff --git a/kittycad/models/api_call_query_group.py b/kittycad/models/api_call_query_group.py index 365475f2e..ca55a7975 100644 --- a/kittycad/models/api_call_query_group.py +++ b/kittycad/models/api_call_query_group.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -P = TypeVar("P", bound="ApiCallQueryGroup") +GO = TypeVar("GO", bound="ApiCallQueryGroup") @attr.s(auto_attribs=True) @@ -31,7 +31,7 @@ class ApiCallQueryGroup: return field_dict @classmethod - def from_dict(cls: Type[P], src_dict: Dict[str, Any]) -> P: + def from_dict(cls: Type[GO], src_dict: Dict[str, Any]) -> GO: d = src_dict.copy() count = d.pop("count", UNSET) diff --git a/kittycad/models/api_call_with_price.py b/kittycad/models/api_call_with_price.py index 06d95e332..2c1da0716 100644 --- a/kittycad/models/api_call_with_price.py +++ b/kittycad/models/api_call_with_price.py @@ -8,7 +8,7 @@ from ..models.method import Method from ..models.uuid import Uuid from ..types import UNSET, Unset -S = TypeVar("S", bound="ApiCallWithPrice") +PI = TypeVar("PI", bound="ApiCallWithPrice") @attr.s(auto_attribs=True) @@ -126,7 +126,7 @@ class ApiCallWithPrice: return field_dict @classmethod - def from_dict(cls: Type[S], src_dict: Dict[str, Any]) -> S: + def from_dict(cls: Type[PI], src_dict: Dict[str, Any]) -> PI: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -153,7 +153,7 @@ class ApiCallWithPrice: if isinstance(_id, Unset): id = UNSET else: - id = Uuid(_id) + id = _id # type: ignore[arg-type] ip_address = d.pop("ip_address", UNSET) @@ -194,7 +194,7 @@ class ApiCallWithPrice: if isinstance(_token, Unset): token = UNSET else: - token = Uuid(_token) + token = _token # type: ignore[arg-type] _updated_at = d.pop("updated_at", UNSET) updated_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/api_call_with_price_results_page.py b/kittycad/models/api_call_with_price_results_page.py index 096deac7d..c18ab3baf 100644 --- a/kittycad/models/api_call_with_price_results_page.py +++ b/kittycad/models/api_call_with_price_results_page.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -A = TypeVar("A", bound="ApiCallWithPriceResultsPage") +UZ = TypeVar("UZ", bound="ApiCallWithPriceResultsPage") @attr.s(auto_attribs=True) @@ -37,7 +37,7 @@ class ApiCallWithPriceResultsPage: return field_dict @classmethod - def from_dict(cls: Type[A], src_dict: Dict[str, Any]) -> A: + def from_dict(cls: Type[UZ], src_dict: Dict[str, Any]) -> UZ: d = src_dict.copy() from ..models.api_call_with_price import ApiCallWithPrice diff --git a/kittycad/models/api_token.py b/kittycad/models/api_token.py index 33e052568..839d3ba1e 100644 --- a/kittycad/models/api_token.py +++ b/kittycad/models/api_token.py @@ -7,7 +7,7 @@ from dateutil.parser import isoparse from ..models.uuid import Uuid from ..types import UNSET, Unset -G = TypeVar("G", bound="ApiToken") +FB = TypeVar("FB", bound="ApiToken") @attr.s(auto_attribs=True) @@ -56,7 +56,7 @@ class ApiToken: return field_dict @classmethod - def from_dict(cls: Type[G], src_dict: Dict[str, Any]) -> G: + def from_dict(cls: Type[FB], src_dict: Dict[str, Any]) -> FB: d = src_dict.copy() _created_at = d.pop("created_at", UNSET) created_at: Union[Unset, datetime.datetime] @@ -74,7 +74,7 @@ class ApiToken: if isinstance(_token, Unset): token = UNSET else: - token = Uuid(_token) + token = _token # type: ignore[arg-type] _updated_at = d.pop("updated_at", UNSET) updated_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/api_token_results_page.py b/kittycad/models/api_token_results_page.py index 2e0723417..90ca9ee9e 100644 --- a/kittycad/models/api_token_results_page.py +++ b/kittycad/models/api_token_results_page.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -P = TypeVar("P", bound="ApiTokenResultsPage") +QP = TypeVar("QP", bound="ApiTokenResultsPage") @attr.s(auto_attribs=True) @@ -37,7 +37,7 @@ class ApiTokenResultsPage: return field_dict @classmethod - def from_dict(cls: Type[P], src_dict: Dict[str, Any]) -> P: + def from_dict(cls: Type[QP], src_dict: Dict[str, Any]) -> QP: d = src_dict.copy() from ..models.api_token import ApiToken diff --git a/kittycad/models/app_client_info.py b/kittycad/models/app_client_info.py index 22dbe5b18..b52b0c97e 100644 --- a/kittycad/models/app_client_info.py +++ b/kittycad/models/app_client_info.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -U = TypeVar("U", bound="AppClientInfo") +KC = TypeVar("KC", bound="AppClientInfo") @attr.s(auto_attribs=True) @@ -27,7 +27,7 @@ class AppClientInfo: return field_dict @classmethod - def from_dict(cls: Type[U], src_dict: Dict[str, Any]) -> U: + def from_dict(cls: Type[KC], src_dict: Dict[str, Any]) -> KC: d = src_dict.copy() url = d.pop("url", UNSET) diff --git a/kittycad/models/async_api_call.py b/kittycad/models/async_api_call.py index c29aeda9d..7b2cddd78 100644 --- a/kittycad/models/async_api_call.py +++ b/kittycad/models/async_api_call.py @@ -9,7 +9,7 @@ from ..models.async_api_call_type import AsyncApiCallType from ..models.uuid import Uuid from ..types import UNSET, Unset -Z = TypeVar("Z", bound="AsyncApiCall") +HX = TypeVar("HX", bound="AsyncApiCall") @attr.s(auto_attribs=True) @@ -86,7 +86,7 @@ class AsyncApiCall: return field_dict @classmethod - def from_dict(cls: Type[Z], src_dict: Dict[str, Any]) -> Z: + def from_dict(cls: Type[HX], src_dict: Dict[str, Any]) -> HX: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -109,7 +109,7 @@ class AsyncApiCall: if isinstance(_id, Unset): id = UNSET else: - id = Uuid(_id) + id = _id # type: ignore[arg-type] 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 a9417a92a..eca062ee8 100644 --- a/kittycad/models/async_api_call_output.py +++ b/kittycad/models/async_api_call_output.py @@ -1,5 +1,5 @@ import datetime -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from typing import Any, Dict, List, Type, TypeVar, Union import attr from dateutil.parser import isoparse @@ -9,10 +9,16 @@ from ..models.file_export_format import FileExportFormat from ..models.file_import_format import FileImportFormat from ..models.input_format import InputFormat from ..models.output_format import OutputFormat +from ..models.point3d import Point3d +from ..models.unit_area import UnitArea +from ..models.unit_density import UnitDensity +from ..models.unit_length import UnitLength +from ..models.unit_mass import UnitMass +from ..models.unit_volume import UnitVolume from ..models.uuid import Uuid from ..types import UNSET, Unset -F = TypeVar("F", bound="FileConversion") +LB = TypeVar("LB", bound="FileConversion") @attr.s(auto_attribs=True) @@ -104,7 +110,7 @@ class FileConversion: return field_dict @classmethod - def from_dict(cls: Type[F], src_dict: Dict[str, Any]) -> F: + def from_dict(cls: Type[LB], src_dict: Dict[str, Any]) -> LB: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -127,7 +133,7 @@ class FileConversion: if isinstance(_id, Unset): id = UNSET else: - id = Uuid(_id) + id = _id # type: ignore[arg-type] output = d.pop("output", UNSET) @@ -143,7 +149,7 @@ class FileConversion: if isinstance(_output_format_options, Unset): output_format_options = UNSET else: - output_format_options = OutputFormat(_output_format_options) + output_format_options = _output_format_options # type: ignore[arg-type] outputs = d.pop("outputs", UNSET) _src_format = d.pop("src_format", UNSET) @@ -158,7 +164,7 @@ class FileConversion: if isinstance(_src_format_options, Unset): src_format_options = UNSET else: - src_format_options = InputFormat(_src_format_options) + src_format_options = _src_format_options # type: ignore[arg-type] _started_at = d.pop("started_at", UNSET) started_at: Union[Unset, datetime.datetime] @@ -223,18 +229,20 @@ class FileConversion: return key in self.additional_properties -B = TypeVar("B", bound="FileCenterOfMass") +NE = TypeVar("NE", bound="FileCenterOfMass") @attr.s(auto_attribs=True) class FileCenterOfMass: """File center of mass.""" # noqa: E501 - center_of_mass: Union[Unset, List[float]] = UNSET + center_of_mass: Union[Unset, Point3d] = UNSET + centers_of_mass: Union[Unset, Any] = UNSET completed_at: Union[Unset, datetime.datetime] = UNSET created_at: Union[Unset, datetime.datetime] = UNSET error: Union[Unset, str] = UNSET id: Union[Unset, str] = UNSET + output_unit: Union[Unset, UnitLength] = UNSET src_format: Union[Unset, FileImportFormat] = UNSET started_at: Union[Unset, datetime.datetime] = UNSET status: Union[Unset, ApiCallStatus] = UNSET @@ -245,9 +253,9 @@ class FileCenterOfMass: additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: - center_of_mass: Union[Unset, List[float]] = UNSET if not isinstance(self.center_of_mass, Unset): center_of_mass = self.center_of_mass + centers_of_mass = self.centers_of_mass completed_at: Union[Unset, str] = UNSET if not isinstance(self.completed_at, Unset): completed_at = self.completed_at.isoformat() @@ -256,6 +264,8 @@ class FileCenterOfMass: created_at = self.created_at.isoformat() error = self.error id = self.id + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit if not isinstance(self.src_format, Unset): src_format = self.src_format started_at: Union[Unset, str] = UNSET @@ -274,6 +284,8 @@ class FileCenterOfMass: field_dict.update({}) if center_of_mass is not UNSET: field_dict["center_of_mass"] = center_of_mass + if centers_of_mass is not UNSET: + field_dict["centers_of_mass"] = centers_of_mass if completed_at is not UNSET: field_dict["completed_at"] = completed_at if created_at is not UNSET: @@ -282,6 +294,8 @@ class FileCenterOfMass: field_dict["error"] = error if id is not UNSET: field_dict["id"] = id + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit if src_format is not UNSET: field_dict["src_format"] = src_format if started_at is not UNSET: @@ -298,10 +312,16 @@ class FileCenterOfMass: return field_dict @classmethod - def from_dict(cls: Type[B], src_dict: Dict[str, Any]) -> B: + def from_dict(cls: Type[NE], src_dict: Dict[str, Any]) -> NE: d = src_dict.copy() - center_of_mass = cast(List[float], d.pop("center_of_mass", UNSET)) + _center_of_mass = d.pop("center_of_mass", UNSET) + center_of_mass: Union[Unset, Point3d] + if isinstance(_center_of_mass, Unset): + center_of_mass = UNSET + else: + center_of_mass = _center_of_mass # type: ignore[arg-type] + centers_of_mass = d.pop("centers_of_mass", UNSET) _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] if isinstance(_completed_at, Unset): @@ -323,7 +343,14 @@ class FileCenterOfMass: if isinstance(_id, Unset): id = UNSET else: - id = Uuid(_id) + id = _id # type: ignore[arg-type] + + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitLength] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] _src_format = d.pop("src_format", UNSET) src_format: Union[Unset, FileImportFormat] @@ -359,10 +386,12 @@ class FileCenterOfMass: file_center_of_mass = cls( center_of_mass=center_of_mass, + centers_of_mass=centers_of_mass, completed_at=completed_at, created_at=created_at, error=error, id=id, + output_unit=output_unit, src_format=src_format, started_at=started_at, status=status, @@ -391,7 +420,7 @@ class FileCenterOfMass: return key in self.additional_properties -Q = TypeVar("Q", bound="FileMass") +TL = TypeVar("TL", bound="FileMass") @attr.s(auto_attribs=True) @@ -403,7 +432,10 @@ class FileMass: error: Union[Unset, str] = UNSET id: Union[Unset, str] = UNSET mass: Union[Unset, float] = UNSET + masses: Union[Unset, Any] = UNSET material_density: Union[Unset, float] = UNSET + material_density_unit: Union[Unset, UnitDensity] = UNSET + output_unit: Union[Unset, UnitMass] = UNSET src_format: Union[Unset, FileImportFormat] = UNSET started_at: Union[Unset, datetime.datetime] = UNSET status: Union[Unset, ApiCallStatus] = UNSET @@ -423,7 +455,12 @@ class FileMass: error = self.error id = self.id mass = self.mass + masses = self.masses material_density = self.material_density + if not isinstance(self.material_density_unit, Unset): + material_density_unit = self.material_density_unit + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit if not isinstance(self.src_format, Unset): src_format = self.src_format started_at: Union[Unset, str] = UNSET @@ -450,8 +487,14 @@ class FileMass: field_dict["id"] = id if mass is not UNSET: field_dict["mass"] = mass + if masses is not UNSET: + field_dict["masses"] = masses if material_density is not UNSET: field_dict["material_density"] = material_density + if material_density_unit is not UNSET: + field_dict["material_density_unit"] = material_density_unit + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit if src_format is not UNSET: field_dict["src_format"] = src_format if started_at is not UNSET: @@ -468,7 +511,7 @@ class FileMass: return field_dict @classmethod - def from_dict(cls: Type[Q], src_dict: Dict[str, Any]) -> Q: + def from_dict(cls: Type[TL], src_dict: Dict[str, Any]) -> TL: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -491,12 +534,27 @@ class FileMass: if isinstance(_id, Unset): id = UNSET else: - id = Uuid(_id) + id = _id # type: ignore[arg-type] mass = d.pop("mass", UNSET) + masses = d.pop("masses", UNSET) material_density = d.pop("material_density", UNSET) + _material_density_unit = d.pop("material_density_unit", UNSET) + material_density_unit: Union[Unset, UnitDensity] + if isinstance(_material_density_unit, Unset): + material_density_unit = UNSET + else: + material_density_unit = _material_density_unit # type: ignore[arg-type] + + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitMass] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] + _src_format = d.pop("src_format", UNSET) src_format: Union[Unset, FileImportFormat] if isinstance(_src_format, Unset): @@ -535,7 +593,10 @@ class FileMass: error=error, id=id, mass=mass, + masses=masses, material_density=material_density, + material_density_unit=material_density_unit, + output_unit=output_unit, src_format=src_format, started_at=started_at, status=status, @@ -564,7 +625,7 @@ class FileMass: return key in self.additional_properties -P = TypeVar("P", bound="FileVolume") +MN = TypeVar("MN", bound="FileVolume") @attr.s(auto_attribs=True) @@ -575,6 +636,7 @@ class FileVolume: created_at: Union[Unset, datetime.datetime] = UNSET error: Union[Unset, str] = UNSET id: Union[Unset, str] = UNSET + output_unit: Union[Unset, UnitVolume] = UNSET src_format: Union[Unset, FileImportFormat] = UNSET started_at: Union[Unset, datetime.datetime] = UNSET status: Union[Unset, ApiCallStatus] = UNSET @@ -582,6 +644,7 @@ class FileVolume: updated_at: Union[Unset, datetime.datetime] = UNSET user_id: Union[Unset, str] = UNSET volume: Union[Unset, float] = UNSET + volumes: Union[Unset, Any] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -594,6 +657,8 @@ class FileVolume: created_at = self.created_at.isoformat() error = self.error id = self.id + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit if not isinstance(self.src_format, Unset): src_format = self.src_format started_at: Union[Unset, str] = UNSET @@ -607,6 +672,7 @@ class FileVolume: updated_at = self.updated_at.isoformat() user_id = self.user_id volume = self.volume + volumes = self.volumes field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -619,6 +685,8 @@ class FileVolume: field_dict["error"] = error if id is not UNSET: field_dict["id"] = id + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit if src_format is not UNSET: field_dict["src_format"] = src_format if started_at is not UNSET: @@ -633,11 +701,13 @@ class FileVolume: field_dict["user_id"] = user_id if volume is not UNSET: field_dict["volume"] = volume + if volumes is not UNSET: + field_dict["volumes"] = volumes return field_dict @classmethod - def from_dict(cls: Type[P], src_dict: Dict[str, Any]) -> P: + def from_dict(cls: Type[MN], src_dict: Dict[str, Any]) -> MN: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -660,7 +730,14 @@ class FileVolume: if isinstance(_id, Unset): id = UNSET else: - id = Uuid(_id) + id = _id # type: ignore[arg-type] + + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitVolume] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] _src_format = d.pop("src_format", UNSET) src_format: Union[Unset, FileImportFormat] @@ -696,11 +773,14 @@ class FileVolume: volume = d.pop("volume", UNSET) + volumes = d.pop("volumes", UNSET) + file_volume = cls( completed_at=completed_at, created_at=created_at, error=error, id=id, + output_unit=output_unit, src_format=src_format, started_at=started_at, status=status, @@ -708,6 +788,7 @@ class FileVolume: updated_at=updated_at, user_id=user_id, volume=volume, + volumes=volumes, ) file_volume.additional_properties = d @@ -730,7 +811,7 @@ class FileVolume: return key in self.additional_properties -K = TypeVar("K", bound="FileDensity") +JV = TypeVar("JV", bound="FileDensity") @attr.s(auto_attribs=True) @@ -739,10 +820,13 @@ class FileDensity: completed_at: Union[Unset, datetime.datetime] = UNSET created_at: Union[Unset, datetime.datetime] = UNSET + densities: Union[Unset, Any] = UNSET density: Union[Unset, float] = UNSET error: Union[Unset, str] = UNSET id: Union[Unset, str] = UNSET material_mass: Union[Unset, float] = UNSET + material_mass_unit: Union[Unset, UnitMass] = UNSET + output_unit: Union[Unset, UnitDensity] = UNSET src_format: Union[Unset, FileImportFormat] = UNSET started_at: Union[Unset, datetime.datetime] = UNSET status: Union[Unset, ApiCallStatus] = UNSET @@ -759,10 +843,15 @@ class FileDensity: created_at: Union[Unset, str] = UNSET if not isinstance(self.created_at, Unset): created_at = self.created_at.isoformat() + densities = self.densities density = self.density error = self.error id = self.id material_mass = self.material_mass + if not isinstance(self.material_mass_unit, Unset): + material_mass_unit = self.material_mass_unit + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit if not isinstance(self.src_format, Unset): src_format = self.src_format started_at: Union[Unset, str] = UNSET @@ -783,6 +872,8 @@ class FileDensity: field_dict["completed_at"] = completed_at if created_at is not UNSET: field_dict["created_at"] = created_at + if densities is not UNSET: + field_dict["densities"] = densities if density is not UNSET: field_dict["density"] = density if error is not UNSET: @@ -791,6 +882,10 @@ class FileDensity: field_dict["id"] = id if material_mass is not UNSET: field_dict["material_mass"] = material_mass + if material_mass_unit is not UNSET: + field_dict["material_mass_unit"] = material_mass_unit + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit if src_format is not UNSET: field_dict["src_format"] = src_format if started_at is not UNSET: @@ -807,7 +902,7 @@ class FileDensity: return field_dict @classmethod - def from_dict(cls: Type[K], src_dict: Dict[str, Any]) -> K: + def from_dict(cls: Type[JV], src_dict: Dict[str, Any]) -> JV: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -823,6 +918,7 @@ class FileDensity: else: created_at = isoparse(_created_at) + densities = d.pop("densities", UNSET) density = d.pop("density", UNSET) error = d.pop("error", UNSET) @@ -832,10 +928,24 @@ class FileDensity: if isinstance(_id, Unset): id = UNSET else: - id = Uuid(_id) + id = _id # type: ignore[arg-type] material_mass = d.pop("material_mass", UNSET) + _material_mass_unit = d.pop("material_mass_unit", UNSET) + material_mass_unit: Union[Unset, UnitMass] + if isinstance(_material_mass_unit, Unset): + material_mass_unit = UNSET + else: + material_mass_unit = _material_mass_unit # type: ignore[arg-type] + + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitDensity] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] + _src_format = d.pop("src_format", UNSET) src_format: Union[Unset, FileImportFormat] if isinstance(_src_format, Unset): @@ -871,10 +981,13 @@ class FileDensity: file_density = cls( completed_at=completed_at, created_at=created_at, + densities=densities, density=density, error=error, id=id, material_mass=material_mass, + material_mass_unit=material_mass_unit, + output_unit=output_unit, src_format=src_format, started_at=started_at, status=status, @@ -903,7 +1016,7 @@ class FileDensity: return key in self.additional_properties -C = TypeVar("C", bound="FileSurfaceArea") +IO = TypeVar("IO", bound="FileSurfaceArea") @attr.s(auto_attribs=True) @@ -914,10 +1027,12 @@ class FileSurfaceArea: created_at: Union[Unset, datetime.datetime] = UNSET error: Union[Unset, str] = UNSET id: Union[Unset, str] = UNSET + output_unit: Union[Unset, UnitArea] = UNSET src_format: Union[Unset, FileImportFormat] = UNSET started_at: Union[Unset, datetime.datetime] = UNSET status: Union[Unset, ApiCallStatus] = UNSET surface_area: Union[Unset, float] = UNSET + surface_areas: Union[Unset, Any] = UNSET type: Union[Unset, str] = UNSET updated_at: Union[Unset, datetime.datetime] = UNSET user_id: Union[Unset, str] = UNSET @@ -933,6 +1048,8 @@ class FileSurfaceArea: created_at = self.created_at.isoformat() error = self.error id = self.id + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit if not isinstance(self.src_format, Unset): src_format = self.src_format started_at: Union[Unset, str] = UNSET @@ -941,6 +1058,7 @@ class FileSurfaceArea: if not isinstance(self.status, Unset): status = self.status surface_area = self.surface_area + surface_areas = self.surface_areas type = self.type updated_at: Union[Unset, str] = UNSET if not isinstance(self.updated_at, Unset): @@ -958,6 +1076,8 @@ class FileSurfaceArea: field_dict["error"] = error if id is not UNSET: field_dict["id"] = id + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit if src_format is not UNSET: field_dict["src_format"] = src_format if started_at is not UNSET: @@ -966,6 +1086,8 @@ class FileSurfaceArea: field_dict["status"] = status if surface_area is not UNSET: field_dict["surface_area"] = surface_area + if surface_areas is not UNSET: + field_dict["surface_areas"] = surface_areas if type is not UNSET: field_dict["type"] = type if updated_at is not UNSET: @@ -976,7 +1098,7 @@ class FileSurfaceArea: return field_dict @classmethod - def from_dict(cls: Type[C], src_dict: Dict[str, Any]) -> C: + def from_dict(cls: Type[IO], src_dict: Dict[str, Any]) -> IO: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -999,7 +1121,14 @@ class FileSurfaceArea: if isinstance(_id, Unset): id = UNSET else: - id = Uuid(_id) + id = _id # type: ignore[arg-type] + + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitArea] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] _src_format = d.pop("src_format", UNSET) src_format: Union[Unset, FileImportFormat] @@ -1024,6 +1153,7 @@ class FileSurfaceArea: surface_area = d.pop("surface_area", UNSET) + surface_areas = d.pop("surface_areas", UNSET) type = d.pop("type", UNSET) _updated_at = d.pop("updated_at", UNSET) @@ -1040,10 +1170,12 @@ class FileSurfaceArea: created_at=created_at, error=error, id=id, + output_unit=output_unit, src_format=src_format, started_at=started_at, status=status, surface_area=surface_area, + surface_areas=surface_areas, type=type, updated_at=updated_at, user_id=user_id, diff --git a/kittycad/models/async_api_call_results_page.py b/kittycad/models/async_api_call_results_page.py index 3c2bb1361..288d2579c 100644 --- a/kittycad/models/async_api_call_results_page.py +++ b/kittycad/models/async_api_call_results_page.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -H = TypeVar("H", bound="AsyncApiCallResultsPage") +FV = TypeVar("FV", bound="AsyncApiCallResultsPage") @attr.s(auto_attribs=True) @@ -37,7 +37,7 @@ class AsyncApiCallResultsPage: return field_dict @classmethod - def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H: + def from_dict(cls: Type[FV], src_dict: Dict[str, Any]) -> FV: d = src_dict.copy() from ..models.async_api_call import AsyncApiCall diff --git a/kittycad/models/axis.py b/kittycad/models/axis.py index b6ffeb712..e8d15f3f7 100644 --- a/kittycad/models/axis.py +++ b/kittycad/models/axis.py @@ -6,7 +6,8 @@ class Axis(str, Enum): See [cglearn.eu] for background reading. - [cglearn.eu]: https://cglearn.eu/pub/computer-graphics/introduction-to-geometry#material-coordinate-systems-1""" # noqa: E501 + [cglearn.eu]: https://cglearn.eu/pub/computer-graphics/introduction-to-geometry#material-coordinate-systems-1 + """ # noqa: E501 """# 'Y' axis. """ # noqa: E501 Y = "y" diff --git a/kittycad/models/axis_direction_pair.py b/kittycad/models/axis_direction_pair.py index ba5ea5414..fb58e9e5e 100644 --- a/kittycad/models/axis_direction_pair.py +++ b/kittycad/models/axis_direction_pair.py @@ -6,7 +6,7 @@ from ..models.axis import Axis from ..models.direction import Direction from ..types import UNSET, Unset -X = TypeVar("X", bound="AxisDirectionPair") +LE = TypeVar("LE", bound="AxisDirectionPair") @attr.s(auto_attribs=True) @@ -35,7 +35,7 @@ class AxisDirectionPair: return field_dict @classmethod - def from_dict(cls: Type[X], src_dict: Dict[str, Any]) -> X: + def from_dict(cls: Type[LE], src_dict: Dict[str, Any]) -> LE: d = src_dict.copy() _axis = d.pop("axis", UNSET) axis: Union[Unset, Axis] diff --git a/kittycad/models/billing_info.py b/kittycad/models/billing_info.py index f0bd9bf6d..4968bff42 100644 --- a/kittycad/models/billing_info.py +++ b/kittycad/models/billing_info.py @@ -5,7 +5,7 @@ import attr from ..models.new_address import NewAddress from ..types import UNSET, Unset -L = TypeVar("L", bound="BillingInfo") +OY = TypeVar("OY", bound="BillingInfo") @attr.s(auto_attribs=True) @@ -37,14 +37,14 @@ class BillingInfo: return field_dict @classmethod - def from_dict(cls: Type[L], src_dict: Dict[str, Any]) -> L: + def from_dict(cls: Type[OY], src_dict: Dict[str, Any]) -> OY: d = src_dict.copy() _address = d.pop("address", UNSET) address: Union[Unset, NewAddress] if isinstance(_address, Unset): address = UNSET else: - address = NewAddress(_address) + address = _address # type: ignore[arg-type] name = d.pop("name", UNSET) diff --git a/kittycad/models/cache_metadata.py b/kittycad/models/cache_metadata.py index 660e24653..e8d43576b 100644 --- a/kittycad/models/cache_metadata.py +++ b/kittycad/models/cache_metadata.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -B = TypeVar("B", bound="CacheMetadata") +HO = TypeVar("HO", bound="CacheMetadata") @attr.s(auto_attribs=True) @@ -29,7 +29,7 @@ class CacheMetadata: return field_dict @classmethod - def from_dict(cls: Type[B], src_dict: Dict[str, Any]) -> B: + def from_dict(cls: Type[HO], src_dict: Dict[str, Any]) -> HO: d = src_dict.copy() ok = d.pop("ok", UNSET) diff --git a/kittycad/models/card_details.py b/kittycad/models/card_details.py index 82f8c806e..53ef1722e 100644 --- a/kittycad/models/card_details.py +++ b/kittycad/models/card_details.py @@ -5,7 +5,7 @@ import attr from ..models.payment_method_card_checks import PaymentMethodCardChecks from ..types import UNSET, Unset -N = TypeVar("N", bound="CardDetails") +TM = TypeVar("TM", bound="CardDetails") @attr.s(auto_attribs=True) @@ -57,7 +57,7 @@ class CardDetails: return field_dict @classmethod - def from_dict(cls: Type[N], src_dict: Dict[str, Any]) -> N: + def from_dict(cls: Type[TM], src_dict: Dict[str, Any]) -> TM: d = src_dict.copy() brand = d.pop("brand", UNSET) @@ -66,7 +66,7 @@ class CardDetails: if isinstance(_checks, Unset): checks = UNSET else: - checks = PaymentMethodCardChecks(_checks) + checks = _checks # type: ignore[arg-type] country = d.pop("country", UNSET) diff --git a/kittycad/models/cluster.py b/kittycad/models/cluster.py index 515dfd217..19e53fe6a 100644 --- a/kittycad/models/cluster.py +++ b/kittycad/models/cluster.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -E = TypeVar("E", bound="Cluster") +BS = TypeVar("BS", bound="Cluster") @attr.s(auto_attribs=True) @@ -49,7 +49,7 @@ class Cluster: return field_dict @classmethod - def from_dict(cls: Type[E], src_dict: Dict[str, Any]) -> E: + def from_dict(cls: Type[BS], src_dict: Dict[str, Any]) -> BS: d = src_dict.copy() addr = d.pop("addr", UNSET) diff --git a/kittycad/models/code_output.py b/kittycad/models/code_output.py index 884b26670..ba841fb64 100644 --- a/kittycad/models/code_output.py +++ b/kittycad/models/code_output.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -T = TypeVar("T", bound="CodeOutput") +AH = TypeVar("AH", bound="CodeOutput") @attr.s(auto_attribs=True) @@ -41,7 +41,7 @@ class CodeOutput: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: Type[AH], src_dict: Dict[str, Any]) -> AH: d = src_dict.copy() from ..models.output_file import OutputFile diff --git a/kittycad/models/commit.py b/kittycad/models/commit.py index bc14cbaf6..d999d3c56 100644 --- a/kittycad/models/commit.py +++ b/kittycad/models/commit.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -L = TypeVar("L", bound="Commit") +EG = TypeVar("EG", bound="Commit") @attr.s(auto_attribs=True) @@ -31,7 +31,7 @@ class Commit: return field_dict @classmethod - def from_dict(cls: Type[L], src_dict: Dict[str, Any]) -> L: + def from_dict(cls: Type[EG], src_dict: Dict[str, Any]) -> EG: d = src_dict.copy() expected = d.pop("expected", UNSET) diff --git a/kittycad/models/connection.py b/kittycad/models/connection.py index 39620668f..0ad29ca3b 100644 --- a/kittycad/models/connection.py +++ b/kittycad/models/connection.py @@ -10,7 +10,7 @@ from ..models.jetstream import Jetstream from ..models.leaf_node import LeafNode from ..types import UNSET, Unset -M = TypeVar("M", bound="Connection") +JR = TypeVar("JR", bound="Connection") @attr.s(auto_attribs=True) @@ -225,7 +225,7 @@ class Connection: return field_dict @classmethod - def from_dict(cls: Type[M], src_dict: Dict[str, Any]) -> M: + def from_dict(cls: Type[JR], src_dict: Dict[str, Any]) -> JR: d = src_dict.copy() auth_timeout = d.pop("auth_timeout", UNSET) @@ -234,7 +234,7 @@ class Connection: if isinstance(_cluster, Unset): cluster = UNSET else: - cluster = Cluster(_cluster) + cluster = _cluster # type: ignore[arg-type] _config_load_time = d.pop("config_load_time", UNSET) config_load_time: Union[Unset, datetime.datetime] @@ -254,7 +254,7 @@ class Connection: if isinstance(_gateway, Unset): gateway = UNSET else: - gateway = Gateway(_gateway) + gateway = _gateway # type: ignore[arg-type] git_commit = d.pop("git_commit", UNSET) @@ -282,14 +282,14 @@ class Connection: if isinstance(_jetstream, Unset): jetstream = UNSET else: - jetstream = Jetstream(_jetstream) + jetstream = _jetstream # type: ignore[arg-type] _leaf = d.pop("leaf", UNSET) leaf: Union[Unset, LeafNode] if isinstance(_leaf, Unset): leaf = UNSET else: - leaf = LeafNode(_leaf) + leaf = _leaf # type: ignore[arg-type] leafnodes = d.pop("leafnodes", UNSET) diff --git a/kittycad/models/coupon.py b/kittycad/models/coupon.py index 3ca5b04bf..0563196ae 100644 --- a/kittycad/models/coupon.py +++ b/kittycad/models/coupon.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -N = TypeVar("N", bound="Coupon") +LY = TypeVar("LY", bound="Coupon") @attr.s(auto_attribs=True) @@ -39,7 +39,7 @@ class Coupon: return field_dict @classmethod - def from_dict(cls: Type[N], src_dict: Dict[str, Any]) -> N: + def from_dict(cls: Type[LY], src_dict: Dict[str, Any]) -> LY: d = src_dict.copy() amount_off = d.pop("amount_off", UNSET) diff --git a/kittycad/models/currency.py b/kittycad/models/currency.py index 53582a4f4..ac49060fe 100644 --- a/kittycad/models/currency.py +++ b/kittycad/models/currency.py @@ -4,7 +4,8 @@ from enum import Enum class Currency(str, Enum): """Currency is the list of supported currencies. - This comes from the Stripe API docs: For more details see .""" # noqa: E501 + This comes from the Stripe API docs: For more details see . + """ # noqa: E501 """# United Arab Emirates Dirham """ # noqa: E501 AED = "aed" diff --git a/kittycad/models/customer.py b/kittycad/models/customer.py index 200c2b554..34a008a11 100644 --- a/kittycad/models/customer.py +++ b/kittycad/models/customer.py @@ -8,7 +8,7 @@ from ..models.currency import Currency from ..models.new_address import NewAddress from ..types import UNSET, Unset -J = TypeVar("J", bound="Customer") +HK = TypeVar("HK", bound="Customer") @attr.s(auto_attribs=True) @@ -71,14 +71,14 @@ class Customer: return field_dict @classmethod - def from_dict(cls: Type[J], src_dict: Dict[str, Any]) -> J: + def from_dict(cls: Type[HK], src_dict: Dict[str, Any]) -> HK: d = src_dict.copy() _address = d.pop("address", UNSET) address: Union[Unset, NewAddress] if isinstance(_address, Unset): address = UNSET else: - address = NewAddress(_address) + address = _address # type: ignore[arg-type] balance = d.pop("balance", UNSET) diff --git a/kittycad/models/customer_balance.py b/kittycad/models/customer_balance.py index 76452e703..eec17d881 100644 --- a/kittycad/models/customer_balance.py +++ b/kittycad/models/customer_balance.py @@ -7,7 +7,7 @@ from dateutil.parser import isoparse from ..models.uuid import Uuid from ..types import UNSET, Unset -V = TypeVar("V", bound="CustomerBalance") +VR = TypeVar("VR", bound="CustomerBalance") @attr.s(auto_attribs=True) @@ -64,7 +64,7 @@ class CustomerBalance: return field_dict @classmethod - def from_dict(cls: Type[V], src_dict: Dict[str, Any]) -> V: + def from_dict(cls: Type[VR], src_dict: Dict[str, Any]) -> VR: d = src_dict.copy() _created_at = d.pop("created_at", UNSET) created_at: Union[Unset, datetime.datetime] @@ -78,7 +78,7 @@ class CustomerBalance: if isinstance(_id, Unset): id = UNSET else: - id = Uuid(_id) + id = _id # type: ignore[arg-type] monthly_credits_remaining = d.pop("monthly_credits_remaining", UNSET) diff --git a/kittycad/models/device_access_token_request_form.py b/kittycad/models/device_access_token_request_form.py index eeacb1e53..233ce0c10 100644 --- a/kittycad/models/device_access_token_request_form.py +++ b/kittycad/models/device_access_token_request_form.py @@ -5,7 +5,7 @@ import attr from ..models.o_auth2_grant_type import OAuth2GrantType from ..types import UNSET, Unset -F = TypeVar("F", bound="DeviceAccessTokenRequestForm") +ON = TypeVar("ON", bound="DeviceAccessTokenRequestForm") @attr.s(auto_attribs=True) @@ -37,7 +37,7 @@ class DeviceAccessTokenRequestForm: return field_dict @classmethod - def from_dict(cls: Type[F], src_dict: Dict[str, Any]) -> F: + def from_dict(cls: Type[ON], src_dict: Dict[str, Any]) -> ON: d = src_dict.copy() client_id = d.pop("client_id", UNSET) diff --git a/kittycad/models/device_auth_request_form.py b/kittycad/models/device_auth_request_form.py index 81821e4b7..278080a4a 100644 --- a/kittycad/models/device_auth_request_form.py +++ b/kittycad/models/device_auth_request_form.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -V = TypeVar("V", bound="DeviceAuthRequestForm") +PC = TypeVar("PC", bound="DeviceAuthRequestForm") @attr.s(auto_attribs=True) @@ -27,7 +27,7 @@ class DeviceAuthRequestForm: return field_dict @classmethod - def from_dict(cls: Type[V], src_dict: Dict[str, Any]) -> V: + def from_dict(cls: Type[PC], src_dict: Dict[str, Any]) -> PC: d = src_dict.copy() client_id = d.pop("client_id", UNSET) diff --git a/kittycad/models/device_auth_verify_params.py b/kittycad/models/device_auth_verify_params.py index ff6d9ea2e..c83eb7aca 100644 --- a/kittycad/models/device_auth_verify_params.py +++ b/kittycad/models/device_auth_verify_params.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -J = TypeVar("J", bound="DeviceAuthVerifyParams") +US = TypeVar("US", bound="DeviceAuthVerifyParams") @attr.s(auto_attribs=True) @@ -27,7 +27,7 @@ class DeviceAuthVerifyParams: return field_dict @classmethod - def from_dict(cls: Type[J], src_dict: Dict[str, Any]) -> J: + def from_dict(cls: Type[US], src_dict: Dict[str, Any]) -> US: d = src_dict.copy() user_code = d.pop("user_code", UNSET) diff --git a/kittycad/models/discount.py b/kittycad/models/discount.py index bdcdee3ee..9d92decf2 100644 --- a/kittycad/models/discount.py +++ b/kittycad/models/discount.py @@ -5,7 +5,7 @@ import attr from ..models.coupon import Coupon from ..types import UNSET, Unset -V = TypeVar("V", bound="Discount") +KQ = TypeVar("KQ", bound="Discount") @attr.s(auto_attribs=True) @@ -29,14 +29,14 @@ class Discount: return field_dict @classmethod - def from_dict(cls: Type[V], src_dict: Dict[str, Any]) -> V: + def from_dict(cls: Type[KQ], src_dict: Dict[str, Any]) -> KQ: d = src_dict.copy() _coupon = d.pop("coupon", UNSET) coupon: Union[Unset, Coupon] if isinstance(_coupon, Unset): coupon = UNSET else: - coupon = Coupon(_coupon) + coupon = _coupon # type: ignore[arg-type] discount = cls( coupon=coupon, diff --git a/kittycad/models/docker_system_info.py b/kittycad/models/docker_system_info.py index 3d1ae69a3..6d7272ea6 100644 --- a/kittycad/models/docker_system_info.py +++ b/kittycad/models/docker_system_info.py @@ -10,7 +10,7 @@ from ..models.system_info_cgroup_version_enum import SystemInfoCgroupVersionEnum from ..models.system_info_isolation_enum import SystemInfoIsolationEnum from ..types import UNSET, Unset -L = TypeVar("L", bound="DockerSystemInfo") +FH = TypeVar("FH", bound="DockerSystemInfo") @attr.s(auto_attribs=True) @@ -293,7 +293,7 @@ class DockerSystemInfo: return field_dict @classmethod - def from_dict(cls: Type[L], src_dict: Dict[str, Any]) -> L: + def from_dict(cls: Type[FH], src_dict: Dict[str, Any]) -> FH: d = src_dict.copy() architecture = d.pop("architecture", UNSET) @@ -306,14 +306,14 @@ class DockerSystemInfo: if isinstance(_cgroup_driver, Unset): cgroup_driver = UNSET else: - cgroup_driver = SystemInfoCgroupDriverEnum(_cgroup_driver) + cgroup_driver = _cgroup_driver # type: ignore[arg-type] _cgroup_version = d.pop("cgroup_version", UNSET) cgroup_version: Union[Unset, SystemInfoCgroupVersionEnum] if isinstance(_cgroup_version, Unset): cgroup_version = UNSET else: - cgroup_version = SystemInfoCgroupVersionEnum(_cgroup_version) + cgroup_version = _cgroup_version # type: ignore[arg-type] cluster_advertise = d.pop("cluster_advertise", UNSET) @@ -324,7 +324,7 @@ class DockerSystemInfo: if isinstance(_containerd_commit, Unset): containerd_commit = UNSET else: - containerd_commit = Commit(_containerd_commit) + containerd_commit = _containerd_commit # type: ignore[arg-type] containers = d.pop("containers", UNSET) @@ -379,7 +379,7 @@ class DockerSystemInfo: if isinstance(_init_commit, Unset): init_commit = UNSET else: - init_commit = Commit(_init_commit) + init_commit = _init_commit # type: ignore[arg-type] ipv4_forwarding = d.pop("ipv4_forwarding", UNSET) @@ -388,7 +388,7 @@ class DockerSystemInfo: if isinstance(_isolation, Unset): isolation = UNSET else: - isolation = SystemInfoIsolationEnum(_isolation) + isolation = _isolation # type: ignore[arg-type] kernel_memory = d.pop("kernel_memory", UNSET) @@ -431,7 +431,7 @@ class DockerSystemInfo: if isinstance(_plugins, Unset): plugins = UNSET else: - plugins = PluginsInfo(_plugins) + plugins = _plugins # type: ignore[arg-type] product_license = d.pop("product_license", UNSET) @@ -440,14 +440,14 @@ class DockerSystemInfo: if isinstance(_registry_config, Unset): registry_config = UNSET else: - registry_config = RegistryServiceConfig(_registry_config) + registry_config = _registry_config # type: ignore[arg-type] _runc_commit = d.pop("runc_commit", UNSET) runc_commit: Union[Unset, Commit] if isinstance(_runc_commit, Unset): runc_commit = UNSET else: - runc_commit = Commit(_runc_commit) + runc_commit = _runc_commit # type: ignore[arg-type] runtimes = d.pop("runtimes", UNSET) security_options = cast(List[str], d.pop("security_options", UNSET)) diff --git a/kittycad/models/email_authentication_form.py b/kittycad/models/email_authentication_form.py index d65dced16..8e1f3aaab 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 -E = TypeVar("E", bound="EmailAuthenticationForm") +NH = TypeVar("NH", bound="EmailAuthenticationForm") @attr.s(auto_attribs=True) @@ -31,7 +31,7 @@ class EmailAuthenticationForm: return field_dict @classmethod - def from_dict(cls: Type[E], src_dict: Dict[str, Any]) -> E: + def from_dict(cls: Type[NH], src_dict: Dict[str, Any]) -> NH: 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 91800cb2f..03e993f94 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 -Y = TypeVar("Y", bound="EngineMetadata") +BB = TypeVar("BB", bound="EngineMetadata") @attr.s(auto_attribs=True) @@ -57,7 +57,7 @@ class EngineMetadata: return field_dict @classmethod - def from_dict(cls: Type[Y], src_dict: Dict[str, Any]) -> Y: + def from_dict(cls: Type[BB], src_dict: Dict[str, Any]) -> BB: d = src_dict.copy() async_jobs_running = d.pop("async_jobs_running", UNSET) @@ -66,7 +66,7 @@ class EngineMetadata: if isinstance(_cache, Unset): cache = UNSET else: - cache = CacheMetadata(_cache) + cache = _cache # type: ignore[arg-type] _environment = d.pop("environment", UNSET) environment: Union[Unset, Environment] @@ -80,7 +80,7 @@ class EngineMetadata: if isinstance(_fs, Unset): fs = UNSET else: - fs = FileSystemMetadata(_fs) + fs = _fs # type: ignore[arg-type] git_hash = d.pop("git_hash", UNSET) @@ -89,7 +89,7 @@ class EngineMetadata: if isinstance(_pubsub, Unset): pubsub = UNSET else: - pubsub = Connection(_pubsub) + pubsub = _pubsub # type: ignore[arg-type] engine_metadata = cls( async_jobs_running=async_jobs_running, diff --git a/kittycad/models/error.py b/kittycad/models/error.py index 75e7771e1..386ce0d4d 100644 --- a/kittycad/models/error.py +++ b/kittycad/models/error.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -H = TypeVar("H", bound="Error") +PJ = TypeVar("PJ", bound="Error") @attr.s(auto_attribs=True) @@ -35,7 +35,7 @@ class Error: return field_dict @classmethod - def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H: + def from_dict(cls: Type[PJ], src_dict: Dict[str, Any]) -> PJ: 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 c6cc36fc5..a80a3485c 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 -T = TypeVar("T", bound="ExecutorMetadata") +TV = TypeVar("TV", bound="ExecutorMetadata") @attr.s(auto_attribs=True) @@ -41,14 +41,14 @@ class ExecutorMetadata: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: Type[TV], src_dict: Dict[str, Any]) -> TV: d = src_dict.copy() _docker_info = d.pop("docker_info", UNSET) docker_info: Union[Unset, DockerSystemInfo] if isinstance(_docker_info, Unset): docker_info = UNSET else: - docker_info = DockerSystemInfo(_docker_info) + docker_info = _docker_info # type: ignore[arg-type] _environment = d.pop("environment", UNSET) environment: Union[Unset, Environment] diff --git a/kittycad/models/extended_user.py b/kittycad/models/extended_user.py index 000c7d1c6..f73cb883d 100644 --- a/kittycad/models/extended_user.py +++ b/kittycad/models/extended_user.py @@ -6,14 +6,15 @@ from dateutil.parser import isoparse from ..types import UNSET, Unset -M = TypeVar("M", bound="ExtendedUser") +CR = TypeVar("CR", bound="ExtendedUser") @attr.s(auto_attribs=True) class ExtendedUser: """Extended user information. - This is mostly used for internal purposes. It returns a mapping of the user's information, including that of our third party services we use for users: MailChimp, Stripe, and Front""" # noqa: E501 + This is mostly used for internal purposes. It returns a mapping of the user's information, including that of our third party services we use for users: MailChimp, Stripe, and Front + """ # noqa: E501 company: Union[Unset, str] = UNSET created_at: Union[Unset, datetime.datetime] = UNSET @@ -97,7 +98,7 @@ class ExtendedUser: return field_dict @classmethod - def from_dict(cls: Type[M], src_dict: Dict[str, Any]) -> M: + def from_dict(cls: Type[CR], src_dict: Dict[str, Any]) -> CR: 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 e607718fb..0d1d86cbc 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 -B = TypeVar("B", bound="ExtendedUserResultsPage") +CE = TypeVar("CE", bound="ExtendedUserResultsPage") @attr.s(auto_attribs=True) @@ -37,7 +37,7 @@ class ExtendedUserResultsPage: return field_dict @classmethod - def from_dict(cls: Type[B], src_dict: Dict[str, Any]) -> B: + def from_dict(cls: Type[CE], src_dict: Dict[str, Any]) -> CE: d = src_dict.copy() from ..models.extended_user import ExtendedUser diff --git a/kittycad/models/extrude.py b/kittycad/models/extrude.py index 542835f76..a28a5b214 100644 --- a/kittycad/models/extrude.py +++ b/kittycad/models/extrude.py @@ -5,7 +5,7 @@ import attr from ..models.modeling_cmd_id import ModelingCmdId from ..types import UNSET, Unset -S = TypeVar("S", bound="Extrude") +MS = TypeVar("MS", bound="Extrude") @attr.s(auto_attribs=True) @@ -37,7 +37,7 @@ class Extrude: return field_dict @classmethod - def from_dict(cls: Type[S], src_dict: Dict[str, Any]) -> S: + def from_dict(cls: Type[MS], src_dict: Dict[str, Any]) -> MS: d = src_dict.copy() cap = d.pop("cap", UNSET) @@ -48,7 +48,7 @@ class Extrude: if isinstance(_target, Unset): target = UNSET else: - target = ModelingCmdId(_target) + target = _target # type: ignore[arg-type] extrude = cls( cap=cap, diff --git a/kittycad/models/file_center_of_mass.py b/kittycad/models/file_center_of_mass.py index 426eff0b3..7be4f8635 100644 --- a/kittycad/models/file_center_of_mass.py +++ b/kittycad/models/file_center_of_mass.py @@ -1,26 +1,30 @@ import datetime -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from typing import Any, Dict, List, Type, TypeVar, Union import attr from dateutil.parser import isoparse from ..models.api_call_status import ApiCallStatus from ..models.file_import_format import FileImportFormat +from ..models.point3d import Point3d +from ..models.unit_length import UnitLength from ..models.uuid import Uuid from ..types import UNSET, Unset -A = TypeVar("A", bound="FileCenterOfMass") +LT = TypeVar("LT", bound="FileCenterOfMass") @attr.s(auto_attribs=True) class FileCenterOfMass: """A file center of mass result.""" # noqa: E501 - center_of_mass: Union[Unset, List[float]] = UNSET + center_of_mass: Union[Unset, Point3d] = UNSET + centers_of_mass: Union[Unset, Any] = UNSET completed_at: Union[Unset, datetime.datetime] = UNSET created_at: Union[Unset, datetime.datetime] = UNSET error: Union[Unset, str] = UNSET id: Union[Unset, str] = UNSET + output_unit: Union[Unset, UnitLength] = UNSET src_format: Union[Unset, FileImportFormat] = UNSET started_at: Union[Unset, datetime.datetime] = UNSET status: Union[Unset, ApiCallStatus] = UNSET @@ -30,9 +34,9 @@ class FileCenterOfMass: additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: - center_of_mass: Union[Unset, List[float]] = UNSET if not isinstance(self.center_of_mass, Unset): center_of_mass = self.center_of_mass + centers_of_mass = self.centers_of_mass completed_at: Union[Unset, str] = UNSET if not isinstance(self.completed_at, Unset): completed_at = self.completed_at.isoformat() @@ -41,6 +45,8 @@ class FileCenterOfMass: created_at = self.created_at.isoformat() error = self.error id = self.id + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit if not isinstance(self.src_format, Unset): src_format = self.src_format started_at: Union[Unset, str] = UNSET @@ -58,6 +64,8 @@ class FileCenterOfMass: field_dict.update({}) if center_of_mass is not UNSET: field_dict["center_of_mass"] = center_of_mass + if centers_of_mass is not UNSET: + field_dict["centers_of_mass"] = centers_of_mass if completed_at is not UNSET: field_dict["completed_at"] = completed_at if created_at is not UNSET: @@ -66,6 +74,8 @@ class FileCenterOfMass: field_dict["error"] = error if id is not UNSET: field_dict["id"] = id + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit if src_format is not UNSET: field_dict["src_format"] = src_format if started_at is not UNSET: @@ -80,10 +90,16 @@ class FileCenterOfMass: return field_dict @classmethod - def from_dict(cls: Type[A], src_dict: Dict[str, Any]) -> A: + def from_dict(cls: Type[LT], src_dict: Dict[str, Any]) -> LT: d = src_dict.copy() - center_of_mass = cast(List[float], d.pop("center_of_mass", UNSET)) + _center_of_mass = d.pop("center_of_mass", UNSET) + center_of_mass: Union[Unset, Point3d] + if isinstance(_center_of_mass, Unset): + center_of_mass = UNSET + else: + center_of_mass = _center_of_mass # type: ignore[arg-type] + centers_of_mass = d.pop("centers_of_mass", UNSET) _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] if isinstance(_completed_at, Unset): @@ -105,7 +121,14 @@ class FileCenterOfMass: if isinstance(_id, Unset): id = UNSET else: - id = Uuid(_id) + id = _id # type: ignore[arg-type] + + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitLength] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] _src_format = d.pop("src_format", UNSET) src_format: Union[Unset, FileImportFormat] @@ -139,10 +162,12 @@ class FileCenterOfMass: file_center_of_mass = cls( center_of_mass=center_of_mass, + centers_of_mass=centers_of_mass, completed_at=completed_at, created_at=created_at, error=error, id=id, + output_unit=output_unit, src_format=src_format, started_at=started_at, status=status, diff --git a/kittycad/models/file_conversion.py b/kittycad/models/file_conversion.py index 534349d96..dd21fc339 100644 --- a/kittycad/models/file_conversion.py +++ b/kittycad/models/file_conversion.py @@ -12,7 +12,7 @@ from ..models.output_format import OutputFormat from ..models.uuid import Uuid from ..types import UNSET, Unset -H = TypeVar("H", bound="FileConversion") +ED = TypeVar("ED", bound="FileConversion") @attr.s(auto_attribs=True) @@ -100,7 +100,7 @@ class FileConversion: return field_dict @classmethod - def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H: + def from_dict(cls: Type[ED], src_dict: Dict[str, Any]) -> ED: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -123,7 +123,7 @@ class FileConversion: if isinstance(_id, Unset): id = UNSET else: - id = Uuid(_id) + id = _id # type: ignore[arg-type] output = d.pop("output", UNSET) @@ -139,7 +139,7 @@ class FileConversion: if isinstance(_output_format_options, Unset): output_format_options = UNSET else: - output_format_options = OutputFormat(_output_format_options) + output_format_options = _output_format_options # type: ignore[arg-type] outputs = d.pop("outputs", UNSET) _src_format = d.pop("src_format", UNSET) @@ -154,7 +154,7 @@ class FileConversion: if isinstance(_src_format_options, Unset): src_format_options = UNSET else: - src_format_options = InputFormat(_src_format_options) + src_format_options = _src_format_options # type: ignore[arg-type] _started_at = d.pop("started_at", UNSET) started_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/file_density.py b/kittycad/models/file_density.py index 12653a1b2..f716b86e7 100644 --- a/kittycad/models/file_density.py +++ b/kittycad/models/file_density.py @@ -6,10 +6,12 @@ from dateutil.parser import isoparse from ..models.api_call_status import ApiCallStatus from ..models.file_import_format import FileImportFormat +from ..models.unit_density import UnitDensity +from ..models.unit_mass import UnitMass from ..models.uuid import Uuid from ..types import UNSET, Unset -E = TypeVar("E", bound="FileDensity") +YY = TypeVar("YY", bound="FileDensity") @attr.s(auto_attribs=True) @@ -18,10 +20,13 @@ class FileDensity: completed_at: Union[Unset, datetime.datetime] = UNSET created_at: Union[Unset, datetime.datetime] = UNSET + densities: Union[Unset, Any] = UNSET density: Union[Unset, float] = UNSET error: Union[Unset, str] = UNSET id: Union[Unset, str] = UNSET material_mass: Union[Unset, float] = UNSET + material_mass_unit: Union[Unset, UnitMass] = UNSET + output_unit: Union[Unset, UnitDensity] = UNSET src_format: Union[Unset, FileImportFormat] = UNSET started_at: Union[Unset, datetime.datetime] = UNSET status: Union[Unset, ApiCallStatus] = UNSET @@ -37,10 +42,15 @@ class FileDensity: created_at: Union[Unset, str] = UNSET if not isinstance(self.created_at, Unset): created_at = self.created_at.isoformat() + densities = self.densities density = self.density error = self.error id = self.id material_mass = self.material_mass + if not isinstance(self.material_mass_unit, Unset): + material_mass_unit = self.material_mass_unit + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit if not isinstance(self.src_format, Unset): src_format = self.src_format started_at: Union[Unset, str] = UNSET @@ -60,6 +70,8 @@ class FileDensity: field_dict["completed_at"] = completed_at if created_at is not UNSET: field_dict["created_at"] = created_at + if densities is not UNSET: + field_dict["densities"] = densities if density is not UNSET: field_dict["density"] = density if error is not UNSET: @@ -68,6 +80,10 @@ class FileDensity: field_dict["id"] = id if material_mass is not UNSET: field_dict["material_mass"] = material_mass + if material_mass_unit is not UNSET: + field_dict["material_mass_unit"] = material_mass_unit + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit if src_format is not UNSET: field_dict["src_format"] = src_format if started_at is not UNSET: @@ -82,7 +98,7 @@ class FileDensity: return field_dict @classmethod - def from_dict(cls: Type[E], src_dict: Dict[str, Any]) -> E: + def from_dict(cls: Type[YY], src_dict: Dict[str, Any]) -> YY: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -98,6 +114,7 @@ class FileDensity: else: created_at = isoparse(_created_at) + densities = d.pop("densities", UNSET) density = d.pop("density", UNSET) error = d.pop("error", UNSET) @@ -107,10 +124,24 @@ class FileDensity: if isinstance(_id, Unset): id = UNSET else: - id = Uuid(_id) + id = _id # type: ignore[arg-type] material_mass = d.pop("material_mass", UNSET) + _material_mass_unit = d.pop("material_mass_unit", UNSET) + material_mass_unit: Union[Unset, UnitMass] + if isinstance(_material_mass_unit, Unset): + material_mass_unit = UNSET + else: + material_mass_unit = _material_mass_unit # type: ignore[arg-type] + + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitDensity] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] + _src_format = d.pop("src_format", UNSET) src_format: Union[Unset, FileImportFormat] if isinstance(_src_format, Unset): @@ -144,10 +175,13 @@ class FileDensity: file_density = cls( completed_at=completed_at, created_at=created_at, + densities=densities, density=density, error=error, id=id, material_mass=material_mass, + material_mass_unit=material_mass_unit, + output_unit=output_unit, src_format=src_format, started_at=started_at, status=status, diff --git a/kittycad/models/file_export_format.py b/kittycad/models/file_export_format.py index 2f7403bc5..52f344591 100644 --- a/kittycad/models/file_export_format.py +++ b/kittycad/models/file_export_format.py @@ -6,8 +6,6 @@ class FileExportFormat(str, Enum): """# The COLLADA/DAE file format. """ # noqa: E501 DAE = "dae" - """# The DXF file format. """ # noqa: E501 - DXF = "dxf" """# The FBX file format. """ # noqa: E501 FBX = "fbx" """# The FBX file format (in binary). """ # noqa: E501 diff --git a/kittycad/models/file_import_format.py b/kittycad/models/file_import_format.py index eec0da64b..62a5f1c18 100644 --- a/kittycad/models/file_import_format.py +++ b/kittycad/models/file_import_format.py @@ -6,8 +6,6 @@ class FileImportFormat(str, Enum): """# The COLLADA/DAE file format. """ # noqa: E501 DAE = "dae" - """# The DXF file format. """ # noqa: E501 - DXF = "dxf" """# The FBX file format. """ # noqa: E501 FBX = "fbx" """# glTF 2.0. """ # noqa: E501 diff --git a/kittycad/models/file_mass.py b/kittycad/models/file_mass.py index a38f321b3..65a460433 100644 --- a/kittycad/models/file_mass.py +++ b/kittycad/models/file_mass.py @@ -6,10 +6,12 @@ from dateutil.parser import isoparse from ..models.api_call_status import ApiCallStatus from ..models.file_import_format import FileImportFormat +from ..models.unit_density import UnitDensity +from ..models.unit_mass import UnitMass from ..models.uuid import Uuid from ..types import UNSET, Unset -G = TypeVar("G", bound="FileMass") +DO = TypeVar("DO", bound="FileMass") @attr.s(auto_attribs=True) @@ -21,7 +23,10 @@ class FileMass: error: Union[Unset, str] = UNSET id: Union[Unset, str] = UNSET mass: Union[Unset, float] = UNSET + masses: Union[Unset, Any] = UNSET material_density: Union[Unset, float] = UNSET + material_density_unit: Union[Unset, UnitDensity] = UNSET + output_unit: Union[Unset, UnitMass] = UNSET src_format: Union[Unset, FileImportFormat] = UNSET started_at: Union[Unset, datetime.datetime] = UNSET status: Union[Unset, ApiCallStatus] = UNSET @@ -40,7 +45,12 @@ class FileMass: error = self.error id = self.id mass = self.mass + masses = self.masses material_density = self.material_density + if not isinstance(self.material_density_unit, Unset): + material_density_unit = self.material_density_unit + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit if not isinstance(self.src_format, Unset): src_format = self.src_format started_at: Union[Unset, str] = UNSET @@ -66,8 +76,14 @@ class FileMass: field_dict["id"] = id if mass is not UNSET: field_dict["mass"] = mass + if masses is not UNSET: + field_dict["masses"] = masses if material_density is not UNSET: field_dict["material_density"] = material_density + if material_density_unit is not UNSET: + field_dict["material_density_unit"] = material_density_unit + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit if src_format is not UNSET: field_dict["src_format"] = src_format if started_at is not UNSET: @@ -82,7 +98,7 @@ class FileMass: return field_dict @classmethod - def from_dict(cls: Type[G], src_dict: Dict[str, Any]) -> G: + def from_dict(cls: Type[DO], src_dict: Dict[str, Any]) -> DO: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -105,12 +121,27 @@ class FileMass: if isinstance(_id, Unset): id = UNSET else: - id = Uuid(_id) + id = _id # type: ignore[arg-type] mass = d.pop("mass", UNSET) + masses = d.pop("masses", UNSET) material_density = d.pop("material_density", UNSET) + _material_density_unit = d.pop("material_density_unit", UNSET) + material_density_unit: Union[Unset, UnitDensity] + if isinstance(_material_density_unit, Unset): + material_density_unit = UNSET + else: + material_density_unit = _material_density_unit # type: ignore[arg-type] + + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitMass] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] + _src_format = d.pop("src_format", UNSET) src_format: Union[Unset, FileImportFormat] if isinstance(_src_format, Unset): @@ -147,7 +178,10 @@ class FileMass: error=error, id=id, mass=mass, + masses=masses, material_density=material_density, + material_density_unit=material_density_unit, + output_unit=output_unit, src_format=src_format, started_at=started_at, status=status, diff --git a/kittycad/models/file_surface_area.py b/kittycad/models/file_surface_area.py index 9c8c3c05e..c05b3c884 100644 --- a/kittycad/models/file_surface_area.py +++ b/kittycad/models/file_surface_area.py @@ -6,10 +6,11 @@ from dateutil.parser import isoparse from ..models.api_call_status import ApiCallStatus from ..models.file_import_format import FileImportFormat +from ..models.unit_area import UnitArea from ..models.uuid import Uuid from ..types import UNSET, Unset -J = TypeVar("J", bound="FileSurfaceArea") +FZ = TypeVar("FZ", bound="FileSurfaceArea") @attr.s(auto_attribs=True) @@ -20,10 +21,12 @@ class FileSurfaceArea: created_at: Union[Unset, datetime.datetime] = UNSET error: Union[Unset, str] = UNSET id: Union[Unset, str] = UNSET + output_unit: Union[Unset, UnitArea] = UNSET src_format: Union[Unset, FileImportFormat] = UNSET started_at: Union[Unset, datetime.datetime] = UNSET status: Union[Unset, ApiCallStatus] = UNSET surface_area: Union[Unset, float] = UNSET + surface_areas: Union[Unset, Any] = UNSET updated_at: Union[Unset, datetime.datetime] = UNSET user_id: Union[Unset, str] = UNSET @@ -38,6 +41,8 @@ class FileSurfaceArea: created_at = self.created_at.isoformat() error = self.error id = self.id + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit if not isinstance(self.src_format, Unset): src_format = self.src_format started_at: Union[Unset, str] = UNSET @@ -46,6 +51,7 @@ class FileSurfaceArea: if not isinstance(self.status, Unset): status = self.status surface_area = self.surface_area + surface_areas = self.surface_areas updated_at: Union[Unset, str] = UNSET if not isinstance(self.updated_at, Unset): updated_at = self.updated_at.isoformat() @@ -62,6 +68,8 @@ class FileSurfaceArea: field_dict["error"] = error if id is not UNSET: field_dict["id"] = id + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit if src_format is not UNSET: field_dict["src_format"] = src_format if started_at is not UNSET: @@ -70,6 +78,8 @@ class FileSurfaceArea: field_dict["status"] = status if surface_area is not UNSET: field_dict["surface_area"] = surface_area + if surface_areas is not UNSET: + field_dict["surface_areas"] = surface_areas if updated_at is not UNSET: field_dict["updated_at"] = updated_at if user_id is not UNSET: @@ -78,7 +88,7 @@ class FileSurfaceArea: return field_dict @classmethod - def from_dict(cls: Type[J], src_dict: Dict[str, Any]) -> J: + def from_dict(cls: Type[FZ], src_dict: Dict[str, Any]) -> FZ: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -101,7 +111,14 @@ class FileSurfaceArea: if isinstance(_id, Unset): id = UNSET else: - id = Uuid(_id) + id = _id # type: ignore[arg-type] + + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitArea] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] _src_format = d.pop("src_format", UNSET) src_format: Union[Unset, FileImportFormat] @@ -126,6 +143,7 @@ class FileSurfaceArea: surface_area = d.pop("surface_area", UNSET) + surface_areas = d.pop("surface_areas", UNSET) _updated_at = d.pop("updated_at", UNSET) updated_at: Union[Unset, datetime.datetime] if isinstance(_updated_at, Unset): @@ -140,10 +158,12 @@ class FileSurfaceArea: created_at=created_at, error=error, id=id, + output_unit=output_unit, src_format=src_format, started_at=started_at, status=status, surface_area=surface_area, + surface_areas=surface_areas, updated_at=updated_at, user_id=user_id, ) diff --git a/kittycad/models/file_system_metadata.py b/kittycad/models/file_system_metadata.py index 303c659ba..6a10b858f 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 -R = TypeVar("R", bound="FileSystemMetadata") +GL = TypeVar("GL", bound="FileSystemMetadata") @attr.s(auto_attribs=True) @@ -29,7 +29,7 @@ class FileSystemMetadata: return field_dict @classmethod - def from_dict(cls: Type[R], src_dict: Dict[str, Any]) -> R: + def from_dict(cls: Type[GL], src_dict: Dict[str, Any]) -> GL: d = src_dict.copy() ok = d.pop("ok", UNSET) diff --git a/kittycad/models/file_volume.py b/kittycad/models/file_volume.py index cb7f4da09..20172ddac 100644 --- a/kittycad/models/file_volume.py +++ b/kittycad/models/file_volume.py @@ -6,10 +6,11 @@ from dateutil.parser import isoparse from ..models.api_call_status import ApiCallStatus from ..models.file_import_format import FileImportFormat +from ..models.unit_volume import UnitVolume from ..models.uuid import Uuid from ..types import UNSET, Unset -L = TypeVar("L", bound="FileVolume") +NN = TypeVar("NN", bound="FileVolume") @attr.s(auto_attribs=True) @@ -20,12 +21,14 @@ class FileVolume: created_at: Union[Unset, datetime.datetime] = UNSET error: Union[Unset, str] = UNSET id: Union[Unset, str] = UNSET + output_unit: Union[Unset, UnitVolume] = UNSET src_format: Union[Unset, FileImportFormat] = UNSET started_at: Union[Unset, datetime.datetime] = UNSET status: Union[Unset, ApiCallStatus] = UNSET updated_at: Union[Unset, datetime.datetime] = UNSET user_id: Union[Unset, str] = UNSET volume: Union[Unset, float] = UNSET + volumes: Union[Unset, Any] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -38,6 +41,8 @@ class FileVolume: created_at = self.created_at.isoformat() error = self.error id = self.id + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit if not isinstance(self.src_format, Unset): src_format = self.src_format started_at: Union[Unset, str] = UNSET @@ -50,6 +55,7 @@ class FileVolume: updated_at = self.updated_at.isoformat() user_id = self.user_id volume = self.volume + volumes = self.volumes field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -62,6 +68,8 @@ class FileVolume: field_dict["error"] = error if id is not UNSET: field_dict["id"] = id + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit if src_format is not UNSET: field_dict["src_format"] = src_format if started_at is not UNSET: @@ -74,11 +82,13 @@ class FileVolume: field_dict["user_id"] = user_id if volume is not UNSET: field_dict["volume"] = volume + if volumes is not UNSET: + field_dict["volumes"] = volumes return field_dict @classmethod - def from_dict(cls: Type[L], src_dict: Dict[str, Any]) -> L: + def from_dict(cls: Type[NN], src_dict: Dict[str, Any]) -> NN: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -101,7 +111,14 @@ class FileVolume: if isinstance(_id, Unset): id = UNSET else: - id = Uuid(_id) + id = _id # type: ignore[arg-type] + + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitVolume] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] _src_format = d.pop("src_format", UNSET) src_format: Union[Unset, FileImportFormat] @@ -135,17 +152,21 @@ class FileVolume: volume = d.pop("volume", UNSET) + volumes = d.pop("volumes", UNSET) + file_volume = cls( completed_at=completed_at, created_at=created_at, error=error, id=id, + output_unit=output_unit, src_format=src_format, started_at=started_at, status=status, updated_at=updated_at, user_id=user_id, volume=volume, + volumes=volumes, ) file_volume.additional_properties = d diff --git a/kittycad/models/gateway.py b/kittycad/models/gateway.py index dd27dc6ac..e46520541 100644 --- a/kittycad/models/gateway.py +++ b/kittycad/models/gateway.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -Y = TypeVar("Y", bound="Gateway") +OH = TypeVar("OH", bound="Gateway") @attr.s(auto_attribs=True) @@ -43,7 +43,7 @@ class Gateway: return field_dict @classmethod - def from_dict(cls: Type[Y], src_dict: Dict[str, Any]) -> Y: + def from_dict(cls: Type[OH], src_dict: Dict[str, Any]) -> OH: d = src_dict.copy() auth_timeout = d.pop("auth_timeout", UNSET) diff --git a/kittycad/models/index_info.py b/kittycad/models/index_info.py index 7262aff8f..454eeaef3 100644 --- a/kittycad/models/index_info.py +++ b/kittycad/models/index_info.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -H = TypeVar("H", bound="IndexInfo") +VI = TypeVar("VI", bound="IndexInfo") @attr.s(auto_attribs=True) @@ -41,7 +41,7 @@ class IndexInfo: return field_dict @classmethod - def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H: + def from_dict(cls: Type[VI], src_dict: Dict[str, Any]) -> VI: d = src_dict.copy() mirrors = cast(List[str], d.pop("mirrors", UNSET)) diff --git a/kittycad/models/input_format.py b/kittycad/models/input_format.py index 3659d5add..00f356dcc 100644 --- a/kittycad/models/input_format.py +++ b/kittycad/models/input_format.py @@ -3,9 +3,10 @@ from typing import Any, Dict, List, Type, TypeVar, Union import attr from ..models.system import System +from ..models.unit_length import UnitLength from ..types import UNSET, Unset -K = TypeVar("K", bound="Gltf") +ET = TypeVar("ET", bound="Gltf") @attr.s(auto_attribs=True) @@ -28,7 +29,7 @@ class Gltf: return field_dict @classmethod - def from_dict(cls: Type[K], src_dict: Dict[str, Any]) -> K: + def from_dict(cls: Type[ET], src_dict: Dict[str, Any]) -> ET: d = src_dict.copy() type = d.pop("type", UNSET) @@ -56,7 +57,7 @@ class Gltf: return key in self.additional_properties -V = TypeVar("V", bound="Step") +QF = TypeVar("QF", bound="Step") @attr.s(auto_attribs=True) @@ -84,14 +85,14 @@ class Step: return field_dict @classmethod - def from_dict(cls: Type[V], src_dict: Dict[str, Any]) -> V: + def from_dict(cls: Type[QF], src_dict: Dict[str, Any]) -> QF: d = src_dict.copy() _coords = d.pop("coords", UNSET) coords: Union[Unset, System] if isinstance(_coords, Unset): coords = UNSET else: - coords = System(_coords) + coords = _coords # type: ignore[arg-type] type = d.pop("type", UNSET) @@ -120,7 +121,7 @@ class Step: return key in self.additional_properties -R = TypeVar("R", bound="Obj") +DI = TypeVar("DI", bound="Obj") @attr.s(auto_attribs=True) @@ -129,6 +130,7 @@ class Obj: coords: Union[Unset, System] = UNSET type: Union[Unset, str] = UNSET + units: Union[Unset, UnitLength] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -136,6 +138,8 @@ class Obj: if not isinstance(self.coords, Unset): coords = self.coords type = self.type + if not isinstance(self.units, Unset): + units = self.units field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -144,24 +148,34 @@ class Obj: field_dict["coords"] = coords if type is not UNSET: field_dict["type"] = type + if units is not UNSET: + field_dict["units"] = units return field_dict @classmethod - def from_dict(cls: Type[R], src_dict: Dict[str, Any]) -> R: + def from_dict(cls: Type[DI], src_dict: Dict[str, Any]) -> DI: d = src_dict.copy() _coords = d.pop("coords", UNSET) coords: Union[Unset, System] if isinstance(_coords, Unset): coords = UNSET else: - coords = System(_coords) + coords = _coords # type: ignore[arg-type] type = d.pop("type", UNSET) + _units = d.pop("units", UNSET) + units: Union[Unset, UnitLength] + if isinstance(_units, Unset): + units = UNSET + else: + units = _units # type: ignore[arg-type] + obj = cls( coords=coords, type=type, + units=units, ) obj.additional_properties = d @@ -184,15 +198,16 @@ class Obj: return key in self.additional_properties -N = TypeVar("N", bound="Stl") +OJ = TypeVar("OJ", bound="Ply") @attr.s(auto_attribs=True) -class Stl: - """*ST**ereo**L**ithography format.""" # noqa: E501 +class Ply: + """The PLY Polygon File Format.""" # noqa: E501 coords: Union[Unset, System] = UNSET type: Union[Unset, str] = UNSET + units: Union[Unset, UnitLength] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -200,6 +215,8 @@ class Stl: if not isinstance(self.coords, Unset): coords = self.coords type = self.type + if not isinstance(self.units, Unset): + units = self.units field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -208,24 +225,111 @@ class Stl: field_dict["coords"] = coords if type is not UNSET: field_dict["type"] = type + if units is not UNSET: + field_dict["units"] = units return field_dict @classmethod - def from_dict(cls: Type[N], src_dict: Dict[str, Any]) -> N: + def from_dict(cls: Type[OJ], src_dict: Dict[str, Any]) -> OJ: d = src_dict.copy() _coords = d.pop("coords", UNSET) coords: Union[Unset, System] if isinstance(_coords, Unset): coords = UNSET else: - coords = System(_coords) + coords = _coords # type: ignore[arg-type] type = d.pop("type", UNSET) + _units = d.pop("units", UNSET) + units: Union[Unset, UnitLength] + if isinstance(_units, Unset): + units = UNSET + else: + units = _units # type: ignore[arg-type] + + ply = cls( + coords=coords, + type=type, + units=units, + ) + + ply.additional_properties = d + return ply + + @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 + + +UF = TypeVar("UF", bound="Stl") + + +@attr.s(auto_attribs=True) +class Stl: + """*ST**ereo**L**ithography format.""" # noqa: E501 + + coords: Union[Unset, System] = UNSET + type: Union[Unset, str] = UNSET + units: Union[Unset, UnitLength] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.coords, Unset): + coords = self.coords + type = self.type + if not isinstance(self.units, Unset): + units = self.units + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if coords is not UNSET: + field_dict["coords"] = coords + if type is not UNSET: + field_dict["type"] = type + if units is not UNSET: + field_dict["units"] = units + + return field_dict + + @classmethod + def from_dict(cls: Type[UF], src_dict: Dict[str, Any]) -> UF: + d = src_dict.copy() + _coords = d.pop("coords", UNSET) + coords: Union[Unset, System] + if isinstance(_coords, Unset): + coords = UNSET + else: + coords = _coords # type: ignore[arg-type] + + type = d.pop("type", UNSET) + + _units = d.pop("units", UNSET) + units: Union[Unset, UnitLength] + if isinstance(_units, Unset): + units = UNSET + else: + units = _units # type: ignore[arg-type] + stl = cls( coords=coords, type=type, + units=units, ) stl.additional_properties = d @@ -248,4 +352,4 @@ class Stl: return key in self.additional_properties -InputFormat = Union[Gltf, Step, Obj, Stl] +InputFormat = Union[Gltf, Step, Obj, Ply, Stl] diff --git a/kittycad/models/invoice.py b/kittycad/models/invoice.py index 90e4b5503..a211485bc 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 -P = TypeVar("P", bound="Invoice") +YF = TypeVar("YF", bound="Invoice") @attr.s(auto_attribs=True) @@ -143,7 +143,7 @@ class Invoice: return field_dict @classmethod - def from_dict(cls: Type[P], src_dict: Dict[str, Any]) -> P: + def from_dict(cls: Type[YF], src_dict: Dict[str, Any]) -> YF: 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 2acc1c4cc..b03b01c71 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 -C = TypeVar("C", bound="InvoiceLineItem") +PY = TypeVar("PY", bound="InvoiceLineItem") @attr.s(auto_attribs=True) @@ -49,7 +49,7 @@ class InvoiceLineItem: return field_dict @classmethod - def from_dict(cls: Type[C], src_dict: Dict[str, Any]) -> C: + def from_dict(cls: Type[PY], src_dict: Dict[str, Any]) -> PY: d = src_dict.copy() amount = d.pop("amount", UNSET) diff --git a/kittycad/models/jetstream.py b/kittycad/models/jetstream.py index 553db0e40..324a769d1 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 -U = TypeVar("U", bound="Jetstream") +LK = TypeVar("LK", bound="Jetstream") @attr.s(auto_attribs=True) @@ -41,28 +41,28 @@ class Jetstream: return field_dict @classmethod - def from_dict(cls: Type[U], src_dict: Dict[str, Any]) -> U: + def from_dict(cls: Type[LK], src_dict: Dict[str, Any]) -> LK: d = src_dict.copy() _config = d.pop("config", UNSET) config: Union[Unset, JetstreamConfig] if isinstance(_config, Unset): config = UNSET else: - config = JetstreamConfig(_config) + config = _config # type: ignore[arg-type] _meta = d.pop("meta", UNSET) meta: Union[Unset, MetaClusterInfo] if isinstance(_meta, Unset): meta = UNSET else: - meta = MetaClusterInfo(_meta) + meta = _meta # type: ignore[arg-type] _stats = d.pop("stats", UNSET) stats: Union[Unset, JetstreamStats] if isinstance(_stats, Unset): stats = UNSET else: - stats = JetstreamStats(_stats) + stats = _stats # type: ignore[arg-type] jetstream = cls( config=config, diff --git a/kittycad/models/jetstream_api_stats.py b/kittycad/models/jetstream_api_stats.py index 0f0683add..309b8d141 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 -S = TypeVar("S", bound="JetstreamApiStats") +AR = TypeVar("AR", bound="JetstreamApiStats") @attr.s(auto_attribs=True) @@ -35,7 +35,7 @@ class JetstreamApiStats: return field_dict @classmethod - def from_dict(cls: Type[S], src_dict: Dict[str, Any]) -> S: + def from_dict(cls: Type[AR], src_dict: Dict[str, Any]) -> AR: d = src_dict.copy() errors = d.pop("errors", UNSET) diff --git a/kittycad/models/jetstream_config.py b/kittycad/models/jetstream_config.py index 02e78f722..d1013943f 100644 --- a/kittycad/models/jetstream_config.py +++ b/kittycad/models/jetstream_config.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -K = TypeVar("K", bound="JetstreamConfig") +WB = TypeVar("WB", bound="JetstreamConfig") @attr.s(auto_attribs=True) @@ -39,7 +39,7 @@ class JetstreamConfig: return field_dict @classmethod - def from_dict(cls: Type[K], src_dict: Dict[str, Any]) -> K: + def from_dict(cls: Type[WB], src_dict: Dict[str, Any]) -> WB: d = src_dict.copy() domain = d.pop("domain", UNSET) diff --git a/kittycad/models/jetstream_stats.py b/kittycad/models/jetstream_stats.py index 62314d1ee..02dc8a82a 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 -Q = TypeVar("Q", bound="JetstreamStats") +KK = TypeVar("KK", bound="JetstreamStats") @attr.s(auto_attribs=True) @@ -53,7 +53,7 @@ class JetstreamStats: return field_dict @classmethod - def from_dict(cls: Type[Q], src_dict: Dict[str, Any]) -> Q: + def from_dict(cls: Type[KK], src_dict: Dict[str, Any]) -> KK: d = src_dict.copy() accounts = d.pop("accounts", UNSET) @@ -62,7 +62,7 @@ class JetstreamStats: if isinstance(_api, Unset): api = UNSET else: - api = JetstreamApiStats(_api) + api = _api # type: ignore[arg-type] ha_assets = d.pop("ha_assets", UNSET) diff --git a/kittycad/models/leaf_node.py b/kittycad/models/leaf_node.py index 37acd9bee..066d96e57 100644 --- a/kittycad/models/leaf_node.py +++ b/kittycad/models/leaf_node.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -F = TypeVar("F", bound="LeafNode") +HC = TypeVar("HC", bound="LeafNode") @attr.s(auto_attribs=True) @@ -39,7 +39,7 @@ class LeafNode: return field_dict @classmethod - def from_dict(cls: Type[F], src_dict: Dict[str, Any]) -> F: + def from_dict(cls: Type[HC], src_dict: Dict[str, Any]) -> HC: d = src_dict.copy() auth_timeout = d.pop("auth_timeout", UNSET) diff --git a/kittycad/models/mesh.py b/kittycad/models/mesh.py index fcf07dfb2..3d46fe2c1 100644 --- a/kittycad/models/mesh.py +++ b/kittycad/models/mesh.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -H = TypeVar("H", bound="Mesh") +FM = TypeVar("FM", bound="Mesh") @attr.s(auto_attribs=True) @@ -25,7 +25,7 @@ class Mesh: return field_dict @classmethod - def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H: + def from_dict(cls: Type[FM], src_dict: Dict[str, Any]) -> FM: 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 0630f5c4b..e7df62850 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 -N = TypeVar("N", bound="MetaClusterInfo") +PV = TypeVar("PV", bound="MetaClusterInfo") @attr.s(auto_attribs=True) @@ -35,7 +35,7 @@ class MetaClusterInfo: return field_dict @classmethod - def from_dict(cls: Type[N], src_dict: Dict[str, Any]) -> N: + def from_dict(cls: Type[PV], src_dict: Dict[str, Any]) -> PV: d = src_dict.copy() cluster_size = d.pop("cluster_size", UNSET) diff --git a/kittycad/models/metadata.py b/kittycad/models/metadata.py index 036509fd9..84c3152db 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 -H = TypeVar("H", bound="Metadata") +QI = TypeVar("QI", bound="Metadata") @attr.s(auto_attribs=True) @@ -71,21 +71,21 @@ class Metadata: return field_dict @classmethod - def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H: + def from_dict(cls: Type[QI], src_dict: Dict[str, Any]) -> QI: d = src_dict.copy() _cache = d.pop("cache", UNSET) cache: Union[Unset, CacheMetadata] if isinstance(_cache, Unset): cache = UNSET else: - cache = CacheMetadata(_cache) + cache = _cache # type: ignore[arg-type] _engine = d.pop("engine", UNSET) engine: Union[Unset, EngineMetadata] if isinstance(_engine, Unset): engine = UNSET else: - engine = EngineMetadata(_engine) + engine = _engine # type: ignore[arg-type] _environment = d.pop("environment", UNSET) environment: Union[Unset, Environment] @@ -99,14 +99,14 @@ class Metadata: if isinstance(_executor, Unset): executor = UNSET else: - executor = ExecutorMetadata(_executor) + executor = _executor # type: ignore[arg-type] _fs = d.pop("fs", UNSET) fs: Union[Unset, FileSystemMetadata] if isinstance(_fs, Unset): fs = UNSET else: - fs = FileSystemMetadata(_fs) + fs = _fs # type: ignore[arg-type] git_hash = d.pop("git_hash", UNSET) @@ -115,14 +115,14 @@ class Metadata: if isinstance(_point_e, Unset): point_e = UNSET else: - point_e = PointEMetadata(_point_e) + point_e = _point_e # type: ignore[arg-type] _pubsub = d.pop("pubsub", UNSET) pubsub: Union[Unset, Connection] if isinstance(_pubsub, Unset): pubsub = UNSET else: - pubsub = Connection(_pubsub) + pubsub = _pubsub # type: ignore[arg-type] metadata = cls( cache=cache, diff --git a/kittycad/models/method.py b/kittycad/models/method.py index a2071e36c..02c0b186a 100644 --- a/kittycad/models/method.py +++ b/kittycad/models/method.py @@ -6,7 +6,8 @@ class Method(str, Enum): This type also contains constants for a number of common HTTP methods such as GET, POST, etc. - Currently includes 8 variants representing the 8 methods defined in [RFC 7230](https://tools.ietf.org/html/rfc7231#section-4.1), plus PATCH, and an Extension variant for all extensions.""" # noqa: E501 + Currently includes 8 variants representing the 8 methods defined in [RFC 7230](https://tools.ietf.org/html/rfc7231#section-4.1), plus PATCH, and an Extension variant for all extensions. + """ # noqa: E501 """# The `OPTIONS` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.2.1). """ # noqa: E501 OPTIONS = "OPTIONS" diff --git a/kittycad/models/modeling_cmd.py b/kittycad/models/modeling_cmd.py index cbab83364..e8fdf5eca 100644 --- a/kittycad/models/modeling_cmd.py +++ b/kittycad/models/modeling_cmd.py @@ -5,6 +5,7 @@ import attr from ..models.camera_drag_interaction_type import CameraDragInteractionType from ..models.modeling_cmd_id import ModelingCmdId +from ..models.output_format import OutputFormat from ..models.path_segment import PathSegment from ..models.point2d import Point2d from ..models.point3d import Point3d @@ -21,7 +22,7 @@ class StartPath(str, Enum): return str(self.value) -B = TypeVar("B", bound="MovePathPen") +TP = TypeVar("TP", bound="MovePathPen") @attr.s(auto_attribs=True) @@ -48,21 +49,21 @@ class MovePathPen: return field_dict @classmethod - def from_dict(cls: Type[B], src_dict: Dict[str, Any]) -> B: + def from_dict(cls: Type[TP], src_dict: Dict[str, Any]) -> TP: d = src_dict.copy() _path = d.pop("path", UNSET) path: Union[Unset, ModelingCmdId] if isinstance(_path, Unset): path = UNSET else: - path = ModelingCmdId(_path) + path = _path # type: ignore[arg-type] _to = d.pop("to", UNSET) to: Union[Unset, Point3d] if isinstance(_to, Unset): to = UNSET else: - to = Point3d(_to) + to = _to # type: ignore[arg-type] move_path_pen = cls( path=path, @@ -89,7 +90,7 @@ class MovePathPen: return key in self.additional_properties -B = TypeVar("B", bound="ExtendPath") +CF = TypeVar("CF", bound="ExtendPath") @attr.s(auto_attribs=True) @@ -116,14 +117,14 @@ class ExtendPath: return field_dict @classmethod - def from_dict(cls: Type[B], src_dict: Dict[str, Any]) -> B: + def from_dict(cls: Type[CF], src_dict: Dict[str, Any]) -> CF: d = src_dict.copy() _path = d.pop("path", UNSET) path: Union[Unset, ModelingCmdId] if isinstance(_path, Unset): path = UNSET else: - path = ModelingCmdId(_path) + path = _path # type: ignore[arg-type] _segment = d.pop("segment", UNSET) segment: Union[Unset, PathSegment] @@ -157,7 +158,7 @@ class ExtendPath: return key in self.additional_properties -P = TypeVar("P", bound="ClosePath") +OM = TypeVar("OM", bound="ClosePath") @attr.s(auto_attribs=True) @@ -178,7 +179,7 @@ class ClosePath: return field_dict @classmethod - def from_dict(cls: Type[P], src_dict: Dict[str, Any]) -> P: + def from_dict(cls: Type[OM], src_dict: Dict[str, Any]) -> OM: d = src_dict.copy() path_id = d.pop("path_id", UNSET) @@ -206,7 +207,7 @@ class ClosePath: return key in self.additional_properties -J = TypeVar("J", bound="CameraDragStart") +EN = TypeVar("EN", bound="CameraDragStart") @attr.s(auto_attribs=True) @@ -233,7 +234,7 @@ class CameraDragStart: return field_dict @classmethod - def from_dict(cls: Type[J], src_dict: Dict[str, Any]) -> J: + def from_dict(cls: Type[EN], src_dict: Dict[str, Any]) -> EN: d = src_dict.copy() _interaction = d.pop("interaction", UNSET) interaction: Union[Unset, CameraDragInteractionType] @@ -247,7 +248,7 @@ class CameraDragStart: if isinstance(_window, Unset): window = UNSET else: - window = Point2d(_window) + window = _window # type: ignore[arg-type] camera_drag_start = cls( interaction=interaction, @@ -274,7 +275,7 @@ class CameraDragStart: return key in self.additional_properties -T = TypeVar("T", bound="CameraDragMove") +RS = TypeVar("RS", bound="CameraDragMove") @attr.s(auto_attribs=True) @@ -305,7 +306,7 @@ class CameraDragMove: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: Type[RS], src_dict: Dict[str, Any]) -> RS: d = src_dict.copy() _interaction = d.pop("interaction", UNSET) interaction: Union[Unset, CameraDragInteractionType] @@ -321,7 +322,7 @@ class CameraDragMove: if isinstance(_window, Unset): window = UNSET else: - window = Point2d(_window) + window = _window # type: ignore[arg-type] camera_drag_move = cls( interaction=interaction, @@ -349,7 +350,7 @@ class CameraDragMove: return key in self.additional_properties -V = TypeVar("V", bound="CameraDragEnd") +LR = TypeVar("LR", bound="CameraDragEnd") @attr.s(auto_attribs=True) @@ -376,7 +377,7 @@ class CameraDragEnd: return field_dict @classmethod - def from_dict(cls: Type[V], src_dict: Dict[str, Any]) -> V: + def from_dict(cls: Type[LR], src_dict: Dict[str, Any]) -> LR: d = src_dict.copy() _interaction = d.pop("interaction", UNSET) interaction: Union[Unset, CameraDragInteractionType] @@ -390,7 +391,7 @@ class CameraDragEnd: if isinstance(_window, Unset): window = UNSET else: - window = Point2d(_window) + window = _window # type: ignore[arg-type] camera_drag_end = cls( interaction=interaction, @@ -417,6 +418,246 @@ class CameraDragEnd: return key in self.additional_properties +MP = TypeVar("MP", bound="DefaultCameraLookAt") + + +@attr.s(auto_attribs=True) +class DefaultCameraLookAt: + center: Union[Unset, Point3d] = UNSET + up: Union[Unset, Point3d] = UNSET + vantage: 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.center, Unset): + center = self.center + if not isinstance(self.up, Unset): + up = self.up + if not isinstance(self.vantage, Unset): + vantage = self.vantage + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if center is not UNSET: + field_dict["center"] = center + if up is not UNSET: + field_dict["up"] = up + if vantage is not UNSET: + field_dict["vantage"] = vantage + + return field_dict + + @classmethod + def from_dict(cls: Type[MP], src_dict: Dict[str, Any]) -> MP: + d = src_dict.copy() + _center = d.pop("center", UNSET) + center: Union[Unset, Point3d] + if isinstance(_center, Unset): + center = UNSET + else: + center = _center # type: ignore[arg-type] + + _up = d.pop("up", UNSET) + up: Union[Unset, Point3d] + if isinstance(_up, Unset): + up = UNSET + else: + up = _up # type: ignore[arg-type] + + _vantage = d.pop("vantage", UNSET) + vantage: Union[Unset, Point3d] + if isinstance(_vantage, Unset): + vantage = UNSET + else: + vantage = _vantage # type: ignore[arg-type] + + default_camera_look_at = cls( + center=center, + up=up, + vantage=vantage, + ) + + default_camera_look_at.additional_properties = d + return default_camera_look_at + + @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 + + +WF = TypeVar("WF", bound="DefaultCameraEnableSketchMode") + + +@attr.s(auto_attribs=True) +class DefaultCameraEnableSketchMode: + distance_to_plane: Union[Unset, float] = UNSET + origin: Union[Unset, Point3d] = UNSET + ortho: Union[Unset, bool] = False + x_axis: Union[Unset, Point3d] = UNSET + y_axis: Union[Unset, Point3d] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + distance_to_plane = self.distance_to_plane + if not isinstance(self.origin, Unset): + origin = self.origin + ortho = self.ortho + if not isinstance(self.x_axis, Unset): + x_axis = self.x_axis + if not isinstance(self.y_axis, Unset): + y_axis = self.y_axis + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if distance_to_plane is not UNSET: + field_dict["distance_to_plane"] = distance_to_plane + if origin is not UNSET: + field_dict["origin"] = origin + if ortho is not UNSET: + field_dict["ortho"] = ortho + if x_axis is not UNSET: + field_dict["x_axis"] = x_axis + if y_axis is not UNSET: + field_dict["y_axis"] = y_axis + + return field_dict + + @classmethod + def from_dict(cls: Type[WF], src_dict: Dict[str, Any]) -> WF: + d = src_dict.copy() + distance_to_plane = d.pop("distance_to_plane", UNSET) + + _origin = d.pop("origin", UNSET) + origin: Union[Unset, Point3d] + if isinstance(_origin, Unset): + origin = UNSET + else: + origin = _origin # type: ignore[arg-type] + + ortho = d.pop("ortho", UNSET) + + _x_axis = d.pop("x_axis", UNSET) + x_axis: Union[Unset, Point3d] + if isinstance(_x_axis, Unset): + x_axis = UNSET + else: + x_axis = _x_axis # type: ignore[arg-type] + + _y_axis = d.pop("y_axis", UNSET) + y_axis: Union[Unset, Point3d] + if isinstance(_y_axis, Unset): + y_axis = UNSET + else: + y_axis = _y_axis # type: ignore[arg-type] + + default_camera_enable_sketch_mode = cls( + distance_to_plane=distance_to_plane, + origin=origin, + ortho=ortho, + x_axis=x_axis, + y_axis=y_axis, + ) + + default_camera_enable_sketch_mode.additional_properties = d + return default_camera_enable_sketch_mode + + @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 + + +class DefaultCameraDisableSketchMode(str, Enum): + """Disable sketch mode, from the default camera.""" # noqa: E501 + + DEFAULT_CAMERA_DISABLE_SKETCH_MODE = "DefaultCameraDisableSketchMode" + + def __str__(self) -> str: + return str(self.value) + + +RO = TypeVar("RO", bound="Export") + + +@attr.s(auto_attribs=True) +class Export: + format: Union[Unset, OutputFormat] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.format, Unset): + format = self.format + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if format is not UNSET: + field_dict["format"] = format + + return field_dict + + @classmethod + def from_dict(cls: Type[RO], src_dict: Dict[str, Any]) -> RO: + d = src_dict.copy() + _format = d.pop("format", UNSET) + format: Union[Unset, OutputFormat] + if isinstance(_format, Unset): + format = UNSET + else: + format = _format # type: ignore[arg-type] + + export = cls( + format=format, + ) + + export.additional_properties = d + return export + + @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[ StartPath, MovePathPen, @@ -426,4 +667,8 @@ ModelingCmd = Union[ CameraDragStart, CameraDragMove, CameraDragEnd, + DefaultCameraLookAt, + DefaultCameraEnableSketchMode, + DefaultCameraDisableSketchMode, + Export, ] diff --git a/kittycad/models/modeling_cmd_req.py b/kittycad/models/modeling_cmd_req.py index ef1f7b73e..8e5199324 100644 --- a/kittycad/models/modeling_cmd_req.py +++ b/kittycad/models/modeling_cmd_req.py @@ -6,7 +6,7 @@ from ..models.modeling_cmd import ModelingCmd from ..models.modeling_cmd_id import ModelingCmdId from ..types import UNSET, Unset -C = TypeVar("C", bound="ModelingCmdReq") +DN = TypeVar("DN", bound="ModelingCmdReq") @attr.s(auto_attribs=True) @@ -39,7 +39,7 @@ class ModelingCmdReq: return field_dict @classmethod - def from_dict(cls: Type[C], src_dict: Dict[str, Any]) -> C: + def from_dict(cls: Type[DN], src_dict: Dict[str, Any]) -> DN: d = src_dict.copy() _cmd = d.pop("cmd", UNSET) cmd: Union[Unset, ModelingCmd] @@ -53,7 +53,7 @@ class ModelingCmdReq: if isinstance(_cmd_id, Unset): cmd_id = UNSET else: - cmd_id = ModelingCmdId(_cmd_id) + cmd_id = _cmd_id # type: ignore[arg-type] file_id = d.pop("file_id", UNSET) diff --git a/kittycad/models/modeling_cmd_req_batch.py b/kittycad/models/modeling_cmd_req_batch.py index d8bb5e379..166454149 100644 --- a/kittycad/models/modeling_cmd_req_batch.py +++ b/kittycad/models/modeling_cmd_req_batch.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -R = TypeVar("R", bound="ModelingCmdReqBatch") +BA = TypeVar("BA", bound="ModelingCmdReqBatch") @attr.s(auto_attribs=True) @@ -31,7 +31,7 @@ class ModelingCmdReqBatch: return field_dict @classmethod - def from_dict(cls: Type[R], src_dict: Dict[str, Any]) -> R: + def from_dict(cls: Type[BA], src_dict: Dict[str, Any]) -> BA: d = src_dict.copy() cmds = d.pop("cmds", UNSET) file_id = d.pop("file_id", UNSET) diff --git a/kittycad/models/modeling_error.py b/kittycad/models/modeling_error.py index ecea1a59b..b1c52dbf8 100644 --- a/kittycad/models/modeling_error.py +++ b/kittycad/models/modeling_error.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -C = TypeVar("C", bound="ModelingError") +OR = TypeVar("OR", bound="ModelingError") @attr.s(auto_attribs=True) @@ -39,7 +39,7 @@ class ModelingError: return field_dict @classmethod - def from_dict(cls: Type[C], src_dict: Dict[str, Any]) -> C: + def from_dict(cls: Type[OR], src_dict: Dict[str, Any]) -> OR: d = src_dict.copy() error_code = d.pop("error_code", UNSET) diff --git a/kittycad/models/modeling_outcome.py b/kittycad/models/modeling_outcome.py index 6aa10d789..413f0b814 100644 --- a/kittycad/models/modeling_outcome.py +++ b/kittycad/models/modeling_outcome.py @@ -12,7 +12,7 @@ Success = Any Error = ModelingError -E = TypeVar("E", bound="Cancelled") +CB = TypeVar("CB", bound="Cancelled") @attr.s(auto_attribs=True) @@ -34,14 +34,14 @@ class Cancelled: return field_dict @classmethod - def from_dict(cls: Type[E], src_dict: Dict[str, Any]) -> E: + def from_dict(cls: Type[CB], src_dict: Dict[str, Any]) -> CB: d = src_dict.copy() _what_failed = d.pop("what_failed", UNSET) what_failed: Union[Unset, ModelingCmdId] if isinstance(_what_failed, Unset): what_failed = UNSET else: - what_failed = ModelingCmdId(_what_failed) + what_failed = _what_failed # type: ignore[arg-type] cancelled = cls( what_failed=what_failed, diff --git a/kittycad/models/modeling_outcomes.py b/kittycad/models/modeling_outcomes.py index 012eb9a01..62f871232 100644 --- a/kittycad/models/modeling_outcomes.py +++ b/kittycad/models/modeling_outcomes.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -M = TypeVar("M", bound="ModelingOutcomes") +LC = TypeVar("LC", bound="ModelingOutcomes") @attr.s(auto_attribs=True) @@ -27,7 +27,7 @@ class ModelingOutcomes: return field_dict @classmethod - def from_dict(cls: Type[M], src_dict: Dict[str, Any]) -> M: + def from_dict(cls: Type[LC], src_dict: Dict[str, Any]) -> LC: d = src_dict.copy() outcomes = d.pop("outcomes", UNSET) diff --git a/kittycad/models/new_address.py b/kittycad/models/new_address.py index fdafeec82..8a2e124ad 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 -S = TypeVar("S", bound="NewAddress") +TO = TypeVar("TO", bound="NewAddress") @attr.s(auto_attribs=True) @@ -53,7 +53,7 @@ class NewAddress: return field_dict @classmethod - def from_dict(cls: Type[S], src_dict: Dict[str, Any]) -> S: + def from_dict(cls: Type[TO], src_dict: Dict[str, Any]) -> TO: d = src_dict.copy() city = d.pop("city", UNSET) diff --git a/kittycad/models/o_auth2_client_info.py b/kittycad/models/o_auth2_client_info.py index 75e50aa21..096dcfb25 100644 --- a/kittycad/models/o_auth2_client_info.py +++ b/kittycad/models/o_auth2_client_info.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -L = TypeVar("L", bound="OAuth2ClientInfo") +ZP = TypeVar("ZP", bound="OAuth2ClientInfo") @attr.s(auto_attribs=True) @@ -35,7 +35,7 @@ class OAuth2ClientInfo: return field_dict @classmethod - def from_dict(cls: Type[L], src_dict: Dict[str, Any]) -> L: + def from_dict(cls: Type[ZP], src_dict: Dict[str, Any]) -> ZP: d = src_dict.copy() csrf_token = d.pop("csrf_token", UNSET) diff --git a/kittycad/models/onboarding.py b/kittycad/models/onboarding.py index 01245762c..156823467 100644 --- a/kittycad/models/onboarding.py +++ b/kittycad/models/onboarding.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -T = TypeVar("T", bound="Onboarding") +EO = TypeVar("EO", bound="Onboarding") @attr.s(auto_attribs=True) @@ -37,7 +37,7 @@ class Onboarding: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: Type[EO], src_dict: Dict[str, Any]) -> EO: d = src_dict.copy() first_call_from__their_machine_date = d.pop( "first_call_from_their_machine_date", UNSET diff --git a/kittycad/models/output_file.py b/kittycad/models/output_file.py index 2820a5efe..337f8470a 100644 --- a/kittycad/models/output_file.py +++ b/kittycad/models/output_file.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -E = TypeVar("E", bound="OutputFile") +NY = TypeVar("NY", bound="OutputFile") @attr.s(auto_attribs=True) @@ -31,7 +31,7 @@ class OutputFile: return field_dict @classmethod - def from_dict(cls: Type[E], src_dict: Dict[str, Any]) -> E: + def from_dict(cls: Type[NY], src_dict: Dict[str, Any]) -> NY: d = src_dict.copy() contents = d.pop("contents", UNSET) diff --git a/kittycad/models/output_format.py b/kittycad/models/output_format.py index 1d15feede..c57665ab1 100644 --- a/kittycad/models/output_format.py +++ b/kittycad/models/output_format.py @@ -6,7 +6,7 @@ from ..models.storage import Storage from ..models.system import System from ..types import UNSET, Unset -D = TypeVar("D", bound="Gltf") +QO = TypeVar("QO", bound="Gltf") @attr.s(auto_attribs=True) @@ -34,7 +34,7 @@ class Gltf: return field_dict @classmethod - def from_dict(cls: Type[D], src_dict: Dict[str, Any]) -> D: + def from_dict(cls: Type[QO], src_dict: Dict[str, Any]) -> QO: d = src_dict.copy() _storage = d.pop("storage", UNSET) storage: Union[Unset, Storage] @@ -70,7 +70,7 @@ class Gltf: return key in self.additional_properties -Y = TypeVar("Y", bound="Obj") +KX = TypeVar("KX", bound="Obj") @attr.s(auto_attribs=True) @@ -98,14 +98,14 @@ class Obj: return field_dict @classmethod - def from_dict(cls: Type[Y], src_dict: Dict[str, Any]) -> Y: + def from_dict(cls: Type[KX], src_dict: Dict[str, Any]) -> KX: d = src_dict.copy() _coords = d.pop("coords", UNSET) coords: Union[Unset, System] if isinstance(_coords, Unset): coords = UNSET else: - coords = System(_coords) + coords = _coords # type: ignore[arg-type] type = d.pop("type", UNSET) @@ -134,7 +134,84 @@ class Obj: return key in self.additional_properties -Y = TypeVar("Y", bound="Step") +IZ = TypeVar("IZ", bound="Ply") + + +@attr.s(auto_attribs=True) +class Ply: + """The PLY Polygon File Format.""" # noqa: E501 + + coords: Union[Unset, System] = UNSET + storage: Union[Unset, Storage] = UNSET + type: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.coords, Unset): + coords = self.coords + if not isinstance(self.storage, Unset): + storage = self.storage + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if coords is not UNSET: + field_dict["coords"] = coords + if storage is not UNSET: + field_dict["storage"] = storage + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[IZ], src_dict: Dict[str, Any]) -> IZ: + d = src_dict.copy() + _coords = d.pop("coords", UNSET) + coords: Union[Unset, System] + if isinstance(_coords, Unset): + coords = UNSET + else: + coords = _coords # type: ignore[arg-type] + + _storage = d.pop("storage", UNSET) + storage: Union[Unset, Storage] + if isinstance(_storage, Unset): + storage = UNSET + else: + storage = _storage # type: ignore[arg-type] + + type = d.pop("type", UNSET) + + ply = cls( + coords=coords, + storage=storage, + type=type, + ) + + ply.additional_properties = d + return ply + + @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 + + +WO = TypeVar("WO", bound="Step") @attr.s(auto_attribs=True) @@ -162,14 +239,14 @@ class Step: return field_dict @classmethod - def from_dict(cls: Type[Y], src_dict: Dict[str, Any]) -> Y: + def from_dict(cls: Type[WO], src_dict: Dict[str, Any]) -> WO: d = src_dict.copy() _coords = d.pop("coords", UNSET) coords: Union[Unset, System] if isinstance(_coords, Unset): coords = UNSET else: - coords = System(_coords) + coords = _coords # type: ignore[arg-type] type = d.pop("type", UNSET) @@ -198,7 +275,7 @@ class Step: return key in self.additional_properties -D = TypeVar("D", bound="Stl") +NK = TypeVar("NK", bound="Stl") @attr.s(auto_attribs=True) @@ -231,14 +308,14 @@ class Stl: return field_dict @classmethod - def from_dict(cls: Type[D], src_dict: Dict[str, Any]) -> D: + def from_dict(cls: Type[NK], src_dict: Dict[str, Any]) -> NK: d = src_dict.copy() _coords = d.pop("coords", UNSET) coords: Union[Unset, System] if isinstance(_coords, Unset): coords = UNSET else: - coords = System(_coords) + coords = _coords # type: ignore[arg-type] _storage = d.pop("storage", UNSET) storage: Union[Unset, Storage] @@ -275,4 +352,4 @@ class Stl: return key in self.additional_properties -OutputFormat = Union[Gltf, Obj, Step, Stl] +OutputFormat = Union[Gltf, Obj, Ply, Step, Stl] diff --git a/kittycad/models/path_segment.py b/kittycad/models/path_segment.py index d0dfaef31..e2e4107f7 100644 --- a/kittycad/models/path_segment.py +++ b/kittycad/models/path_segment.py @@ -6,7 +6,7 @@ from ..models.point2d import Point2d from ..models.point3d import Point3d from ..types import UNSET, Unset -F = TypeVar("F", bound="Line") +UQ = TypeVar("UQ", bound="Line") @attr.s(auto_attribs=True) @@ -28,14 +28,14 @@ class Line: return field_dict @classmethod - def from_dict(cls: Type[F], src_dict: Dict[str, Any]) -> F: + def from_dict(cls: Type[UQ], src_dict: Dict[str, Any]) -> UQ: d = src_dict.copy() _end = d.pop("end", UNSET) end: Union[Unset, Point3d] if isinstance(_end, Unset): end = UNSET else: - end = Point3d(_end) + end = _end # type: ignore[arg-type] line = cls( end=end, @@ -61,7 +61,7 @@ class Line: return key in self.additional_properties -Z = TypeVar("Z", bound="Arc") +QE = TypeVar("QE", bound="Arc") @attr.s(auto_attribs=True) @@ -95,7 +95,7 @@ class Arc: return field_dict @classmethod - def from_dict(cls: Type[Z], src_dict: Dict[str, Any]) -> Z: + def from_dict(cls: Type[QE], src_dict: Dict[str, Any]) -> QE: d = src_dict.copy() angle_end = d.pop("angle_end", UNSET) @@ -106,7 +106,7 @@ class Arc: if isinstance(_center, Unset): center = UNSET else: - center = Point2d(_center) + center = _center # type: ignore[arg-type] radius = d.pop("radius", UNSET) @@ -137,7 +137,7 @@ class Arc: return key in self.additional_properties -G = TypeVar("G", bound="Bezier") +XH = TypeVar("XH", bound="Bezier") @attr.s(auto_attribs=True) @@ -169,28 +169,28 @@ class Bezier: return field_dict @classmethod - def from_dict(cls: Type[G], src_dict: Dict[str, Any]) -> G: + def from_dict(cls: Type[XH], src_dict: Dict[str, Any]) -> XH: d = src_dict.copy() _control1 = d.pop("control1", UNSET) control1: Union[Unset, Point3d] if isinstance(_control1, Unset): control1 = UNSET else: - control1 = Point3d(_control1) + control1 = _control1 # type: ignore[arg-type] _control2 = d.pop("control2", UNSET) control2: Union[Unset, Point3d] if isinstance(_control2, Unset): control2 = UNSET else: - control2 = Point3d(_control2) + control2 = _control2 # type: ignore[arg-type] _end = d.pop("end", UNSET) end: Union[Unset, Point3d] if isinstance(_end, Unset): end = UNSET else: - end = Point3d(_end) + end = _end # type: ignore[arg-type] bezier = cls( control1=control1, diff --git a/kittycad/models/payment_intent.py b/kittycad/models/payment_intent.py index ba8eff6d1..cc377e055 100644 --- a/kittycad/models/payment_intent.py +++ b/kittycad/models/payment_intent.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -L = TypeVar("L", bound="PaymentIntent") +KT = TypeVar("KT", bound="PaymentIntent") @attr.s(auto_attribs=True) @@ -27,7 +27,7 @@ class PaymentIntent: return field_dict @classmethod - def from_dict(cls: Type[L], src_dict: Dict[str, Any]) -> L: + def from_dict(cls: Type[KT], src_dict: Dict[str, Any]) -> KT: 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 ada0eb463..d284870a9 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 -N = TypeVar("N", bound="PaymentMethod") +BV = TypeVar("BV", bound="PaymentMethod") @attr.s(auto_attribs=True) @@ -57,21 +57,21 @@ class PaymentMethod: return field_dict @classmethod - def from_dict(cls: Type[N], src_dict: Dict[str, Any]) -> N: + def from_dict(cls: Type[BV], src_dict: Dict[str, Any]) -> BV: d = src_dict.copy() _billing_info = d.pop("billing_info", UNSET) billing_info: Union[Unset, BillingInfo] if isinstance(_billing_info, Unset): billing_info = UNSET else: - billing_info = BillingInfo(_billing_info) + billing_info = _billing_info # type: ignore[arg-type] _card = d.pop("card", UNSET) card: Union[Unset, CardDetails] if isinstance(_card, Unset): card = UNSET else: - card = CardDetails(_card) + card = _card # type: ignore[arg-type] _created_at = d.pop("created_at", UNSET) created_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/payment_method_card_checks.py b/kittycad/models/payment_method_card_checks.py index 40ab5b641..386f6e4f1 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 -N = TypeVar("N", bound="PaymentMethodCardChecks") +GU = TypeVar("GU", bound="PaymentMethodCardChecks") @attr.s(auto_attribs=True) @@ -35,7 +35,7 @@ class PaymentMethodCardChecks: return field_dict @classmethod - def from_dict(cls: Type[N], src_dict: Dict[str, Any]) -> N: + def from_dict(cls: Type[GU], src_dict: Dict[str, Any]) -> GU: 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 a60dd38f9..8fd133bd8 100644 --- a/kittycad/models/physics_constant.py +++ b/kittycad/models/physics_constant.py @@ -9,7 +9,7 @@ from ..models.physics_constant_name import PhysicsConstantName from ..models.uuid import Uuid from ..types import UNSET, Unset -H = TypeVar("H", bound="PhysicsConstant") +SS = TypeVar("SS", bound="PhysicsConstant") @attr.s(auto_attribs=True) @@ -78,7 +78,7 @@ class PhysicsConstant: return field_dict @classmethod - def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H: + def from_dict(cls: Type[SS], src_dict: Dict[str, Any]) -> SS: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -108,7 +108,7 @@ class PhysicsConstant: if isinstance(_id, Unset): id = UNSET else: - id = Uuid(_id) + id = _id # type: ignore[arg-type] _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 76b359c97..a6422f16e 100644 --- a/kittycad/models/plugins_info.py +++ b/kittycad/models/plugins_info.py @@ -4,14 +4,15 @@ import attr from ..types import UNSET, Unset -V = TypeVar("V", bound="PluginsInfo") +UP = TypeVar("UP", bound="PluginsInfo") @attr.s(auto_attribs=True) class PluginsInfo: """Available plugins per type. - **Note**: Only unmanaged (V1) plugins are included in this list. V1 plugins are \"lazily\" loaded, and are not returned in this list if there is no resource using the plugin.""" # noqa: E501 + **Note**: Only unmanaged (V1) plugins are included in this list. V1 plugins are \"lazily\" loaded, and are not returned in this list if there is no resource using the plugin. + """ # noqa: E501 authorization: Union[Unset, List[str]] = UNSET log: Union[Unset, List[str]] = UNSET @@ -49,7 +50,7 @@ class PluginsInfo: return field_dict @classmethod - def from_dict(cls: Type[V], src_dict: Dict[str, Any]) -> V: + def from_dict(cls: Type[UP], src_dict: Dict[str, Any]) -> UP: d = src_dict.copy() authorization = cast(List[str], d.pop("authorization", UNSET)) diff --git a/kittycad/models/point2d.py b/kittycad/models/point2d.py index c31b5b7c8..6270342c7 100644 --- a/kittycad/models/point2d.py +++ b/kittycad/models/point2d.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -E = TypeVar("E", bound="Point2d") +AZ = TypeVar("AZ", bound="Point2d") @attr.s(auto_attribs=True) @@ -31,7 +31,7 @@ class Point2d: return field_dict @classmethod - def from_dict(cls: Type[E], src_dict: Dict[str, Any]) -> E: + def from_dict(cls: Type[AZ], src_dict: Dict[str, Any]) -> AZ: d = src_dict.copy() x = d.pop("x", UNSET) diff --git a/kittycad/models/point3d.py b/kittycad/models/point3d.py index bb15fca2a..8a4b0739d 100644 --- a/kittycad/models/point3d.py +++ b/kittycad/models/point3d.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -T = TypeVar("T", bound="Point3d") +DJ = TypeVar("DJ", bound="Point3d") @attr.s(auto_attribs=True) @@ -35,7 +35,7 @@ class Point3d: return field_dict @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + def from_dict(cls: Type[DJ], src_dict: Dict[str, Any]) -> DJ: d = src_dict.copy() x = d.pop("x", UNSET) diff --git a/kittycad/models/point_e_metadata.py b/kittycad/models/point_e_metadata.py index 423dfa2d9..586ba3c4f 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 -Q = TypeVar("Q", bound="PointEMetadata") +WJ = TypeVar("WJ", bound="PointEMetadata") @attr.s(auto_attribs=True) @@ -29,7 +29,7 @@ class PointEMetadata: return field_dict @classmethod - def from_dict(cls: Type[Q], src_dict: Dict[str, Any]) -> Q: + def from_dict(cls: Type[WJ], src_dict: Dict[str, Any]) -> WJ: d = src_dict.copy() ok = d.pop("ok", UNSET) diff --git a/kittycad/models/pong.py b/kittycad/models/pong.py index 89a7fe685..f637ea746 100644 --- a/kittycad/models/pong.py +++ b/kittycad/models/pong.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -F = TypeVar("F", bound="Pong") +TR = TypeVar("TR", bound="Pong") @attr.s(auto_attribs=True) @@ -27,7 +27,7 @@ class Pong: return field_dict @classmethod - def from_dict(cls: Type[F], src_dict: Dict[str, Any]) -> F: + def from_dict(cls: Type[TR], src_dict: Dict[str, Any]) -> TR: 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 9fd3b01dc..768c74121 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 -D = TypeVar("D", bound="RegistryServiceConfig") +YD = TypeVar("YD", bound="RegistryServiceConfig") @attr.s(auto_attribs=True) @@ -59,7 +59,7 @@ class RegistryServiceConfig: return field_dict @classmethod - def from_dict(cls: Type[D], src_dict: Dict[str, Any]) -> D: + def from_dict(cls: Type[YD], src_dict: Dict[str, Any]) -> YD: 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 3f62bd9f3..fd18432e3 100644 --- a/kittycad/models/runtime.py +++ b/kittycad/models/runtime.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -J = TypeVar("J", bound="Runtime") +JF = TypeVar("JF", bound="Runtime") @attr.s(auto_attribs=True) @@ -33,7 +33,7 @@ class Runtime: return field_dict @classmethod - def from_dict(cls: Type[J], src_dict: Dict[str, Any]) -> J: + def from_dict(cls: Type[JF], src_dict: Dict[str, Any]) -> JF: d = src_dict.copy() path = d.pop("path", UNSET) diff --git a/kittycad/models/session.py b/kittycad/models/session.py index 87a7c6f01..79b10ca34 100644 --- a/kittycad/models/session.py +++ b/kittycad/models/session.py @@ -7,7 +7,7 @@ from dateutil.parser import isoparse from ..models.uuid import Uuid from ..types import UNSET, Unset -F = TypeVar("F", bound="Session") +VP = TypeVar("VP", bound="Session") @attr.s(auto_attribs=True) @@ -58,7 +58,7 @@ class Session: return field_dict @classmethod - def from_dict(cls: Type[F], src_dict: Dict[str, Any]) -> F: + def from_dict(cls: Type[VP], src_dict: Dict[str, Any]) -> VP: d = src_dict.copy() _created_at = d.pop("created_at", UNSET) created_at: Union[Unset, datetime.datetime] @@ -81,7 +81,7 @@ class Session: if isinstance(_session_token, Unset): session_token = UNSET else: - session_token = Uuid(_session_token) + session_token = _session_token # type: ignore[arg-type] _updated_at = d.pop("updated_at", UNSET) updated_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/system.py b/kittycad/models/system.py index ff4be24e2..0edf3021c 100644 --- a/kittycad/models/system.py +++ b/kittycad/models/system.py @@ -5,7 +5,7 @@ import attr from ..models.axis_direction_pair import AxisDirectionPair from ..types import UNSET, Unset -V = TypeVar("V", bound="System") +EL = TypeVar("EL", bound="System") @attr.s(auto_attribs=True) @@ -16,7 +16,8 @@ class System: See [cglearn.eu] for background reading. - [cglearn.eu](https://cglearn.eu/pub/computer-graphics/introduction-to-geometry#material-coordinate-systems-1)""" # noqa: E501 + [cglearn.eu](https://cglearn.eu/pub/computer-graphics/introduction-to-geometry#material-coordinate-systems-1) + """ # noqa: E501 forward: Union[Unset, AxisDirectionPair] = UNSET up: Union[Unset, AxisDirectionPair] = UNSET @@ -40,21 +41,21 @@ class System: return field_dict @classmethod - def from_dict(cls: Type[V], src_dict: Dict[str, Any]) -> V: + def from_dict(cls: Type[EL], src_dict: Dict[str, Any]) -> EL: d = src_dict.copy() _forward = d.pop("forward", UNSET) forward: Union[Unset, AxisDirectionPair] if isinstance(_forward, Unset): forward = UNSET else: - forward = AxisDirectionPair(_forward) + forward = _forward # type: ignore[arg-type] _up = d.pop("up", UNSET) up: Union[Unset, AxisDirectionPair] if isinstance(_up, Unset): up = UNSET else: - up = AxisDirectionPair(_up) + up = _up # type: ignore[arg-type] system = cls( forward=forward, diff --git a/kittycad/models/system_info_default_address_pools.py b/kittycad/models/system_info_default_address_pools.py index 91502b62a..3c2c523c1 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 -U = TypeVar("U", bound="SystemInfoDefaultAddressPools") +ZG = TypeVar("ZG", bound="SystemInfoDefaultAddressPools") @attr.s(auto_attribs=True) @@ -29,7 +29,7 @@ class SystemInfoDefaultAddressPools: return field_dict @classmethod - def from_dict(cls: Type[U], src_dict: Dict[str, Any]) -> U: + def from_dict(cls: Type[ZG], src_dict: Dict[str, Any]) -> ZG: d = src_dict.copy() base = d.pop("base", UNSET) diff --git a/kittycad/models/unit_angle_conversion.py b/kittycad/models/unit_angle_conversion.py index e1288e4a7..04cc8062b 100644 --- a/kittycad/models/unit_angle_conversion.py +++ b/kittycad/models/unit_angle_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_angle import UnitAngle from ..models.uuid import Uuid from ..types import UNSET, Unset -F = TypeVar("F", bound="UnitAngleConversion") +LF = TypeVar("LF", bound="UnitAngleConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitAngleConversion: return field_dict @classmethod - def from_dict(cls: Type[F], src_dict: Dict[str, Any]) -> F: + def from_dict(cls: Type[LF], src_dict: Dict[str, Any]) -> LF: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -110,7 +110,7 @@ class UnitAngleConversion: if isinstance(_id, Unset): id = UNSET else: - id = Uuid(_id) + id = _id # type: ignore[arg-type] input = d.pop("input", UNSET) diff --git a/kittycad/models/unit_area.py b/kittycad/models/unit_area.py index 775d950ff..09f8a4037 100644 --- a/kittycad/models/unit_area.py +++ b/kittycad/models/unit_area.py @@ -4,34 +4,22 @@ from enum import Enum class UnitArea(str, Enum): """The valid types of area units.""" # noqa: E501 - """# Acres """ # noqa: E501 - ACRES = "acres" - """# Hectares """ # noqa: E501 - HECTARES = "hectares" """# Square centimetres """ # noqa: E501 - SQUARE_CENTIMETRES = "square_centimetres" + CM2 = "cm2" """# Square decimetres """ # noqa: E501 - SQUARE_DECIMETRES = "square_decimetres" + DM2 = "dm2" """# Square feet """ # noqa: E501 - SQUARE_FEET = "square_feet" - """# Square hectometres """ # noqa: E501 - SQUARE_HECTOMETRES = "square_hectometres" + FT2 = "ft2" """# Square inches """ # noqa: E501 - SQUARE_INCHES = "square_inches" + IN2 = "in2" """# Square kilometres """ # noqa: E501 - SQUARE_KILOMETRES = "square_kilometres" + KM2 = "km2" """# Square metres """ # noqa: E501 - SQUARE_METRES = "square_metres" - """# Square micrometres """ # noqa: E501 - SQUARE_MICROMETRES = "square_micrometres" - """# Square miles """ # noqa: E501 - SQUARE_MILES = "square_miles" + M2 = "m2" """# Square millimetres """ # noqa: E501 - SQUARE_MILLIMETRES = "square_millimetres" - """# Square nanometres """ # noqa: E501 - SQUARE_NANOMETRES = "square_nanometres" + MM2 = "mm2" """# Square yards """ # noqa: E501 - SQUARE_YARDS = "square_yards" + YD2 = "yd2" def __str__(self) -> str: return str(self.value) diff --git a/kittycad/models/unit_area_conversion.py b/kittycad/models/unit_area_conversion.py index 6e72df321..74ecda812 100644 --- a/kittycad/models/unit_area_conversion.py +++ b/kittycad/models/unit_area_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_area import UnitArea from ..models.uuid import Uuid from ..types import UNSET, Unset -Y = TypeVar("Y", bound="UnitAreaConversion") +CS = TypeVar("CS", bound="UnitAreaConversion") @attr.s(auto_attribs=True) @@ -87,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[CS], src_dict: Dict[str, Any]) -> CS: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -110,7 +110,7 @@ class UnitAreaConversion: if isinstance(_id, Unset): id = UNSET else: - id = Uuid(_id) + id = _id # type: ignore[arg-type] input = d.pop("input", UNSET) diff --git a/kittycad/models/unit_current_conversion.py b/kittycad/models/unit_current_conversion.py index 8371d59db..890e9ffb7 100644 --- a/kittycad/models/unit_current_conversion.py +++ b/kittycad/models/unit_current_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_current import UnitCurrent from ..models.uuid import Uuid from ..types import UNSET, Unset -F = TypeVar("F", bound="UnitCurrentConversion") +GN = TypeVar("GN", bound="UnitCurrentConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitCurrentConversion: return field_dict @classmethod - def from_dict(cls: Type[F], src_dict: Dict[str, Any]) -> F: + def from_dict(cls: Type[GN], src_dict: Dict[str, Any]) -> GN: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -110,7 +110,7 @@ class UnitCurrentConversion: if isinstance(_id, Unset): id = UNSET else: - id = Uuid(_id) + id = _id # type: ignore[arg-type] input = d.pop("input", UNSET) diff --git a/kittycad/models/unit_density.py b/kittycad/models/unit_density.py new file mode 100644 index 000000000..53534b784 --- /dev/null +++ b/kittycad/models/unit_density.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class UnitDensity(str, Enum): + """The valid types for density units.""" # noqa: E501 + + """# Pounds per cubic feet. """ # noqa: E501 + LB_FT3 = "lb:ft3" + """# Kilograms per cubic meter. """ # noqa: E501 + KG_M3 = "kg:m3" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/unit_energy_conversion.py b/kittycad/models/unit_energy_conversion.py index 34d039d70..b387b0813 100644 --- a/kittycad/models/unit_energy_conversion.py +++ b/kittycad/models/unit_energy_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_energy import UnitEnergy from ..models.uuid import Uuid from ..types import UNSET, Unset -P = TypeVar("P", bound="UnitEnergyConversion") +GD = TypeVar("GD", bound="UnitEnergyConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitEnergyConversion: return field_dict @classmethod - def from_dict(cls: Type[P], src_dict: Dict[str, Any]) -> P: + def from_dict(cls: Type[GD], src_dict: Dict[str, Any]) -> GD: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -110,7 +110,7 @@ class UnitEnergyConversion: if isinstance(_id, Unset): id = UNSET else: - id = Uuid(_id) + id = _id # type: ignore[arg-type] input = d.pop("input", UNSET) diff --git a/kittycad/models/unit_force_conversion.py b/kittycad/models/unit_force_conversion.py index 507e422ed..012144cce 100644 --- a/kittycad/models/unit_force_conversion.py +++ b/kittycad/models/unit_force_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_force import UnitForce from ..models.uuid import Uuid from ..types import UNSET, Unset -Y = TypeVar("Y", bound="UnitForceConversion") +VJ = TypeVar("VJ", bound="UnitForceConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitForceConversion: return field_dict @classmethod - def from_dict(cls: Type[Y], src_dict: Dict[str, Any]) -> Y: + def from_dict(cls: Type[VJ], src_dict: Dict[str, Any]) -> VJ: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -110,7 +110,7 @@ class UnitForceConversion: if isinstance(_id, Unset): id = UNSET else: - id = Uuid(_id) + id = _id # type: ignore[arg-type] input = d.pop("input", UNSET) diff --git a/kittycad/models/unit_frequency_conversion.py b/kittycad/models/unit_frequency_conversion.py index ec3d0b684..052f05190 100644 --- a/kittycad/models/unit_frequency_conversion.py +++ b/kittycad/models/unit_frequency_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_frequency import UnitFrequency from ..models.uuid import Uuid from ..types import UNSET, Unset -L = TypeVar("L", bound="UnitFrequencyConversion") +OX = TypeVar("OX", bound="UnitFrequencyConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitFrequencyConversion: return field_dict @classmethod - def from_dict(cls: Type[L], src_dict: Dict[str, Any]) -> L: + def from_dict(cls: Type[OX], src_dict: Dict[str, Any]) -> OX: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -110,7 +110,7 @@ class UnitFrequencyConversion: if isinstance(_id, Unset): id = UNSET else: - id = Uuid(_id) + id = _id # type: ignore[arg-type] input = d.pop("input", UNSET) diff --git a/kittycad/models/unit_length.py b/kittycad/models/unit_length.py index cdf1a1792..8a64e8c93 100644 --- a/kittycad/models/unit_length.py +++ b/kittycad/models/unit_length.py @@ -5,31 +5,17 @@ class UnitLength(str, Enum): """The valid types of length units.""" # noqa: E501 """# Centimetres """ # noqa: E501 - CENTIMETRES = "centimetres" - """# Decimetres """ # noqa: E501 - DECIMETRES = "decimetres" + CM = "cm" """# Feet """ # noqa: E501 - FEET = "feet" - """# Furlongs """ # noqa: E501 - FURLONGS = "furlongs" - """# Hectometres """ # noqa: E501 - HECTOMETRES = "hectometres" + FT = "ft" """# Inches """ # noqa: E501 - INCHES = "inches" - """# Kilometres """ # noqa: E501 - KILOMETRES = "kilometres" + IN = "in" """# Metres """ # noqa: E501 - METRES = "metres" - """# Micrometres """ # noqa: E501 - MICROMETRES = "micrometres" - """# Miles """ # noqa: E501 - MILES = "miles" + M = "m" """# Millimetres """ # noqa: E501 - MILLIMETRES = "millimetres" - """# Nanometres """ # noqa: E501 - NANOMETRES = "nanometres" + MM = "mm" """# Yards """ # noqa: E501 - YARDS = "yards" + YD = "yd" def __str__(self) -> str: return str(self.value) diff --git a/kittycad/models/unit_length_conversion.py b/kittycad/models/unit_length_conversion.py index d091bc7ac..17aea1408 100644 --- a/kittycad/models/unit_length_conversion.py +++ b/kittycad/models/unit_length_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_length import UnitLength from ..models.uuid import Uuid from ..types import UNSET, Unset -K = TypeVar("K", bound="UnitLengthConversion") +YW = TypeVar("YW", bound="UnitLengthConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitLengthConversion: return field_dict @classmethod - def from_dict(cls: Type[K], src_dict: Dict[str, Any]) -> K: + def from_dict(cls: Type[YW], src_dict: Dict[str, Any]) -> YW: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -110,7 +110,7 @@ class UnitLengthConversion: if isinstance(_id, Unset): id = UNSET else: - id = Uuid(_id) + id = _id # type: ignore[arg-type] input = d.pop("input", UNSET) diff --git a/kittycad/models/unit_mass.py b/kittycad/models/unit_mass.py index 819b3b8ef..62b9804de 100644 --- a/kittycad/models/unit_mass.py +++ b/kittycad/models/unit_mass.py @@ -4,36 +4,12 @@ from enum import Enum class UnitMass(str, Enum): """The valid types of mass units.""" # noqa: E501 - """# Carats """ # noqa: E501 - CARATS = "carats" - """# Grains """ # noqa: E501 - GRAINS = "grains" """# Grams """ # noqa: E501 - GRAMS = "grams" + G = "g" """# Kilograms """ # noqa: E501 - KILOGRAMS = "kilograms" - """# Long tons """ # noqa: E501 - LONG_TONS = "long_tons" - """# Metric tons """ # noqa: E501 - METRIC_TONS = "metric_tons" - """# Micrograms """ # noqa: E501 - MICROGRAMS = "micrograms" - """# Milligrams """ # noqa: E501 - MILLIGRAMS = "milligrams" - """# Ounces """ # noqa: E501 - OUNCES = "ounces" - """# Pennyweights """ # noqa: E501 - PENNYWEIGHTS = "pennyweights" + KG = "kg" """# Pounds """ # noqa: E501 - POUNDS = "pounds" - """# Short tons """ # noqa: E501 - SHORT_TONS = "short_tons" - """# Stones """ # noqa: E501 - STONES = "stones" - """# Troy ounces """ # noqa: E501 - TROY_OUNCES = "troy_ounces" - """# Troy pounds """ # noqa: E501 - TROY_POUNDS = "troy_pounds" + LB = "lb" def __str__(self) -> str: return str(self.value) diff --git a/kittycad/models/unit_mass_conversion.py b/kittycad/models/unit_mass_conversion.py index f8645651e..bbb2b02ce 100644 --- a/kittycad/models/unit_mass_conversion.py +++ b/kittycad/models/unit_mass_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_mass import UnitMass from ..models.uuid import Uuid from ..types import UNSET, Unset -N = TypeVar("N", bound="UnitMassConversion") +QX = TypeVar("QX", bound="UnitMassConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitMassConversion: return field_dict @classmethod - def from_dict(cls: Type[N], src_dict: Dict[str, Any]) -> N: + def from_dict(cls: Type[QX], src_dict: Dict[str, Any]) -> QX: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -110,7 +110,7 @@ class UnitMassConversion: if isinstance(_id, Unset): id = UNSET else: - id = Uuid(_id) + id = _id # type: ignore[arg-type] input = d.pop("input", UNSET) diff --git a/kittycad/models/unit_power_conversion.py b/kittycad/models/unit_power_conversion.py index 0b666341d..74c9da84c 100644 --- a/kittycad/models/unit_power_conversion.py +++ b/kittycad/models/unit_power_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_power import UnitPower from ..models.uuid import Uuid from ..types import UNSET, Unset -H = TypeVar("H", bound="UnitPowerConversion") +NO = TypeVar("NO", bound="UnitPowerConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitPowerConversion: return field_dict @classmethod - def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H: + def from_dict(cls: Type[NO], src_dict: Dict[str, Any]) -> NO: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -110,7 +110,7 @@ class UnitPowerConversion: if isinstance(_id, Unset): id = UNSET else: - id = Uuid(_id) + id = _id # type: ignore[arg-type] input = d.pop("input", UNSET) diff --git a/kittycad/models/unit_pressure_conversion.py b/kittycad/models/unit_pressure_conversion.py index 8d424356c..9b9d6ce39 100644 --- a/kittycad/models/unit_pressure_conversion.py +++ b/kittycad/models/unit_pressure_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_pressure import UnitPressure from ..models.uuid import Uuid from ..types import UNSET, Unset -A = TypeVar("A", bound="UnitPressureConversion") +VX = TypeVar("VX", bound="UnitPressureConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitPressureConversion: return field_dict @classmethod - def from_dict(cls: Type[A], src_dict: Dict[str, Any]) -> A: + def from_dict(cls: Type[VX], src_dict: Dict[str, Any]) -> VX: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -110,7 +110,7 @@ class UnitPressureConversion: if isinstance(_id, Unset): id = UNSET else: - id = Uuid(_id) + id = _id # type: ignore[arg-type] input = d.pop("input", UNSET) diff --git a/kittycad/models/unit_temperature_conversion.py b/kittycad/models/unit_temperature_conversion.py index 230ceb862..f90d94394 100644 --- a/kittycad/models/unit_temperature_conversion.py +++ b/kittycad/models/unit_temperature_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_temperature import UnitTemperature from ..models.uuid import Uuid from ..types import UNSET, Unset -R = TypeVar("R", bound="UnitTemperatureConversion") +RG = TypeVar("RG", bound="UnitTemperatureConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitTemperatureConversion: return field_dict @classmethod - def from_dict(cls: Type[R], src_dict: Dict[str, Any]) -> R: + def from_dict(cls: Type[RG], src_dict: Dict[str, Any]) -> RG: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -110,7 +110,7 @@ class UnitTemperatureConversion: if isinstance(_id, Unset): id = UNSET else: - id = Uuid(_id) + id = _id # type: ignore[arg-type] input = d.pop("input", UNSET) diff --git a/kittycad/models/unit_torque_conversion.py b/kittycad/models/unit_torque_conversion.py index ec757e353..852fbd8de 100644 --- a/kittycad/models/unit_torque_conversion.py +++ b/kittycad/models/unit_torque_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_torque import UnitTorque from ..models.uuid import Uuid from ..types import UNSET, Unset -W = TypeVar("W", bound="UnitTorqueConversion") +IT = TypeVar("IT", bound="UnitTorqueConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitTorqueConversion: return field_dict @classmethod - def from_dict(cls: Type[W], src_dict: Dict[str, Any]) -> W: + def from_dict(cls: Type[IT], src_dict: Dict[str, Any]) -> IT: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -110,7 +110,7 @@ class UnitTorqueConversion: if isinstance(_id, Unset): id = UNSET else: - id = Uuid(_id) + id = _id # type: ignore[arg-type] input = d.pop("input", UNSET) diff --git a/kittycad/models/unit_volume.py b/kittycad/models/unit_volume.py index f23e66597..66becae03 100644 --- a/kittycad/models/unit_volume.py +++ b/kittycad/models/unit_volume.py @@ -4,44 +4,24 @@ from enum import Enum class UnitVolume(str, Enum): """The valid types of volume units.""" # noqa: E501 - """# Cubic centimeters (cc or cm³) """ # noqa: E501 - CUBIC_CENTIMETRES = "cubic_centimetres" + """# Cubic centimetres (cc or cm³) """ # noqa: E501 + CM3 = "cm3" """# Cubic feet (ft³) """ # noqa: E501 - CUBIC_FEET = "cubic_feet" + FT3 = "ft3" """# Cubic inches (cu in or in³) """ # noqa: E501 - CUBIC_INCHES = "cubic_inches" + IN3 = "in3" """# Cubic metres (m³) """ # noqa: E501 - CUBIC_METRES = "cubic_metres" + M3 = "m3" """# Cubic yards (yd³) """ # noqa: E501 - CUBIC_YARDS = "cubic_yards" - """# Cups """ # noqa: E501 - CUPS = "cups" - """# Drams """ # noqa: E501 - DRAMS = "drams" - """# Drops """ # noqa: E501 - DROPS = "drops" + YD3 = "yd3" """# US Fluid Ounces (fl oz) """ # noqa: E501 - FLUID_OUNCES = "fluid_ounces" - """# UK Fluid Ounces (fl oz) """ # noqa: E501 - FLUID_OUNCES_UK = "fluid_ounces_uk" + USFLOZ = "usfloz" """# US Gallons (gal US) """ # noqa: E501 - GALLONS = "gallons" - """# UK/Imperial Gallons (gal) """ # noqa: E501 - GALLONS_UK = "gallons_uk" + USGAL = "usgal" """# Liters (l) """ # noqa: E501 - LITRES = "litres" + L = "l" """# Milliliters (ml) """ # noqa: E501 - MILLILITRES = "millilitres" - """# Pints """ # noqa: E501 - PINTS = "pints" - """# Pints in the United Kingdom (UK) """ # noqa: E501 - PINTS_UK = "pints_uk" - """# Quarts """ # noqa: E501 - QUARTS = "quarts" - """# Tablespoons (tbsp) """ # noqa: E501 - TABLESPOONS = "tablespoons" - """# Teaspoons (tsp) """ # noqa: E501 - TEASPOONS = "teaspoons" + ML = "ml" def __str__(self) -> str: return str(self.value) diff --git a/kittycad/models/unit_volume_conversion.py b/kittycad/models/unit_volume_conversion.py index 22a7e9e8c..9f7070fc3 100644 --- a/kittycad/models/unit_volume_conversion.py +++ b/kittycad/models/unit_volume_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_volume import UnitVolume from ..models.uuid import Uuid from ..types import UNSET, Unset -B = TypeVar("B", bound="UnitVolumeConversion") +LD = TypeVar("LD", bound="UnitVolumeConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitVolumeConversion: return field_dict @classmethod - def from_dict(cls: Type[B], src_dict: Dict[str, Any]) -> B: + def from_dict(cls: Type[LD], src_dict: Dict[str, Any]) -> LD: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -110,7 +110,7 @@ class UnitVolumeConversion: if isinstance(_id, Unset): id = UNSET else: - id = Uuid(_id) + id = _id # type: ignore[arg-type] input = d.pop("input", UNSET) diff --git a/kittycad/models/update_user.py b/kittycad/models/update_user.py index b43d19400..3f4a0d004 100644 --- a/kittycad/models/update_user.py +++ b/kittycad/models/update_user.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -K = TypeVar("K", bound="UpdateUser") +UA = TypeVar("UA", bound="UpdateUser") @attr.s(auto_attribs=True) @@ -47,7 +47,7 @@ class UpdateUser: return field_dict @classmethod - def from_dict(cls: Type[K], src_dict: Dict[str, Any]) -> K: + def from_dict(cls: Type[UA], src_dict: Dict[str, Any]) -> UA: d = src_dict.copy() company = d.pop("company", UNSET) diff --git a/kittycad/models/user.py b/kittycad/models/user.py index 305cc7e96..9b4440f5f 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 -K = TypeVar("K", bound="User") +TN = TypeVar("TN", bound="User") @attr.s(auto_attribs=True) @@ -83,7 +83,7 @@ class User: return field_dict @classmethod - def from_dict(cls: Type[K], src_dict: Dict[str, Any]) -> K: + def from_dict(cls: Type[TN], src_dict: Dict[str, Any]) -> TN: 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 e9cdc1b6a..a1aa8b076 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 -H = TypeVar("H", bound="UserResultsPage") +MZ = TypeVar("MZ", bound="UserResultsPage") @attr.s(auto_attribs=True) @@ -37,7 +37,7 @@ class UserResultsPage: return field_dict @classmethod - def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H: + def from_dict(cls: Type[MZ], src_dict: Dict[str, Any]) -> MZ: d = src_dict.copy() from ..models.user import User diff --git a/kittycad/models/verification_token.py b/kittycad/models/verification_token.py index cdf0aa00e..a8dcce99d 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 -C = TypeVar("C", bound="VerificationToken") +UG = TypeVar("UG", bound="VerificationToken") @attr.s(auto_attribs=True) @@ -53,7 +53,7 @@ class VerificationToken: return field_dict @classmethod - def from_dict(cls: Type[C], src_dict: Dict[str, Any]) -> C: + def from_dict(cls: Type[UG], src_dict: Dict[str, Any]) -> UG: d = src_dict.copy() _created_at = d.pop("created_at", UNSET) created_at: Union[Unset, datetime.datetime]