Compare commits

..

4 Commits

Author SHA1 Message Date
4f29f55190 updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2023-10-17 19:39:06 -07:00
6ad21a2c87 Update api spec (#159)
* YOYO NEW API SPEC!

* I have generated the latest API!

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-10-17 15:35:56 -07:00
036965255a Update api spec (#157)
* YOYO NEW API SPEC!

* I have generated the latest API!

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-10-12 11:02:59 -05:00
4120a139cd Update api spec (#152)
* YOYO NEW API SPEC!

* I have generated the latest API!

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-09-29 18:04:23 -07:00
133 changed files with 13236 additions and 11210 deletions

View File

@ -35,7 +35,7 @@ def main():
# Add the client information to the generation.
data["info"]["x-python"] = {
"client": """# Create a client with your token.
from kittycad import Client
from kittycad.client import Client
client = Client(token="$TOKEN")
@ -43,7 +43,7 @@ client = Client(token="$TOKEN")
# Create a new client with your token parsed from the environment variable:
# `KITTYCAD_API_TOKEN`.
from kittycad import ClientFromEnv
from kittycad.client import ClientFromEnv
client = ClientFromEnv()

View File

@ -3,208 +3,32 @@
"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.",
"client": "# Create a client with your token.\nfrom kittycad.client 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.client import ClientFromEnv\n\nclient = ClientFromEnv()\n\n# NOTE: The python library additionally implements asyncio, however all the code samples we\n# show below use the sync functions for ease of use and understanding.\n# Check out the library docs at:\n# https://python.api.docs.kittycad.io/_autosummary/kittycad.api.html#module-kittycad.api\n# for more details.",
"install": "pip install kittycad"
}
},
{
"op": "add",
"path": "/paths/~1unit~1conversion~1torque~1{input_unit}~1{output_unit}/get/x-python",
"path": "/paths/~1api-calls~1{id}/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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"
"example": "from typing import Any, List, Optional, Tuple, 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=\"<string>\",\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/~1file~1execute~1{lang}/post/x-python",
"path": "/paths/~1user~1api-tokens/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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"
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_tokens import list_api_tokens_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiTokenResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_tokens_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiTokenResultsPage, Error]\n ] = list_api_tokens_for_user.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiTokenResultsPage = result\n print(body)\n",
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.list_api_tokens_for_user.html"
}
},
{
"op": "add",
"path": "/paths/~1ai~1image-to-3d~1{input_format}~1{output_format}/post/x-python",
"path": "/paths/~1user~1api-tokens/post/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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.FBX,\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/~1ping/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import ping\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Pong\nfrom kittycad.types import Response\n\n\ndef example_ping():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Pong, Error]] = ping.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Pong = result\n print(body)\n",
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.ping.html"
}
},
{
"op": "add",
"path": "/paths/~1_meta~1info/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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/~1apps~1github~1callback/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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/~1api-call-metrics/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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/~1user~1api-calls/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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/~1file~1conversion~1{src_format}~1{output_format}/post/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_conversion\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():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileConversion, Error]] = create_file_conversion.sync(\n client=client,\n output_format=FileExportFormat.FBX,\n src_format=FileImportFormat.FBX,\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.html"
}
},
{
"op": "add",
"path": "/paths/~1async~1operations/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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/~1user~1payment~1methods/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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~1temperature~1{input_unit}~1{output_unit}/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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~1current~1{input_unit}~1{output_unit}/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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/~1unit~1conversion~1pressure~1{input_unit}~1{output_unit}/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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/~1file~1center-of-mass/post/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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.FBX,\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/~1api-calls/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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/~1user~1onboarding/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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/~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/~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~1force~1{input_unit}~1{output_unit}/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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/~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/~1apps~1github~1consent/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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~1length~1{input_unit}~1{output_unit}/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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/~1user~1payment~1methods~1{id}/delete/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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=\"<string>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n",
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.delete_payment_method_for_user.html"
}
},
{
"op": "add",
"path": "/paths/~1unit~1conversion~1mass~1{input_unit}~1{output_unit}/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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"
"example": "from typing import Any, List, Optional, Tuple, 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"
}
},
{
@ -217,26 +41,74 @@
},
{
"op": "add",
"path": "/paths/~1file~1density/post/x-python",
"path": "/paths/~1user~1api-calls~1{id}/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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.FBX,\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"
"example": "from typing import Any, List, Optional, Tuple, 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=\"<string>\",\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/~1auth~1email~1callback/get/x-python",
"path": "/paths/~1unit~1conversion~1current~1{input_unit}~1{output_unit}/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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=\"<string>\",\n token=\"<string>\",\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"
"example": "from typing import Any, List, Optional, Tuple, 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/~1unit~1conversion~1power~1{input_unit}~1{output_unit}/get/x-python",
"path": "/paths/~1api-call-metrics/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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"
"example": "from typing import Any, List, Optional, Tuple, 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/~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~1onboarding/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_onboarding_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Onboarding\nfrom kittycad.types import Response\n\n\ndef example_get_user_onboarding_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Onboarding, Error]] = get_user_onboarding_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Onboarding = result\n print(body)\n",
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_onboarding_self.html"
}
},
{
"op": "add",
"path": "/paths/~1unit~1conversion~1mass~1{input_unit}~1{output_unit}/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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/~1user~1text-to-cad~1{id}/post/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import create_text_to_cad_model_feedback\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.models.ai_feedback import AiFeedback\nfrom kittycad.types import Response\n\n\ndef example_create_text_to_cad_model_feedback():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = create_text_to_cad_model_feedback.sync(\n client=client,\n id=\"<uuid>\",\n feedback=AiFeedback.THUMBS_UP,\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.ai.create_text_to_cad_model_feedback.html"
}
},
{
"op": "add",
"path": "/paths/~1user~1payment~1invoices/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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"
}
},
{
@ -255,118 +127,6 @@
"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, Tuple, 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/~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 # Connect to the websocket.\n websocket = modeling_commands_ws.sync(\n client=client,\n fps=10,\n unlocked_framerate=False,\n video_res_height=10,\n video_res_width=10,\n webrtc=False,\n )\n\n # Send a message.\n websocket.send(\"{}\")\n\n # Get the messages.\n for message in websocket:\n print(message)\n",
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.modeling.modeling_commands_ws.html"
}
},
{
"op": "add",
"path": "/paths/~1auth~1email/post/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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=\"<string>\",\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/~1unit~1conversion~1frequency~1{input_unit}~1{output_unit}/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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/~1user~1api-tokens/post/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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, Tuple, 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/~1users~1{id}~1api-calls/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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=\"<string>\",\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~1area~1{input_unit}~1{output_unit}/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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/~1users/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import list_users\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UserResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_users():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[UserResultsPage, Error]] = list_users.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UserResultsPage = result\n print(body)\n",
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.list_users.html"
}
},
{
"op": "add",
"path": "/paths/~1users~1{id}/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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=\"<string>\",\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/~1ai~1text-to-3d~1{output_format}/post/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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.FBX,\n prompt=\"<string>\",\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/~1file~1mass/post/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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.FBX,\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/~1file~1volume/post/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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.FBX,\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~1payment~1invoices/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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~1extended/get/x-python",
@ -375,38 +135,6 @@
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_self_extended.html"
}
},
{
"op": "add",
"path": "/paths/~1file~1surface-area/post/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileSurfaceArea = result\n print(body)\n",
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_surface_area.html"
}
},
{
"op": "add",
"path": "/paths/~1user~1api-tokens~1{token}/delete/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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=\"<uuid>\",\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, Tuple, 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=\"<uuid>\",\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/~1user~1session~1{token}/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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=\"<uuid>\",\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/~1logout/post/x-python",
@ -417,90 +145,50 @@
},
{
"op": "add",
"path": "/paths/~1apps~1github~1webhook/post/x-python",
"path": "/paths/~1auth~1email/post/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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"
"example": "from typing import Any, List, Optional, Tuple, 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=\"<string>\",\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/~1unit~1conversion~1angle~1{input_unit}~1{output_unit}/get/x-python",
"path": "/paths/~1ping/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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"
"example": "from typing import Any, List, Optional, Tuple, 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/~1user~1payment~1tax/get/x-python",
"path": "/paths/~1file~1conversion~1{src_format}~1{output_format}/post/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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"
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_conversion\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():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileConversion, Error]] = create_file_conversion.sync(\n client=client,\n output_format=FileExportFormat.FBX,\n src_format=FileImportFormat.FBX,\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.html"
}
},
{
"op": "add",
"path": "/paths/~1user~1payment~1balance/get/x-python",
"path": "/paths/~1unit~1conversion~1temperature~1{input_unit}~1{output_unit}/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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"
"example": "from typing import Any, List, Optional, Tuple, 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/~1user~1payment~1intent/post/x-python",
"path": "/paths/~1ai~1text-to-cad~1{output_format}/post/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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"
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import create_text_to_cad\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, TextToCad\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.models.text_to_cad_create_body import TextToCadCreateBody\nfrom kittycad.types import Response\n\n\ndef example_create_text_to_cad():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[TextToCad, Error]] = create_text_to_cad.sync(\n client=client,\n output_format=FileExportFormat.FBX,\n body=TextToCadCreateBody(\n prompt=\"<string>\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: TextToCad = result\n print(body)\n",
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.create_text_to_cad.html"
}
},
{
"op": "add",
"path": "/paths/~1api-calls~1{id}/get/x-python",
"path": "/paths/~1apps~1github~1callback/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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=\"<string>\",\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~1{id}/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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=\"<string>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Union[\n FileConversion,\n FileCenterOfMass,\n FileMass,\n FileVolume,\n FileDensity,\n FileSurfaceArea,\n ] = result\n print(body)\n",
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_async_operation.html"
}
},
{
"op": "add",
"path": "/paths/~1unit~1conversion~1energy~1{input_unit}~1{output_unit}/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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, Tuple, 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/~1users-extended~1{id}/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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=\"<string>\",\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/~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 # Connect to the websocket.\n websocket = create_executor_term.sync(\n client=client,\n )\n\n # Send a message.\n websocket.send(\"{}\")\n\n # Get the messages.\n for message in websocket:\n print(message)\n",
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.executor.create_executor_term.html"
"example": "from typing import Any, List, Optional, Tuple, 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"
}
},
{
@ -513,10 +201,10 @@
},
{
"op": "add",
"path": "/paths/~1user~1payment/delete/x-python",
"path": "/paths/~1user~1payment/put/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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"
"example": "from typing import Any, List, Optional, Tuple, 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=\"<string>\",\n phone=\"<string>\",\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"
}
},
{
@ -529,18 +217,50 @@
},
{
"op": "add",
"path": "/paths/~1user~1payment/put/x-python",
"path": "/paths/~1user~1payment/delete/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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=\"<string>\",\n phone=\"<string>\",\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"
"example": "from typing import Any, List, Optional, Tuple, 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~1api-calls~1{id}/get/x-python",
"path": "/paths/~1unit~1conversion~1energy~1{input_unit}~1{output_unit}/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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=\"<string>\",\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"
"example": "from typing import Any, List, Optional, Tuple, 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~1methods/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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/~1async~1operations/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import list_async_operations\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AsyncApiCallResultsPage, Error\nfrom kittycad.models.api_call_status import ApiCallStatus\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_async_operations():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[AsyncApiCallResultsPage, Error]\n ] = list_async_operations.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n status=ApiCallStatus.QUEUED,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AsyncApiCallResultsPage = result\n print(body)\n",
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_async_operations.html"
}
},
{
"op": "add",
"path": "/paths/~1file~1volume/post/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileVolume = result\n print(body)\n",
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_volume.html"
}
},
{
"op": "add",
"path": "/paths/~1unit~1conversion~1pressure~1{input_unit}~1{output_unit}/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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"
}
},
{
@ -550,5 +270,293 @@
"example": "from typing import Any, List, Optional, Tuple, 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/~1auth~1email~1callback/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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=\"<string>\",\n token=\"<string>\",\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/~1users~1{id}~1api-calls/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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=\"<string>\",\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/~1apps~1github~1consent/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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/~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~1api-calls/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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/~1file~1density/post/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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.FBX,\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/~1user~1payment~1methods~1{id}/delete/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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=\"<string>\",\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/~1file~1execute~1{lang}/post/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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/~1apps~1github~1webhook/post/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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/~1_meta~1info/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import get_metadata\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Metadata\nfrom kittycad.types import Response\n\n\ndef example_get_metadata():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Metadata, Error]] = get_metadata.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Metadata = result\n print(body)\n",
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_metadata.html"
}
},
{
"op": "add",
"path": "/paths/~1user~1session~1{token}/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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=\"<uuid>\",\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/~1unit~1conversion~1angle~1{input_unit}~1{output_unit}/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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/~1unit~1conversion~1force~1{input_unit}~1{output_unit}/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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/~1api-calls/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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~1power~1{input_unit}~1{output_unit}/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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~1payment~1balance/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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-tokens~1{token}/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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=\"<uuid>\",\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/~1user~1api-tokens~1{token}/delete/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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=\"<uuid>\",\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/~1users-extended~1{id}/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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=\"<string>\",\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/~1file~1center-of-mass/post/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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.FBX,\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/~1file~1surface-area/post/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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.FBX,\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/~1async~1operations~1{id}/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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 TextToCad,\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 TextToCad,\n Error,\n ]\n ] = get_async_operation.sync(\n client=client,\n id=\"<string>\",\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 TextToCad,\n ] = result\n print(body)\n",
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_async_operation.html"
}
},
{
"op": "add",
"path": "/paths/~1unit~1conversion~1torque~1{input_unit}~1{output_unit}/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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~1text-to-cad/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import list_text_to_cad_models_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, TextToCadResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_text_to_cad_models_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[TextToCadResultsPage, Error]\n ] = list_text_to_cad_models_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: TextToCadResultsPage = result\n print(body)\n",
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.list_text_to_cad_models_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, Tuple, 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/~1file~1mass/post/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileMass = result\n print(body)\n",
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_mass.html"
}
},
{
"op": "add",
"path": "/paths/~1unit~1conversion~1frequency~1{input_unit}~1{output_unit}/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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~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 # Connect to the websocket.\n websocket = create_executor_term.sync(\n client=client,\n )\n\n # Send a message.\n websocket.send(\"{}\")\n\n # Get the messages.\n for message in websocket:\n print(message)\n",
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.executor.create_executor_term.html"
}
},
{
"op": "add",
"path": "/paths/~1user~1payment~1tax/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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/~1users/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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/~1ws~1modeling~1commands/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.modeling import modeling_commands_ws\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, WebSocketResponse\nfrom kittycad.models.rtc_sdp_type import RtcSdpType\nfrom kittycad.models.rtc_session_description import RtcSessionDescription\nfrom kittycad.models.web_socket_request import sdp_offer\nfrom kittycad.types import Response\n\n\ndef example_modeling_commands_ws():\n # Create our client.\n client = ClientFromEnv()\n\n # Connect to the websocket.\n websocket = modeling_commands_ws.sync(\n client=client,\n fps=10,\n unlocked_framerate=False,\n video_res_height=10,\n video_res_width=10,\n webrtc=False,\n body=sdp_offer(\n offer=RtcSessionDescription(\n sdp=\"<string>\",\n type=RtcSdpType.UNSPECIFIED,\n ),\n ),\n )\n\n # Send a message.\n websocket.send(\"{}\")\n\n # Get the messages.\n for message in websocket:\n print(message)\n",
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.modeling.modeling_commands_ws.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, Tuple, 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/~1users~1{id}/get/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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=\"<string>\",\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~1payment~1intent/post/x-python",
"value": {
"example": "from typing import Any, List, Optional, Tuple, 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"
}
}
]

View File

@ -5,23 +5,19 @@ import httpx
from ...client import Client
from ...models.error import Error
from ...models.file_export_format import FileExportFormat
from ...models.image_type import ImageType
from ...models.mesh import Mesh
from ...models.text_to_cad import TextToCad
from ...models.text_to_cad_create_body import TextToCadCreateBody
from ...types import Response
def _get_kwargs(
input_format: ImageType,
output_format: FileExportFormat,
body: bytes,
body: TextToCadCreateBody,
*,
@ -31,12 +27,8 @@ def _get_kwargs(
) -> Dict[str, Any]:
url = "{}/ai/image-to-3d/{input_format}/{output_format}".format(client.base_url, input_format=input_format,output_format=output_format,) # noqa: E501
url = "{}/ai/text-to-cad/{output_format}".format(client.base_url, output_format=output_format,) # noqa: E501
@ -56,10 +48,10 @@ def _get_kwargs(
}
def _parse_response(*, response: httpx.Response) -> Optional[Union[Mesh, Error]] :
if response.status_code == 200:
response_200 = Mesh.from_dict(response.json())
return response_200
def _parse_response(*, response: httpx.Response) -> Optional[Union[TextToCad, Error]] :
if response.status_code == 201:
response_201 = TextToCad.from_dict(response.json())
return response_201
if response.status_code == 400:
response_4XX = Error.from_dict(response.json())
return response_4XX
@ -72,7 +64,7 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Mesh, Error]]
def _build_response(
*, response: httpx.Response
) -> Response[Optional[Union[Mesh, Error]]]:
) -> Response[Optional[Union[TextToCad, Error]]]:
return Response(
status_code=response.status_code,
content=response.content,
@ -84,15 +76,11 @@ def _build_response(
def sync_detailed(
input_format: ImageType,
output_format: FileExportFormat,
body: bytes,
body: TextToCadCreateBody,
*,
@ -102,13 +90,9 @@ def sync_detailed(
) -> Response[Optional[Union[Mesh, Error]]]:
) -> Response[Optional[Union[TextToCad, Error]]]:
kwargs = _get_kwargs(
input_format=input_format,
output_format=output_format,
body=body,
@ -127,15 +111,11 @@ def sync_detailed(
def sync(
input_format: ImageType,
output_format: FileExportFormat,
body: bytes,
body: TextToCadCreateBody,
*,
@ -145,15 +125,12 @@ def sync(
) -> Optional[Union[Mesh, Error]] :
"""This is an alpha endpoint. It will change in the future. The current output is honestly pretty bad. So if you find this endpoint, you get what you pay for, which currently is nothing. But in the future will be made a lot better.""" # noqa: E501
) -> Optional[Union[TextToCad, Error]] :
"""This 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.
This is an alpha endpoint. It will change in the future. The current output is honestly pretty bad. So if you find this endpoint, you get what you pay for, which currently is nothing. But in the future will be made a lot better.""" # noqa: E501
return sync_detailed(
input_format=input_format,
output_format=output_format,
body=body,
@ -165,15 +142,11 @@ def sync(
async def asyncio_detailed(
input_format: ImageType,
output_format: FileExportFormat,
body: bytes,
body: TextToCadCreateBody,
*,
@ -183,13 +156,9 @@ async def asyncio_detailed(
) -> Response[Optional[Union[Mesh, Error]]]:
) -> Response[Optional[Union[TextToCad, Error]]]:
kwargs = _get_kwargs(
input_format=input_format,
output_format=output_format,
body=body,
@ -206,15 +175,11 @@ async def asyncio_detailed(
async def asyncio(
input_format: ImageType,
output_format: FileExportFormat,
body: bytes,
body: TextToCadCreateBody,
*,
@ -224,16 +189,13 @@ async def asyncio(
) -> Optional[Union[Mesh, Error]] :
"""This is an alpha endpoint. It will change in the future. The current output is honestly pretty bad. So if you find this endpoint, you get what you pay for, which currently is nothing. But in the future will be made a lot better.""" # noqa: E501
) -> Optional[Union[TextToCad, Error]] :
"""This 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.
This is an alpha endpoint. It will change in the future. The current output is honestly pretty bad. So if you find this endpoint, you get what you pay for, which currently is nothing. But in the future will be made a lot better.""" # noqa: E501
return (
await asyncio_detailed(
input_format=input_format,
output_format=output_format,
body=body,

View File

@ -1,22 +1,21 @@
from typing import Any, Dict, Optional, Union
from typing import Any, Dict, Optional
import httpx
from ...client import Client
from ...models.ai_feedback import AiFeedback
from ...models.error import Error
from ...models.file_export_format import FileExportFormat
from ...models.mesh import Mesh
from ...types import Response
def _get_kwargs(
output_format: FileExportFormat,
id: str,
prompt: str,
feedback: AiFeedback,
*,
@ -27,16 +26,16 @@ def _get_kwargs(
) -> Dict[str, Any]:
url = "{}/ai/text-to-3d/{output_format}".format(client.base_url, output_format=output_format,) # noqa: E501
url = "{}/user/text-to-cad/{id}".format(client.base_url, id=id,) # noqa: E501
if prompt is not None:
if feedback is not None:
if "?" in url:
url = url + "&prompt=" + str(prompt)
url = url + "&feedback=" + str(feedback)
else:
url = url + "?prompt=" + str(prompt)
url = url + "?feedback=" + str(feedback)
@ -53,10 +52,8 @@ def _get_kwargs(
}
def _parse_response(*, response: httpx.Response) -> Optional[Union[Mesh, Error]] :
if response.status_code == 200:
response_200 = Mesh.from_dict(response.json())
return response_200
def _parse_response(*, response: httpx.Response) -> Optional[Error] :
return None
if response.status_code == 400:
response_4XX = Error.from_dict(response.json())
return response_4XX
@ -69,7 +66,7 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Mesh, Error]]
def _build_response(
*, response: httpx.Response
) -> Response[Optional[Union[Mesh, Error]]]:
) -> Response[Optional[Error]]:
return Response(
status_code=response.status_code,
content=response.content,
@ -81,11 +78,11 @@ def _build_response(
def sync_detailed(
output_format: FileExportFormat,
id: str,
prompt: str,
feedback: AiFeedback,
*,
@ -95,12 +92,12 @@ def sync_detailed(
) -> Response[Optional[Union[Mesh, Error]]]:
) -> Response[Optional[Error]]:
kwargs = _get_kwargs(
output_format=output_format,
id=id,
prompt=prompt,
feedback=feedback,
client=client,
)
@ -116,11 +113,11 @@ def sync_detailed(
def sync(
output_format: FileExportFormat,
id: str,
prompt: str,
feedback: AiFeedback,
*,
@ -130,14 +127,14 @@ def sync(
) -> Optional[Union[Mesh, Error]] :
"""This is an alpha endpoint. It will change in the future. The current output is honestly pretty bad. So if you find this endpoint, you get what you pay for, which currently is nothing. But in the future will be made a lot better.""" # noqa: E501
) -> Optional[Error] :
"""This endpoint requires authentication by any KittyCAD user. The user must be the owner of the text-to-CAD model, in order to give feedback.""" # noqa: E501
return sync_detailed(
output_format=output_format,
id=id,
prompt=prompt,
feedback=feedback,
client=client,
).parsed
@ -146,11 +143,11 @@ def sync(
async def asyncio_detailed(
output_format: FileExportFormat,
id: str,
prompt: str,
feedback: AiFeedback,
*,
@ -160,12 +157,12 @@ async def asyncio_detailed(
) -> Response[Optional[Union[Mesh, Error]]]:
) -> Response[Optional[Error]]:
kwargs = _get_kwargs(
output_format=output_format,
id=id,
prompt=prompt,
feedback=feedback,
client=client,
)
@ -179,11 +176,11 @@ async def asyncio_detailed(
async def asyncio(
output_format: FileExportFormat,
id: str,
prompt: str,
feedback: AiFeedback,
*,
@ -193,15 +190,15 @@ async def asyncio(
) -> Optional[Union[Mesh, Error]] :
"""This is an alpha endpoint. It will change in the future. The current output is honestly pretty bad. So if you find this endpoint, you get what you pay for, which currently is nothing. But in the future will be made a lot better.""" # noqa: E501
) -> Optional[Error] :
"""This endpoint requires authentication by any KittyCAD user. The user must be the owner of the text-to-CAD model, in order to give feedback.""" # noqa: E501
return (
await asyncio_detailed(
output_format=output_format,
id=id,
prompt=prompt,
feedback=feedback,
client=client,
)

View File

@ -0,0 +1,262 @@
from typing import Any, Dict, Optional, Union
import httpx
from ...client import Client
from ...models.created_at_sort_mode import CreatedAtSortMode
from ...models.error import Error
from ...models.text_to_cad_results_page import TextToCadResultsPage
from ...types import Response
def _get_kwargs(
sort_by: CreatedAtSortMode,
*,
client: Client,
limit: Optional[int] = None,
page_token: Optional[str] = None,
) -> Dict[str, Any]:
url = "{}/user/text-to-cad".format(client.base_url, ) # noqa: E501
if limit is not None:
if "?" in url:
url = url + "&limit=" + str(limit)
else:
url = url + "?limit=" + str(limit)
if page_token is not None:
if "?" in url:
url = url + "&page_token=" + str(page_token)
else:
url = url + "?page_token=" + str(page_token)
if sort_by is not None:
if "?" in url:
url = url + "&sort_by=" + str(sort_by)
else:
url = url + "?sort_by=" + str(sort_by)
headers: Dict[str, Any] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _parse_response(*, response: httpx.Response) -> Optional[Union[TextToCadResultsPage, Error]] :
if response.status_code == 200:
response_200 = TextToCadResultsPage.from_dict(response.json())
return response_200
if response.status_code == 400:
response_4XX = Error.from_dict(response.json())
return response_4XX
if response.status_code == 500:
response_5XX = Error.from_dict(response.json())
return response_5XX
return Error.from_dict(response.json())
def _build_response(
*, response: httpx.Response
) -> Response[Optional[Union[TextToCadResultsPage, Error]]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
sort_by: CreatedAtSortMode,
*,
client: Client,
limit: Optional[int] = None,
page_token: Optional[str] = None,
) -> Response[Optional[Union[TextToCadResultsPage, Error]]]:
kwargs = _get_kwargs(
limit=limit,
page_token=page_token,
sort_by=sort_by,
client=client,
)
response = httpx.get(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
sort_by: CreatedAtSortMode,
*,
client: Client,
limit: Optional[int] = None,
page_token: Optional[str] = None,
) -> Optional[Union[TextToCadResultsPage, Error]] :
"""This endpoint requires authentication by any KittyCAD user. It returns the text-to-CAD models for the authenticated user.
The text-to-CAD models are returned in order of creation, with the most recently created text-to-CAD models first.""" # noqa: E501
return sync_detailed(
limit=limit,
page_token=page_token,
sort_by=sort_by,
client=client,
).parsed
async def asyncio_detailed(
sort_by: CreatedAtSortMode,
*,
client: Client,
limit: Optional[int] = None,
page_token: Optional[str] = None,
) -> Response[Optional[Union[TextToCadResultsPage, Error]]]:
kwargs = _get_kwargs(
limit=limit,
page_token=page_token,
sort_by=sort_by,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.get(**kwargs)
return _build_response(response=response)
async def asyncio(
sort_by: CreatedAtSortMode,
*,
client: Client,
limit: Optional[int] = None,
page_token: Optional[str] = None,
) -> Optional[Union[TextToCadResultsPage, Error]] :
"""This endpoint requires authentication by any KittyCAD user. It returns the text-to-CAD models for the authenticated user.
The text-to-CAD models are returned in order of creation, with the most recently created text-to-CAD models first.""" # noqa: E501
return (
await asyncio_detailed(
limit=limit,
page_token=page_token,
sort_by=sort_by,
client=client,
)
).parsed

View File

@ -10,6 +10,7 @@ from ...models.file_density import FileDensity
from ...models.file_mass import FileMass
from ...models.file_surface_area import FileSurfaceArea
from ...models.file_volume import FileVolume
from ...models.text_to_cad import TextToCad
from ...types import Response
@ -43,7 +44,7 @@ def _get_kwargs(
}
def _parse_response(*, response: httpx.Response) -> Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]] :
def _parse_response(*, response: httpx.Response) -> Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, TextToCad, Error]] :
if response.status_code == 200:
data = response.json()
try:
@ -96,6 +97,15 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[FileConversio
raise TypeError()
option_file_surface_area = FileSurfaceArea.from_dict(data)
return option_file_surface_area
except ValueError:
pass
except TypeError:
pass
try:
if not isinstance(data, dict):
raise TypeError()
option_text_to_cad = TextToCad.from_dict(data)
return option_text_to_cad
except ValueError:
raise
except TypeError:
@ -112,7 +122,7 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[FileConversio
def _build_response(
*, response: httpx.Response
) -> Response[Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]]:
) -> Response[Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, TextToCad, Error]]]:
return Response(
status_code=response.status_code,
content=response.content,
@ -132,7 +142,7 @@ def sync_detailed(
) -> Response[Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]]:
) -> Response[Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, TextToCad, Error]]]:
kwargs = _get_kwargs(
id=id,
@ -159,7 +169,7 @@ def sync(
) -> Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]] :
) -> Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, TextToCad, Error]] :
"""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.
@ -184,7 +194,7 @@ async def asyncio_detailed(
) -> Response[Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]]:
) -> Response[Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, TextToCad, Error]]]:
kwargs = _get_kwargs(
id=id,
@ -209,7 +219,7 @@ async def asyncio(
) -> Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]] :
) -> Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, TextToCad, Error]] :
"""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.

View File

@ -5,6 +5,7 @@ from websockets.sync.client import ClientConnection, connect as ws_connect
from ...client import Client
from ...models.error import Error
from ...models.web_socket_request import WebSocketRequest
def _get_kwargs(
@ -29,6 +30,10 @@ def _get_kwargs(
webrtc: bool,
body: WebSocketRequest,
*,
client: Client,
@ -42,6 +47,8 @@ def _get_kwargs(
) -> Dict[str, Any]:
url = "{}/ws/modeling/commands".format(client.base_url) # noqa: E501
@ -85,6 +92,8 @@ def _get_kwargs(
url = url + "?webrtc=" + str(webrtc)
headers: Dict[str, Any] = client.get_headers()
@ -95,7 +104,7 @@ def _get_kwargs(
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"content": body,
}
@ -121,6 +130,10 @@ def sync(
webrtc: bool,
body: WebSocketRequest,
*,
client: Client,
@ -134,6 +147,8 @@ def sync(
) -> ClientConnection:
"""Pass those commands to the engine via websocket, and pass responses back to the client. Basically, this is a websocket proxy between the frontend/client and the engine.""" # noqa: E501
@ -149,6 +164,8 @@ def sync(
webrtc=webrtc,
body=body,
client=client,
)
@ -182,6 +199,10 @@ async def asyncio(
webrtc: bool,
body: WebSocketRequest,
*,
client: Client,
@ -195,6 +216,8 @@ async def asyncio(
) -> WebSocketClientProtocol:
"""Pass those commands to the engine via websocket, and pass responses back to the client. Basically, this is a websocket proxy between the frontend/client and the engine.""" # noqa: E501
@ -210,6 +233,8 @@ async def asyncio(
webrtc=webrtc,
body=body,
client=client,
)

View File

@ -2,7 +2,11 @@ from typing import List, Optional, Union
import pytest
from kittycad.api.ai import create_image_to_3d, create_text_to_3d
from kittycad.api.ai import (
create_text_to_cad,
create_text_to_cad_model_feedback,
list_text_to_cad_models_for_user,
)
from kittycad.api.api_calls import (
get_api_call,
get_api_call_for_user,
@ -105,13 +109,14 @@ from kittycad.models import (
FileSurfaceArea,
FileVolume,
Invoice,
Mesh,
Metadata,
Onboarding,
PaymentIntent,
PaymentMethod,
Pong,
Session,
TextToCad,
TextToCadResultsPage,
UnitAngleConversion,
UnitAreaConversion,
UnitCurrentConversion,
@ -129,6 +134,7 @@ from kittycad.models import (
UserResultsPage,
VerificationToken,
)
from kittycad.models.ai_feedback import AiFeedback
from kittycad.models.api_call_query_group_by import ApiCallQueryGroupBy
from kittycad.models.api_call_status import ApiCallStatus
from kittycad.models.billing_info import BillingInfo
@ -137,7 +143,9 @@ from kittycad.models.created_at_sort_mode import CreatedAtSortMode
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.rtc_sdp_type import RtcSdpType
from kittycad.models.rtc_session_description import RtcSessionDescription
from kittycad.models.text_to_cad_create_body import TextToCadCreateBody
from kittycad.models.unit_angle import UnitAngle
from kittycad.models.unit_area import UnitArea
from kittycad.models.unit_current import UnitCurrent
@ -153,6 +161,7 @@ from kittycad.models.unit_temperature import UnitTemperature
from kittycad.models.unit_torque import UnitTorque
from kittycad.models.unit_volume import UnitVolume
from kittycad.models.update_user import UpdateUser
from kittycad.models.web_socket_request import sdp_offer
from kittycad.types import Response
@ -275,104 +284,61 @@ async def test_get_metadata_async():
@pytest.mark.skip
def test_create_image_to_3d():
def test_create_text_to_cad():
# Create our client.
client = ClientFromEnv()
result: Optional[Union[Mesh, Error]] = create_image_to_3d.sync(
result: Optional[Union[TextToCad, Error]] = create_text_to_cad.sync(
client=client,
input_format=ImageType.PNG,
output_format=FileExportFormat.FBX,
body=bytes("some bytes", "utf-8"),
body=TextToCadCreateBody(
prompt="<string>",
),
)
if isinstance(result, Error) or result is None:
print(result)
raise Exception("Error in response")
body: Mesh = result
body: TextToCad = result
print(body)
# OR if you need more info (e.g. status_code)
response: Response[Optional[Union[Mesh, Error]]] = create_image_to_3d.sync_detailed(
response: Response[
Optional[Union[TextToCad, Error]]
] = create_text_to_cad.sync_detailed(
client=client,
input_format=ImageType.PNG,
output_format=FileExportFormat.FBX,
body=bytes("some bytes", "utf-8"),
body=TextToCadCreateBody(
prompt="<string>",
),
)
# OR run async
@pytest.mark.asyncio
@pytest.mark.skip
async def test_create_image_to_3d_async():
async def test_create_text_to_cad_async():
# Create our client.
client = ClientFromEnv()
result: Optional[Union[Mesh, Error]] = await create_image_to_3d.asyncio(
result: Optional[Union[TextToCad, Error]] = await create_text_to_cad.asyncio(
client=client,
input_format=ImageType.PNG,
output_format=FileExportFormat.FBX,
body=bytes("some bytes", "utf-8"),
body=TextToCadCreateBody(
prompt="<string>",
),
)
# OR run async with more info
response: Response[
Optional[Union[Mesh, Error]]
] = await create_image_to_3d.asyncio_detailed(
client=client,
input_format=ImageType.PNG,
output_format=FileExportFormat.FBX,
body=bytes("some bytes", "utf-8"),
)
@pytest.mark.skip
def test_create_text_to_3d():
# Create our client.
client = ClientFromEnv()
result: Optional[Union[Mesh, Error]] = create_text_to_3d.sync(
Optional[Union[TextToCad, Error]]
] = await create_text_to_cad.asyncio_detailed(
client=client,
output_format=FileExportFormat.FBX,
prompt="<string>",
)
if isinstance(result, Error) or result is None:
print(result)
raise Exception("Error in response")
body: Mesh = result
print(body)
# OR if you need more info (e.g. status_code)
response: Response[Optional[Union[Mesh, Error]]] = create_text_to_3d.sync_detailed(
client=client,
output_format=FileExportFormat.FBX,
prompt="<string>",
)
# OR run async
@pytest.mark.asyncio
@pytest.mark.skip
async def test_create_text_to_3d_async():
# Create our client.
client = ClientFromEnv()
result: Optional[Union[Mesh, Error]] = await create_text_to_3d.asyncio(
client=client,
output_format=FileExportFormat.FBX,
prompt="<string>",
)
# OR run async with more info
response: Response[
Optional[Union[Mesh, Error]]
] = await create_text_to_3d.asyncio_detailed(
client=client,
output_format=FileExportFormat.FBX,
prompt="<string>",
body=TextToCadCreateBody(
prompt="<string>",
),
)
@ -730,6 +696,7 @@ def test_get_async_operation():
FileVolume,
FileDensity,
FileSurfaceArea,
TextToCad,
Error,
]
] = get_async_operation.sync(
@ -748,6 +715,7 @@ def test_get_async_operation():
FileVolume,
FileDensity,
FileSurfaceArea,
TextToCad,
] = result
print(body)
@ -761,6 +729,7 @@ def test_get_async_operation():
FileVolume,
FileDensity,
FileSurfaceArea,
TextToCad,
Error,
]
]
@ -785,6 +754,7 @@ async def test_get_async_operation_async():
FileVolume,
FileDensity,
FileSurfaceArea,
TextToCad,
Error,
]
] = await get_async_operation.asyncio(
@ -802,6 +772,7 @@ async def test_get_async_operation_async():
FileVolume,
FileDensity,
FileSurfaceArea,
TextToCad,
Error,
]
]
@ -2197,45 +2168,6 @@ async def test_get_volume_unit_conversion_async():
)
@pytest.mark.skip
def test_delete_user_self():
# Create our client.
client = ClientFromEnv()
result: Optional[Error] = delete_user_self.sync(
client=client,
)
if isinstance(result, Error) or result is None:
print(result)
raise Exception("Error in response")
body: Error = result
print(body)
# OR if you need more info (e.g. status_code)
response: Response[Optional[Error]] = delete_user_self.sync_detailed(
client=client,
)
# OR run async
@pytest.mark.asyncio
@pytest.mark.skip
async def test_delete_user_self_async():
# Create our client.
client = ClientFromEnv()
result: Optional[Error] = await delete_user_self.asyncio(
client=client,
)
# OR run async with more info
response: Response[Optional[Error]] = await delete_user_self.asyncio_detailed(
client=client,
)
@pytest.mark.skip
def test_get_user_self():
# Create our client.
@ -2350,6 +2282,45 @@ async def test_update_user_self_async():
)
@pytest.mark.skip
def test_delete_user_self():
# Create our client.
client = ClientFromEnv()
result: Optional[Error] = delete_user_self.sync(
client=client,
)
if isinstance(result, Error) or result is None:
print(result)
raise Exception("Error in response")
body: Error = result
print(body)
# OR if you need more info (e.g. status_code)
response: Response[Optional[Error]] = delete_user_self.sync_detailed(
client=client,
)
# OR run async
@pytest.mark.asyncio
@pytest.mark.skip
async def test_delete_user_self_async():
# Create our client.
client = ClientFromEnv()
result: Optional[Error] = await delete_user_self.asyncio(
client=client,
)
# OR run async with more info
response: Response[Optional[Error]] = await delete_user_self.asyncio_detailed(
client=client,
)
@pytest.mark.skip
def test_user_list_api_calls():
# Create our client.
@ -2558,51 +2529,6 @@ async def test_create_api_token_for_user_async():
)
@pytest.mark.skip
def test_delete_api_token_for_user():
# Create our client.
client = ClientFromEnv()
result: Optional[Error] = delete_api_token_for_user.sync(
client=client,
token="<uuid>",
)
if isinstance(result, Error) or result is None:
print(result)
raise Exception("Error in response")
body: Error = result
print(body)
# OR if you need more info (e.g. status_code)
response: Response[Optional[Error]] = delete_api_token_for_user.sync_detailed(
client=client,
token="<uuid>",
)
# OR run async
@pytest.mark.asyncio
@pytest.mark.skip
async def test_delete_api_token_for_user_async():
# Create our client.
client = ClientFromEnv()
result: Optional[Error] = await delete_api_token_for_user.asyncio(
client=client,
token="<uuid>",
)
# OR run async with more info
response: Response[
Optional[Error]
] = await delete_api_token_for_user.asyncio_detailed(
client=client,
token="<uuid>",
)
@pytest.mark.skip
def test_get_api_token_for_user():
# Create our client.
@ -2650,6 +2576,51 @@ async def test_get_api_token_for_user_async():
)
@pytest.mark.skip
def test_delete_api_token_for_user():
# Create our client.
client = ClientFromEnv()
result: Optional[Error] = delete_api_token_for_user.sync(
client=client,
token="<uuid>",
)
if isinstance(result, Error) or result is None:
print(result)
raise Exception("Error in response")
body: Error = result
print(body)
# OR if you need more info (e.g. status_code)
response: Response[Optional[Error]] = delete_api_token_for_user.sync_detailed(
client=client,
token="<uuid>",
)
# OR run async
@pytest.mark.asyncio
@pytest.mark.skip
async def test_delete_api_token_for_user_async():
# Create our client.
client = ClientFromEnv()
result: Optional[Error] = await delete_api_token_for_user.asyncio(
client=client,
token="<uuid>",
)
# OR run async with more info
response: Response[
Optional[Error]
] = await delete_api_token_for_user.asyncio_detailed(
client=client,
token="<uuid>",
)
@pytest.mark.skip
def test_get_user_self_extended():
# Create our client.
@ -2768,49 +2739,6 @@ async def test_get_user_onboarding_self_async():
)
@pytest.mark.skip
def test_delete_payment_information_for_user():
# Create our client.
client = ClientFromEnv()
result: Optional[Error] = delete_payment_information_for_user.sync(
client=client,
)
if isinstance(result, Error) or result is None:
print(result)
raise Exception("Error in response")
body: Error = result
print(body)
# OR if you need more info (e.g. status_code)
response: Response[
Optional[Error]
] = delete_payment_information_for_user.sync_detailed(
client=client,
)
# OR run async
@pytest.mark.asyncio
@pytest.mark.skip
async def test_delete_payment_information_for_user_async():
# Create our client.
client = ClientFromEnv()
result: Optional[Error] = await delete_payment_information_for_user.asyncio(
client=client,
)
# OR run async with more info
response: Response[
Optional[Error]
] = await delete_payment_information_for_user.asyncio_detailed(
client=client,
)
@pytest.mark.skip
def test_get_payment_information_for_user():
# Create our client.
@ -2856,6 +2784,67 @@ async def test_get_payment_information_for_user_async():
)
@pytest.mark.skip
def test_update_payment_information_for_user():
# Create our client.
client = ClientFromEnv()
result: Optional[Union[Customer, Error]] = update_payment_information_for_user.sync(
client=client,
body=BillingInfo(
name="<string>",
phone="<string>",
),
)
if isinstance(result, Error) or result is None:
print(result)
raise Exception("Error in response")
body: Customer = result
print(body)
# OR if you need more info (e.g. status_code)
response: Response[
Optional[Union[Customer, Error]]
] = update_payment_information_for_user.sync_detailed(
client=client,
body=BillingInfo(
name="<string>",
phone="<string>",
),
)
# OR run async
@pytest.mark.asyncio
@pytest.mark.skip
async def test_update_payment_information_for_user_async():
# Create our client.
client = ClientFromEnv()
result: Optional[
Union[Customer, Error]
] = await update_payment_information_for_user.asyncio(
client=client,
body=BillingInfo(
name="<string>",
phone="<string>",
),
)
# OR run async with more info
response: Response[
Optional[Union[Customer, Error]]
] = await update_payment_information_for_user.asyncio_detailed(
client=client,
body=BillingInfo(
name="<string>",
phone="<string>",
),
)
@pytest.mark.skip
def test_create_payment_information_for_user():
# Create our client.
@ -2918,63 +2907,45 @@ async def test_create_payment_information_for_user_async():
@pytest.mark.skip
def test_update_payment_information_for_user():
def test_delete_payment_information_for_user():
# Create our client.
client = ClientFromEnv()
result: Optional[Union[Customer, Error]] = update_payment_information_for_user.sync(
result: Optional[Error] = delete_payment_information_for_user.sync(
client=client,
body=BillingInfo(
name="<string>",
phone="<string>",
),
)
if isinstance(result, Error) or result is None:
print(result)
raise Exception("Error in response")
body: Customer = result
body: Error = result
print(body)
# OR if you need more info (e.g. status_code)
response: Response[
Optional[Union[Customer, Error]]
] = update_payment_information_for_user.sync_detailed(
Optional[Error]
] = delete_payment_information_for_user.sync_detailed(
client=client,
body=BillingInfo(
name="<string>",
phone="<string>",
),
)
# OR run async
@pytest.mark.asyncio
@pytest.mark.skip
async def test_update_payment_information_for_user_async():
async def test_delete_payment_information_for_user_async():
# Create our client.
client = ClientFromEnv()
result: Optional[
Union[Customer, Error]
] = await update_payment_information_for_user.asyncio(
result: Optional[Error] = await delete_payment_information_for_user.asyncio(
client=client,
body=BillingInfo(
name="<string>",
phone="<string>",
),
)
# OR run async with more info
response: Response[
Optional[Union[Customer, Error]]
] = await update_payment_information_for_user.asyncio_detailed(
Optional[Error]
] = await delete_payment_information_for_user.asyncio_detailed(
client=client,
body=BillingInfo(
name="<string>",
phone="<string>",
),
)
@ -3295,6 +3266,116 @@ async def test_get_session_for_user_async():
)
@pytest.mark.skip
def test_list_text_to_cad_models_for_user():
# Create our client.
client = ClientFromEnv()
result: Optional[
Union[TextToCadResultsPage, Error]
] = list_text_to_cad_models_for_user.sync(
client=client,
sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,
limit=None, # Optional[int]
page_token=None, # Optional[str]
)
if isinstance(result, Error) or result is None:
print(result)
raise Exception("Error in response")
body: TextToCadResultsPage = result
print(body)
# OR if you need more info (e.g. status_code)
response: Response[
Optional[Union[TextToCadResultsPage, Error]]
] = list_text_to_cad_models_for_user.sync_detailed(
client=client,
sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,
limit=None, # Optional[int]
page_token=None, # Optional[str]
)
# OR run async
@pytest.mark.asyncio
@pytest.mark.skip
async def test_list_text_to_cad_models_for_user_async():
# Create our client.
client = ClientFromEnv()
result: Optional[
Union[TextToCadResultsPage, Error]
] = await list_text_to_cad_models_for_user.asyncio(
client=client,
sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,
limit=None, # Optional[int]
page_token=None, # Optional[str]
)
# OR run async with more info
response: Response[
Optional[Union[TextToCadResultsPage, Error]]
] = await list_text_to_cad_models_for_user.asyncio_detailed(
client=client,
sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,
limit=None, # Optional[int]
page_token=None, # Optional[str]
)
@pytest.mark.skip
def test_create_text_to_cad_model_feedback():
# Create our client.
client = ClientFromEnv()
result: Optional[Error] = create_text_to_cad_model_feedback.sync(
client=client,
id="<uuid>",
feedback=AiFeedback.THUMBS_UP,
)
if isinstance(result, Error) or result is None:
print(result)
raise Exception("Error in response")
body: Error = result
print(body)
# OR if you need more info (e.g. status_code)
response: Response[
Optional[Error]
] = create_text_to_cad_model_feedback.sync_detailed(
client=client,
id="<uuid>",
feedback=AiFeedback.THUMBS_UP,
)
# OR run async
@pytest.mark.asyncio
@pytest.mark.skip
async def test_create_text_to_cad_model_feedback_async():
# Create our client.
client = ClientFromEnv()
result: Optional[Error] = await create_text_to_cad_model_feedback.asyncio(
client=client,
id="<uuid>",
feedback=AiFeedback.THUMBS_UP,
)
# OR run async with more info
response: Response[
Optional[Error]
] = await create_text_to_cad_model_feedback.asyncio_detailed(
client=client,
id="<uuid>",
feedback=AiFeedback.THUMBS_UP,
)
@pytest.mark.skip
def test_list_users():
# Create our client.
@ -3611,6 +3692,12 @@ def test_modeling_commands_ws():
video_res_height=10,
video_res_width=10,
webrtc=False,
body=sdp_offer(
offer=RtcSessionDescription(
sdp="<string>",
type=RtcSdpType.UNSPECIFIED,
),
),
)
# Send a message.
@ -3636,6 +3723,12 @@ async def test_modeling_commands_ws_async():
video_res_height=10,
video_res_width=10,
webrtc=False,
body=sdp_offer(
offer=RtcSessionDescription(
sdp="<string>",
type=RtcSdpType.UNSPECIFIED,
),
),
)
# Send a message.

View File

@ -1,6 +1,7 @@
""" Contains all the data models used in inputs/outputs """
from .account_provider import AccountProvider
from .ai_feedback import AiFeedback
from .ai_plugin_api import AiPluginApi
from .ai_plugin_api_type import AiPluginApiType
from .ai_plugin_auth import AiPluginAuth
@ -85,12 +86,12 @@ from .file_system_metadata import FileSystemMetadata
from .file_volume import FileVolume
from .gateway import Gateway
from .get_entity_type import GetEntityType
from .get_sketch_mode_plane import GetSketchModePlane
from .gltf_presentation import GltfPresentation
from .gltf_storage import GltfStorage
from .highlight_set_entity import HighlightSetEntity
from .ice_server import IceServer
from .image_format import ImageFormat
from .image_type import ImageType
from .import_file import ImportFile
from .import_files import ImportFiles
from .input_format import InputFormat
@ -103,12 +104,12 @@ from .jetstream_config import JetstreamConfig
from .jetstream_stats import JetstreamStats
from .leaf_node import LeafNode
from .mass import Mass
from .mesh import Mesh
from .meta_cluster_info import MetaClusterInfo
from .metadata import Metadata
from .method import Method
from .modeling_cmd import ModelingCmd
from .modeling_cmd_id import ModelingCmdId
from .modeling_cmd_req import ModelingCmdReq
from .mouse_click import MouseClick
from .new_address import NewAddress
from .o_auth2_client_info import OAuth2ClientInfo
@ -121,6 +122,7 @@ from .output_format import OutputFormat
from .path_command import PathCommand
from .path_get_curve_uuids_for_vertices import PathGetCurveUuidsForVertices
from .path_get_info import PathGetInfo
from .path_get_vertex_uuids import PathGetVertexUuids
from .path_segment import PathSegment
from .path_segment_info import PathSegmentInfo
from .payment_intent import PaymentIntent
@ -131,7 +133,6 @@ from .plane_intersect_and_project import PlaneIntersectAndProject
from .ply_storage import PlyStorage
from .point2d import Point2d
from .point3d import Point3d
from .point_e_metadata import PointEMetadata
from .pong import Pong
from .raw_file import RawFile
from .rtc_ice_candidate_init import RtcIceCandidateInit
@ -152,6 +153,9 @@ from .success_web_socket_response import SuccessWebSocketResponse
from .surface_area import SurfaceArea
from .system import System
from .take_snapshot import TakeSnapshot
from .text_to_cad import TextToCad
from .text_to_cad_create_body import TextToCadCreateBody
from .text_to_cad_results_page import TextToCadResultsPage
from .unit_angle import UnitAngle
from .unit_angle_conversion import UnitAngleConversion
from .unit_area import UnitArea

View File

@ -0,0 +1,12 @@
from enum import Enum
class AiFeedback(str, Enum):
""" Human feedback on an AI response. """ # noqa: E501
"""# Thumbs up. """ # noqa: E501
THUMBS_UP = 'thumbs_up'
"""# Thumbs down. """ # noqa: E501
THUMBS_DOWN = 'thumbs_down'
def __str__(self) -> str:
return str(self.value)

View File

@ -4,6 +4,7 @@ from typing import Any, Dict, List, Type, TypeVar, Union
import attr
from dateutil.parser import isoparse
from ..models.ai_feedback import AiFeedback
from ..models.api_call_status import ApiCallStatus
from ..models.base64data import Base64Data
from ..models.file_export_format import FileExportFormat
@ -1174,4 +1175,209 @@ class file_surface_area:
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
AsyncApiCallOutput = Union[file_conversion, file_center_of_mass, file_mass, file_volume, file_density, file_surface_area]
BS = TypeVar("BS", bound="text_to_cad")
@attr.s(auto_attribs=True)
class text_to_cad:
""" Text to CAD. """ # noqa: E501
completed_at: Union[Unset, datetime.datetime] = UNSET
created_at: Union[Unset, datetime.datetime] = UNSET
error: Union[Unset, str] = UNSET
feedback: Union[Unset, AiFeedback] = UNSET
id: Union[Unset, str] = UNSET
model_version: Union[Unset, str] = UNSET
output_format: Union[Unset, FileExportFormat] = UNSET
outputs: Union[Unset, Dict[str, Base64Data]] = UNSET
prompt: Union[Unset, str] = UNSET
started_at: Union[Unset, datetime.datetime] = UNSET
status: Union[Unset, ApiCallStatus] = UNSET
type: str = "text_to_cad"
updated_at: Union[Unset, datetime.datetime] = UNSET
user_id: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
completed_at: Union[Unset, str] = UNSET
if not isinstance(self.completed_at, Unset):
completed_at = self.completed_at.isoformat()
created_at: Union[Unset, str] = UNSET
if not isinstance(self.created_at, Unset):
created_at = self.created_at.isoformat()
error = self.error
if not isinstance(self.feedback, Unset):
feedback = self.feedback
id = self.id
model_version = self.model_version
if not isinstance(self.output_format, Unset):
output_format = self.output_format
outputs: Union[Unset, Dict[str, str]] = UNSET
if not isinstance(self.outputs, Unset):
new_dict: Dict[str, str] = {}
for key, value in self.outputs.items():
new_dict[key] = value.get_encoded()
outputs = new_dict
prompt = self.prompt
started_at: Union[Unset, str] = UNSET
if not isinstance(self.started_at, Unset):
started_at = self.started_at.isoformat()
if not isinstance(self.status, Unset):
status = self.status
type = self.type
updated_at: Union[Unset, str] = UNSET
if not isinstance(self.updated_at, Unset):
updated_at = self.updated_at.isoformat()
user_id = self.user_id
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if completed_at is not UNSET:
field_dict['completed_at'] = completed_at
if created_at is not UNSET:
field_dict['created_at'] = created_at
if error is not UNSET:
field_dict['error'] = error
if feedback is not UNSET:
field_dict['feedback'] = feedback
if id is not UNSET:
field_dict['id'] = id
if model_version is not UNSET:
field_dict['model_version'] = model_version
if output_format is not UNSET:
field_dict['output_format'] = output_format
if outputs is not UNSET:
field_dict['outputs'] = outputs
if prompt is not UNSET:
field_dict['prompt'] = prompt
if started_at is not UNSET:
field_dict['started_at'] = started_at
if status is not UNSET:
field_dict['status'] = status
field_dict['type'] = type
if updated_at is not UNSET:
field_dict['updated_at'] = updated_at
if user_id is not UNSET:
field_dict['user_id'] = user_id
return field_dict
@classmethod
def from_dict(cls: Type[BS], src_dict: Dict[str, Any]) -> BS:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]
if isinstance(_completed_at, Unset):
completed_at = UNSET
else:
completed_at = isoparse(_completed_at)
_created_at = d.pop("created_at", UNSET)
created_at: Union[Unset, datetime.datetime]
if isinstance(_created_at, Unset):
created_at = UNSET
else:
created_at = isoparse(_created_at)
error = d.pop("error", UNSET)
_feedback = d.pop("feedback", UNSET)
feedback: Union[Unset, AiFeedback]
if isinstance(_feedback, Unset):
feedback = UNSET
else:
feedback = _feedback # type: ignore[arg-type]
_id = d.pop("id", UNSET)
id: Union[Unset, Uuid]
if isinstance(_id, Unset):
id = UNSET
else:
id = _id # type: ignore[arg-type]
model_version = d.pop("model_version", UNSET)
_output_format = d.pop("output_format", UNSET)
output_format: Union[Unset, FileExportFormat]
if isinstance(_output_format, Unset):
output_format = UNSET
else:
output_format = _output_format # type: ignore[arg-type]
_outputs = d.pop("outputs", UNSET)
if isinstance(_outputs, Unset):
outputs = UNSET
else:
new_map: Dict[str, Base64Data] = {}
for k, v in _outputs.items():
new_map[k] = Base64Data(bytes(v, 'utf-8'))
outputs = new_map # type: ignore
prompt = d.pop("prompt", UNSET)
_started_at = d.pop("started_at", UNSET)
started_at: Union[Unset, datetime.datetime]
if isinstance(_started_at, Unset):
started_at = UNSET
else:
started_at = isoparse(_started_at)
_status = d.pop("status", UNSET)
status: Union[Unset, ApiCallStatus]
if isinstance(_status, Unset):
status = UNSET
else:
status = _status # type: ignore[arg-type]
type = d.pop("type", UNSET)
_updated_at = d.pop("updated_at", UNSET)
updated_at: Union[Unset, datetime.datetime]
if isinstance(_updated_at, Unset):
updated_at = UNSET
else:
updated_at = isoparse(_updated_at)
user_id = d.pop("user_id", UNSET)
text_to_cad = cls(
completed_at= completed_at,
created_at= created_at,
error= error,
feedback= feedback,
id= id,
model_version= model_version,
output_format= output_format,
outputs= outputs,
prompt= prompt,
started_at= started_at,
status= status,
type= type,
updated_at= updated_at,
user_id= user_id,
)
text_to_cad.additional_properties = d
return text_to_cad
@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
AsyncApiCallOutput = Union[file_conversion, file_center_of_mass, file_mass, file_volume, file_density, file_surface_area, text_to_cad]

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
BS = TypeVar("BS", bound="AsyncApiCallResultsPage")
AH = TypeVar("AH", bound="AsyncApiCallResultsPage")
@attr.s(auto_attribs=True)
class AsyncApiCallResultsPage:
@ -33,7 +33,7 @@ class AsyncApiCallResultsPage:
return field_dict
@classmethod
def from_dict(cls: Type[BS], src_dict: Dict[str, Any]) -> BS:
def from_dict(cls: Type[AH], src_dict: Dict[str, Any]) -> AH:
d = src_dict.copy()
from ..models.async_api_call import AsyncApiCall
items = cast(List[AsyncApiCall], d.pop("items", UNSET))

View File

@ -15,6 +15,8 @@ class AsyncApiCallType(str, Enum):
FILE_DENSITY = 'file_density'
"""# File surface area. """ # noqa: E501
FILE_SURFACE_AREA = 'file_surface_area'
"""# Text to CAD. """ # noqa: E501
TEXT_TO_CAD = 'text_to_cad'
def __str__(self) -> str:
return str(self.value)

View File

@ -6,7 +6,7 @@ from ..models.axis import Axis
from ..models.direction import Direction
from ..types import UNSET, Unset
AH = TypeVar("AH", bound="AxisDirectionPair")
EG = TypeVar("EG", bound="AxisDirectionPair")
@attr.s(auto_attribs=True)
class AxisDirectionPair:
@ -33,7 +33,7 @@ class AxisDirectionPair:
return field_dict
@classmethod
def from_dict(cls: Type[AH], src_dict: Dict[str, Any]) -> AH:
def from_dict(cls: Type[EG], src_dict: Dict[str, Any]) -> EG:
d = src_dict.copy()
_axis = d.pop("axis", UNSET)
axis: Union[Unset, Axis]

View File

@ -5,7 +5,7 @@ import attr
from ..models.new_address import NewAddress
from ..types import UNSET, Unset
EG = TypeVar("EG", bound="BillingInfo")
JR = TypeVar("JR", bound="BillingInfo")
@attr.s(auto_attribs=True)
class BillingInfo:
@ -35,7 +35,7 @@ class BillingInfo:
return field_dict
@classmethod
def from_dict(cls: Type[EG], src_dict: Dict[str, Any]) -> EG:
def from_dict(cls: Type[JR], src_dict: Dict[str, Any]) -> JR:
d = src_dict.copy()
_address = d.pop("address", UNSET)
address: Union[Unset, NewAddress]

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
JR = TypeVar("JR", bound="CacheMetadata")
LY = TypeVar("LY", bound="CacheMetadata")
@attr.s(auto_attribs=True)
class CacheMetadata:
@ -27,7 +27,7 @@ This is mostly used for internal purposes and debugging. """ # noqa: E501
return field_dict
@classmethod
def from_dict(cls: Type[JR], src_dict: Dict[str, Any]) -> JR:
def from_dict(cls: Type[LY], src_dict: Dict[str, Any]) -> LY:
d = src_dict.copy()
ok = d.pop("ok", UNSET)

View File

@ -5,7 +5,7 @@ import attr
from ..models.payment_method_card_checks import PaymentMethodCardChecks
from ..types import UNSET, Unset
LY = TypeVar("LY", bound="CardDetails")
HK = TypeVar("HK", bound="CardDetails")
@attr.s(auto_attribs=True)
class CardDetails:
@ -55,7 +55,7 @@ class CardDetails:
return field_dict
@classmethod
def from_dict(cls: Type[LY], src_dict: Dict[str, Any]) -> LY:
def from_dict(cls: Type[HK], src_dict: Dict[str, Any]) -> HK:
d = src_dict.copy()
brand = d.pop("brand", UNSET)

View File

@ -6,7 +6,7 @@ from ..models.point3d import Point3d
from ..models.unit_length import UnitLength
from ..types import UNSET, Unset
HK = TypeVar("HK", bound="CenterOfMass")
VR = TypeVar("VR", bound="CenterOfMass")
@attr.s(auto_attribs=True)
class CenterOfMass:
@ -33,7 +33,7 @@ class CenterOfMass:
return field_dict
@classmethod
def from_dict(cls: Type[HK], src_dict: Dict[str, Any]) -> HK:
def from_dict(cls: Type[VR], src_dict: Dict[str, Any]) -> VR:
d = src_dict.copy()
_center_of_mass = d.pop("center_of_mass", UNSET)
center_of_mass: Union[Unset, Point3d]

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
VR = TypeVar("VR", bound="ClientMetrics")
ON = TypeVar("ON", bound="ClientMetrics")
@attr.s(auto_attribs=True)
class ClientMetrics:
@ -53,7 +53,7 @@ class ClientMetrics:
return field_dict
@classmethod
def from_dict(cls: Type[VR], src_dict: Dict[str, Any]) -> VR:
def from_dict(cls: Type[ON], src_dict: Dict[str, Any]) -> ON:
d = src_dict.copy()
rtc_frames_decoded = d.pop("rtc_frames_decoded", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
ON = TypeVar("ON", bound="Cluster")
PC = TypeVar("PC", bound="Cluster")
@attr.s(auto_attribs=True)
class Cluster:
@ -47,7 +47,7 @@ class Cluster:
return field_dict
@classmethod
def from_dict(cls: Type[ON], src_dict: Dict[str, Any]) -> ON:
def from_dict(cls: Type[PC], src_dict: Dict[str, Any]) -> PC:
d = src_dict.copy()
addr = d.pop("addr", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
PC = TypeVar("PC", bound="CodeOutput")
US = TypeVar("US", bound="CodeOutput")
@attr.s(auto_attribs=True)
class CodeOutput:
@ -37,7 +37,7 @@ class CodeOutput:
return field_dict
@classmethod
def from_dict(cls: Type[PC], src_dict: Dict[str, Any]) -> PC:
def from_dict(cls: Type[US], src_dict: Dict[str, Any]) -> US:
d = src_dict.copy()
from ..models.output_file import OutputFile
output_files = cast(List[OutputFile], d.pop("output_files", UNSET))

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
US = TypeVar("US", bound="Color")
KQ = TypeVar("KQ", bound="Color")
@attr.s(auto_attribs=True)
class Color:
@ -37,7 +37,7 @@ class Color:
return field_dict
@classmethod
def from_dict(cls: Type[US], src_dict: Dict[str, Any]) -> US:
def from_dict(cls: Type[KQ], src_dict: Dict[str, Any]) -> KQ:
d = src_dict.copy()
a = d.pop("a", UNSET)

View File

@ -10,7 +10,7 @@ from ..models.jetstream import Jetstream
from ..models.leaf_node import LeafNode
from ..types import UNSET, Unset
KQ = TypeVar("KQ", bound="Connection")
FH = TypeVar("FH", bound="Connection")
@attr.s(auto_attribs=True)
class Connection:
@ -224,7 +224,7 @@ This is mostly used for internal purposes and debugging. """ # noqa: E501
return field_dict
@classmethod
def from_dict(cls: Type[KQ], src_dict: Dict[str, Any]) -> KQ:
def from_dict(cls: Type[FH], src_dict: Dict[str, Any]) -> FH:
d = src_dict.copy()
auth_timeout = d.pop("auth_timeout", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
FH = TypeVar("FH", bound="Coupon")
NH = TypeVar("NH", bound="Coupon")
@attr.s(auto_attribs=True)
class Coupon:
@ -37,7 +37,7 @@ class Coupon:
return field_dict
@classmethod
def from_dict(cls: Type[FH], src_dict: Dict[str, Any]) -> FH:
def from_dict(cls: Type[NH], src_dict: Dict[str, Any]) -> NH:
d = src_dict.copy()
amount_off = d.pop("amount_off", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
NH = TypeVar("NH", bound="CurveGetControlPoints")
BB = TypeVar("BB", bound="CurveGetControlPoints")
@attr.s(auto_attribs=True)
class CurveGetControlPoints:
@ -29,7 +29,7 @@ class CurveGetControlPoints:
return field_dict
@classmethod
def from_dict(cls: Type[NH], src_dict: Dict[str, Any]) -> NH:
def from_dict(cls: Type[BB], src_dict: Dict[str, Any]) -> BB:
d = src_dict.copy()
from ..models.point3d import Point3d
control_points = cast(List[Point3d], d.pop("control_points", UNSET))

View File

@ -5,7 +5,7 @@ import attr
from ..models.point3d import Point3d
from ..types import UNSET, Unset
BB = TypeVar("BB", bound="CurveGetEndPoints")
PJ = TypeVar("PJ", bound="CurveGetEndPoints")
@attr.s(auto_attribs=True)
class CurveGetEndPoints:
@ -32,7 +32,7 @@ class CurveGetEndPoints:
return field_dict
@classmethod
def from_dict(cls: Type[BB], src_dict: Dict[str, Any]) -> BB:
def from_dict(cls: Type[PJ], src_dict: Dict[str, Any]) -> PJ:
d = src_dict.copy()
_end = d.pop("end", UNSET)
end: Union[Unset, Point3d]

View File

@ -5,7 +5,7 @@ import attr
from ..models.curve_type import CurveType
from ..types import UNSET, Unset
PJ = TypeVar("PJ", bound="CurveGetType")
TV = TypeVar("TV", bound="CurveGetType")
@attr.s(auto_attribs=True)
class CurveGetType:
@ -27,7 +27,7 @@ class CurveGetType:
return field_dict
@classmethod
def from_dict(cls: Type[PJ], src_dict: Dict[str, Any]) -> PJ:
def from_dict(cls: Type[TV], src_dict: Dict[str, Any]) -> TV:
d = src_dict.copy()
_curve_type = d.pop("curve_type", UNSET)
curve_type: Union[Unset, CurveType]

View File

@ -8,7 +8,7 @@ from ..models.currency import Currency
from ..models.new_address import NewAddress
from ..types import UNSET, Unset
TV = TypeVar("TV", bound="Customer")
CR = TypeVar("CR", bound="Customer")
@attr.s(auto_attribs=True)
class Customer:
@ -70,7 +70,7 @@ class Customer:
return field_dict
@classmethod
def from_dict(cls: Type[TV], src_dict: Dict[str, Any]) -> TV:
def from_dict(cls: Type[CR], src_dict: Dict[str, Any]) -> CR:
d = src_dict.copy()
_address = d.pop("address", UNSET)
address: Union[Unset, NewAddress]

View File

@ -7,7 +7,7 @@ from dateutil.parser import isoparse
from ..models.uuid import Uuid
from ..types import UNSET, Unset
CR = TypeVar("CR", bound="CustomerBalance")
CE = TypeVar("CE", bound="CustomerBalance")
@attr.s(auto_attribs=True)
class CustomerBalance:
@ -62,7 +62,7 @@ This holds information about the financial balance for the user. """ # noqa: E50
return field_dict
@classmethod
def from_dict(cls: Type[CR], src_dict: Dict[str, Any]) -> CR:
def from_dict(cls: Type[CE], src_dict: Dict[str, Any]) -> CE:
d = src_dict.copy()
_created_at = d.pop("created_at", UNSET)
created_at: Union[Unset, datetime.datetime]

View File

@ -5,7 +5,7 @@ import attr
from ..models.unit_density import UnitDensity
from ..types import UNSET, Unset
CE = TypeVar("CE", bound="Density")
MS = TypeVar("MS", bound="Density")
@attr.s(auto_attribs=True)
class Density:
@ -31,7 +31,7 @@ class Density:
return field_dict
@classmethod
def from_dict(cls: Type[CE], src_dict: Dict[str, Any]) -> CE:
def from_dict(cls: Type[MS], src_dict: Dict[str, Any]) -> MS:
d = src_dict.copy()
density = d.pop("density", UNSET)

View File

@ -5,7 +5,7 @@ import attr
from ..models.o_auth2_grant_type import OAuth2GrantType
from ..types import UNSET, Unset
MS = TypeVar("MS", bound="DeviceAccessTokenRequestForm")
LT = TypeVar("LT", bound="DeviceAccessTokenRequestForm")
@attr.s(auto_attribs=True)
class DeviceAccessTokenRequestForm:
@ -35,7 +35,7 @@ class DeviceAccessTokenRequestForm:
return field_dict
@classmethod
def from_dict(cls: Type[MS], src_dict: Dict[str, Any]) -> MS:
def from_dict(cls: Type[LT], src_dict: Dict[str, Any]) -> LT:
d = src_dict.copy()
client_id = d.pop("client_id", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
LT = TypeVar("LT", bound="DeviceAuthRequestForm")
ED = TypeVar("ED", bound="DeviceAuthRequestForm")
@attr.s(auto_attribs=True)
class DeviceAuthRequestForm:
@ -25,7 +25,7 @@ class DeviceAuthRequestForm:
return field_dict
@classmethod
def from_dict(cls: Type[LT], src_dict: Dict[str, Any]) -> LT:
def from_dict(cls: Type[ED], src_dict: Dict[str, Any]) -> ED:
d = src_dict.copy()
client_id = d.pop("client_id", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
ED = TypeVar("ED", bound="DeviceAuthVerifyParams")
YY = TypeVar("YY", bound="DeviceAuthVerifyParams")
@attr.s(auto_attribs=True)
class DeviceAuthVerifyParams:
@ -25,7 +25,7 @@ class DeviceAuthVerifyParams:
return field_dict
@classmethod
def from_dict(cls: Type[ED], src_dict: Dict[str, Any]) -> ED:
def from_dict(cls: Type[YY], src_dict: Dict[str, Any]) -> YY:
d = src_dict.copy()
user_code = d.pop("user_code", UNSET)

View File

@ -5,7 +5,7 @@ import attr
from ..models.coupon import Coupon
from ..types import UNSET, Unset
YY = TypeVar("YY", bound="Discount")
DO = TypeVar("DO", bound="Discount")
@attr.s(auto_attribs=True)
class Discount:
@ -27,7 +27,7 @@ class Discount:
return field_dict
@classmethod
def from_dict(cls: Type[YY], src_dict: Dict[str, Any]) -> YY:
def from_dict(cls: Type[DO], src_dict: Dict[str, Any]) -> DO:
d = src_dict.copy()
_coupon = d.pop("coupon", UNSET)
coupon: Union[Unset, Coupon]

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
DO = TypeVar("DO", bound="EmailAuthenticationForm")
FZ = TypeVar("FZ", bound="EmailAuthenticationForm")
@attr.s(auto_attribs=True)
class EmailAuthenticationForm:
@ -29,7 +29,7 @@ class EmailAuthenticationForm:
return field_dict
@classmethod
def from_dict(cls: Type[DO], src_dict: Dict[str, Any]) -> DO:
def from_dict(cls: Type[FZ], src_dict: Dict[str, Any]) -> FZ:
d = src_dict.copy()
callback_url = d.pop("callback_url", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
FZ = TypeVar("FZ", bound="EntityGetAllChildUuids")
GL = TypeVar("GL", bound="EntityGetAllChildUuids")
@attr.s(auto_attribs=True)
class EntityGetAllChildUuids:
@ -27,7 +27,7 @@ class EntityGetAllChildUuids:
return field_dict
@classmethod
def from_dict(cls: Type[FZ], src_dict: Dict[str, Any]) -> FZ:
def from_dict(cls: Type[GL], src_dict: Dict[str, Any]) -> GL:
d = src_dict.copy()
entity_ids = cast(List[str], d.pop("entity_ids", UNSET))

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
GL = TypeVar("GL", bound="EntityGetChildUuid")
NN = TypeVar("NN", bound="EntityGetChildUuid")
@attr.s(auto_attribs=True)
class EntityGetChildUuid:
@ -25,7 +25,7 @@ class EntityGetChildUuid:
return field_dict
@classmethod
def from_dict(cls: Type[GL], src_dict: Dict[str, Any]) -> GL:
def from_dict(cls: Type[NN], src_dict: Dict[str, Any]) -> NN:
d = src_dict.copy()
entity_id = d.pop("entity_id", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
NN = TypeVar("NN", bound="EntityGetNumChildren")
OH = TypeVar("OH", bound="EntityGetNumChildren")
@attr.s(auto_attribs=True)
class EntityGetNumChildren:
@ -25,7 +25,7 @@ class EntityGetNumChildren:
return field_dict
@classmethod
def from_dict(cls: Type[NN], src_dict: Dict[str, Any]) -> NN:
def from_dict(cls: Type[OH], src_dict: Dict[str, Any]) -> OH:
d = src_dict.copy()
num = d.pop("num", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
OH = TypeVar("OH", bound="EntityGetParentId")
VI = TypeVar("VI", bound="EntityGetParentId")
@attr.s(auto_attribs=True)
class EntityGetParentId:
@ -25,7 +25,7 @@ class EntityGetParentId:
return field_dict
@classmethod
def from_dict(cls: Type[OH], src_dict: Dict[str, Any]) -> OH:
def from_dict(cls: Type[VI], src_dict: Dict[str, Any]) -> VI:
d = src_dict.copy()
entity_id = d.pop("entity_id", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
VI = TypeVar("VI", bound="Error")
ET = TypeVar("ET", bound="Error")
@attr.s(auto_attribs=True)
class Error:
@ -33,7 +33,7 @@ class Error:
return field_dict
@classmethod
def from_dict(cls: Type[VI], src_dict: Dict[str, Any]) -> VI:
def from_dict(cls: Type[ET], src_dict: Dict[str, Any]) -> ET:
d = src_dict.copy()
error_code = d.pop("error_code", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
ET = TypeVar("ET", bound="Export")
QF = TypeVar("QF", bound="Export")
@attr.s(auto_attribs=True)
class Export:
@ -29,7 +29,7 @@ class Export:
return field_dict
@classmethod
def from_dict(cls: Type[ET], src_dict: Dict[str, Any]) -> ET:
def from_dict(cls: Type[QF], src_dict: Dict[str, Any]) -> QF:
d = src_dict.copy()
from ..models.export_file import ExportFile
files = cast(List[ExportFile], d.pop("files", UNSET))

View File

@ -5,7 +5,7 @@ import attr
from ..models.base64data import Base64Data
from ..types import UNSET, Unset
QF = TypeVar("QF", bound="ExportFile")
DI = TypeVar("DI", bound="ExportFile")
@attr.s(auto_attribs=True)
class ExportFile:
@ -32,7 +32,7 @@ class ExportFile:
return field_dict
@classmethod
def from_dict(cls: Type[QF], src_dict: Dict[str, Any]) -> QF:
def from_dict(cls: Type[DI], src_dict: Dict[str, Any]) -> DI:
d = src_dict.copy()
_contents = d.pop("contents", UNSET)
contents: Union[Unset, Base64Data]

View File

@ -6,7 +6,7 @@ from dateutil.parser import isoparse
from ..types import UNSET, Unset
DI = TypeVar("DI", bound="ExtendedUser")
OJ = TypeVar("OJ", bound="ExtendedUser")
@attr.s(auto_attribs=True)
class ExtendedUser:
@ -95,7 +95,7 @@ This is mostly used for internal purposes. It returns a mapping of the user's in
return field_dict
@classmethod
def from_dict(cls: Type[DI], src_dict: Dict[str, Any]) -> DI:
def from_dict(cls: Type[OJ], src_dict: Dict[str, Any]) -> OJ:
d = src_dict.copy()
company = d.pop("company", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
OJ = TypeVar("OJ", bound="ExtendedUserResultsPage")
UF = TypeVar("UF", bound="ExtendedUserResultsPage")
@attr.s(auto_attribs=True)
class ExtendedUserResultsPage:
@ -33,7 +33,7 @@ class ExtendedUserResultsPage:
return field_dict
@classmethod
def from_dict(cls: Type[OJ], src_dict: Dict[str, Any]) -> OJ:
def from_dict(cls: Type[UF], src_dict: Dict[str, Any]) -> UF:
d = src_dict.copy()
from ..models.extended_user import ExtendedUser
items = cast(List[ExtendedUser], d.pop("items", UNSET))

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
UF = TypeVar("UF", bound="FailureWebSocketResponse")
YF = TypeVar("YF", bound="FailureWebSocketResponse")
@attr.s(auto_attribs=True)
class FailureWebSocketResponse:
@ -37,7 +37,7 @@ class FailureWebSocketResponse:
return field_dict
@classmethod
def from_dict(cls: Type[UF], src_dict: Dict[str, Any]) -> UF:
def from_dict(cls: Type[YF], src_dict: Dict[str, Any]) -> YF:
d = src_dict.copy()
from ..models.api_error import ApiError
errors = cast(List[ApiError], d.pop("errors", UNSET))

View File

@ -11,7 +11,7 @@ from ..models.unit_length import UnitLength
from ..models.uuid import Uuid
from ..types import UNSET, Unset
YF = TypeVar("YF", bound="FileCenterOfMass")
PY = TypeVar("PY", bound="FileCenterOfMass")
@attr.s(auto_attribs=True)
class FileCenterOfMass:
@ -84,7 +84,7 @@ class FileCenterOfMass:
return field_dict
@classmethod
def from_dict(cls: Type[YF], src_dict: Dict[str, Any]) -> YF:
def from_dict(cls: Type[PY], src_dict: Dict[str, Any]) -> PY:
d = src_dict.copy()
_center_of_mass = d.pop("center_of_mass", UNSET)
center_of_mass: Union[Unset, Point3d]

View File

@ -13,7 +13,7 @@ from ..models.output_format import OutputFormat
from ..models.uuid import Uuid
from ..types import UNSET, Unset
PY = TypeVar("PY", bound="FileConversion")
LK = TypeVar("LK", bound="FileConversion")
@attr.s(auto_attribs=True)
class FileConversion:
@ -100,7 +100,7 @@ class FileConversion:
return field_dict
@classmethod
def from_dict(cls: Type[PY], src_dict: Dict[str, Any]) -> PY:
def from_dict(cls: Type[LK], src_dict: Dict[str, Any]) -> LK:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]

View File

@ -11,7 +11,7 @@ from ..models.unit_mass import UnitMass
from ..models.uuid import Uuid
from ..types import UNSET, Unset
LK = TypeVar("LK", bound="FileDensity")
AR = TypeVar("AR", bound="FileDensity")
@attr.s(auto_attribs=True)
class FileDensity:
@ -92,7 +92,7 @@ class FileDensity:
return field_dict
@classmethod
def from_dict(cls: Type[LK], src_dict: Dict[str, Any]) -> LK:
def from_dict(cls: Type[AR], src_dict: Dict[str, Any]) -> AR:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]

View File

@ -11,7 +11,7 @@ from ..models.unit_mass import UnitMass
from ..models.uuid import Uuid
from ..types import UNSET, Unset
AR = TypeVar("AR", bound="FileMass")
WB = TypeVar("WB", bound="FileMass")
@attr.s(auto_attribs=True)
class FileMass:
@ -92,7 +92,7 @@ class FileMass:
return field_dict
@classmethod
def from_dict(cls: Type[AR], src_dict: Dict[str, Any]) -> AR:
def from_dict(cls: Type[WB], src_dict: Dict[str, Any]) -> WB:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]

View File

@ -10,7 +10,7 @@ from ..models.unit_area import UnitArea
from ..models.uuid import Uuid
from ..types import UNSET, Unset
WB = TypeVar("WB", bound="FileSurfaceArea")
KK = TypeVar("KK", bound="FileSurfaceArea")
@attr.s(auto_attribs=True)
class FileSurfaceArea:
@ -82,7 +82,7 @@ class FileSurfaceArea:
return field_dict
@classmethod
def from_dict(cls: Type[WB], src_dict: Dict[str, Any]) -> WB:
def from_dict(cls: Type[KK], src_dict: Dict[str, Any]) -> KK:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
KK = TypeVar("KK", bound="FileSystemMetadata")
HC = TypeVar("HC", bound="FileSystemMetadata")
@attr.s(auto_attribs=True)
class FileSystemMetadata:
@ -27,7 +27,7 @@ This is mostly used for internal purposes and debugging. """ # noqa: E501
return field_dict
@classmethod
def from_dict(cls: Type[KK], src_dict: Dict[str, Any]) -> KK:
def from_dict(cls: Type[HC], src_dict: Dict[str, Any]) -> HC:
d = src_dict.copy()
ok = d.pop("ok", UNSET)

View File

@ -10,7 +10,7 @@ from ..models.unit_volume import UnitVolume
from ..models.uuid import Uuid
from ..types import UNSET, Unset
HC = TypeVar("HC", bound="FileVolume")
FM = TypeVar("FM", bound="FileVolume")
@attr.s(auto_attribs=True)
class FileVolume:
@ -82,7 +82,7 @@ class FileVolume:
return field_dict
@classmethod
def from_dict(cls: Type[HC], src_dict: Dict[str, Any]) -> HC:
def from_dict(cls: Type[FM], src_dict: Dict[str, Any]) -> FM:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
FM = TypeVar("FM", bound="Gateway")
PV = TypeVar("PV", bound="Gateway")
@attr.s(auto_attribs=True)
class Gateway:
@ -41,7 +41,7 @@ class Gateway:
return field_dict
@classmethod
def from_dict(cls: Type[FM], src_dict: Dict[str, Any]) -> FM:
def from_dict(cls: Type[PV], src_dict: Dict[str, Any]) -> PV:
d = src_dict.copy()
auth_timeout = d.pop("auth_timeout", UNSET)

View File

@ -5,7 +5,7 @@ import attr
from ..models.entity_type import EntityType
from ..types import UNSET, Unset
PV = TypeVar("PV", bound="GetEntityType")
QI = TypeVar("QI", bound="GetEntityType")
@attr.s(auto_attribs=True)
class GetEntityType:
@ -27,7 +27,7 @@ class GetEntityType:
return field_dict
@classmethod
def from_dict(cls: Type[PV], src_dict: Dict[str, Any]) -> PV:
def from_dict(cls: Type[QI], src_dict: Dict[str, Any]) -> QI:
d = src_dict.copy()
_entity_type = d.pop("entity_type", UNSET)
entity_type: Union[Unset, EntityType]

View File

@ -0,0 +1,87 @@
from typing import Any, Dict, List, Type, TypeVar, Union
import attr
from ..models.point3d import Point3d
from ..types import UNSET, Unset
TP = TypeVar("TP", bound="GetSketchModePlane")
@attr.s(auto_attribs=True)
class GetSketchModePlane:
""" The plane for sketch mode. """ # noqa: E501
x_axis: Union[Unset, Point3d] = UNSET
y_axis: Union[Unset, Point3d] = UNSET
z_axis: 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.x_axis, Unset):
x_axis = self.x_axis
if not isinstance(self.y_axis, Unset):
y_axis = self.y_axis
if not isinstance(self.z_axis, Unset):
z_axis = self.z_axis
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if x_axis is not UNSET:
field_dict['x_axis'] = x_axis
if y_axis is not UNSET:
field_dict['y_axis'] = y_axis
if z_axis is not UNSET:
field_dict['z_axis'] = z_axis
return field_dict
@classmethod
def from_dict(cls: Type[TP], src_dict: Dict[str, Any]) -> TP:
d = src_dict.copy()
_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]
_z_axis = d.pop("z_axis", UNSET)
z_axis: Union[Unset, Point3d]
if isinstance(_z_axis, Unset):
z_axis = UNSET
else:
z_axis = _z_axis # type: ignore[arg-type]
get_sketch_mode_plane = cls(
x_axis= x_axis,
y_axis= y_axis,
z_axis= z_axis,
)
get_sketch_mode_plane.additional_properties = d
return get_sketch_mode_plane
@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

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
QI = TypeVar("QI", bound="HighlightSetEntity")
CF = TypeVar("CF", bound="HighlightSetEntity")
@attr.s(auto_attribs=True)
class HighlightSetEntity:
@ -29,7 +29,7 @@ class HighlightSetEntity:
return field_dict
@classmethod
def from_dict(cls: Type[QI], src_dict: Dict[str, Any]) -> QI:
def from_dict(cls: Type[CF], src_dict: Dict[str, Any]) -> CF:
d = src_dict.copy()
entity_id = d.pop("entity_id", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
TP = TypeVar("TP", bound="IceServer")
OM = TypeVar("OM", bound="IceServer")
@attr.s(auto_attribs=True)
class IceServer:
@ -35,7 +35,7 @@ class IceServer:
return field_dict
@classmethod
def from_dict(cls: Type[TP], src_dict: Dict[str, Any]) -> TP:
def from_dict(cls: Type[OM], src_dict: Dict[str, Any]) -> OM:
d = src_dict.copy()
credential = d.pop("credential", UNSET)

View File

@ -1,10 +0,0 @@
from enum import Enum
class ImageType(str, Enum):
""" An enumeration. """ # noqa: E501
PNG = 'png'
JPG = 'jpg'
def __str__(self) -> str:
return str(self.value)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
CF = TypeVar("CF", bound="ImportFile")
EN = TypeVar("EN", bound="ImportFile")
@attr.s(auto_attribs=True)
class ImportFile:
@ -31,7 +31,7 @@ class ImportFile:
return field_dict
@classmethod
def from_dict(cls: Type[CF], src_dict: Dict[str, Any]) -> CF:
def from_dict(cls: Type[EN], src_dict: Dict[str, Any]) -> EN:
d = src_dict.copy()
data = cast(List[int], d.pop("data", UNSET))

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
OM = TypeVar("OM", bound="ImportFiles")
RS = TypeVar("RS", bound="ImportFiles")
@attr.s(auto_attribs=True)
class ImportFiles:
@ -25,7 +25,7 @@ class ImportFiles:
return field_dict
@classmethod
def from_dict(cls: Type[OM], src_dict: Dict[str, Any]) -> OM:
def from_dict(cls: Type[RS], src_dict: Dict[str, Any]) -> RS:
d = src_dict.copy()
object_id = d.pop("object_id", UNSET)

View File

@ -6,7 +6,7 @@ from ..models.system import System
from ..models.unit_length import UnitLength
from ..types import UNSET, Unset
EN = TypeVar("EN", bound="fbx")
LR = TypeVar("LR", bound="fbx")
@attr.s(auto_attribs=True)
class fbx:
@ -26,7 +26,7 @@ class fbx:
return field_dict
@classmethod
def from_dict(cls: Type[EN], src_dict: Dict[str, Any]) -> EN:
def from_dict(cls: Type[LR], src_dict: Dict[str, Any]) -> LR:
d = src_dict.copy()
type = d.pop("type", UNSET)
@ -57,7 +57,7 @@ class fbx:
RS = TypeVar("RS", bound="gltf")
MP = TypeVar("MP", bound="gltf")
@attr.s(auto_attribs=True)
class gltf:
@ -77,7 +77,7 @@ class gltf:
return field_dict
@classmethod
def from_dict(cls: Type[RS], src_dict: Dict[str, Any]) -> RS:
def from_dict(cls: Type[MP], src_dict: Dict[str, Any]) -> MP:
d = src_dict.copy()
type = d.pop("type", UNSET)
@ -108,7 +108,7 @@ class gltf:
LR = TypeVar("LR", bound="obj")
WF = TypeVar("WF", bound="obj")
@attr.s(auto_attribs=True)
class obj:
@ -138,7 +138,7 @@ class obj:
return field_dict
@classmethod
def from_dict(cls: Type[LR], src_dict: Dict[str, Any]) -> LR:
def from_dict(cls: Type[WF], src_dict: Dict[str, Any]) -> WF:
d = src_dict.copy()
_coords = d.pop("coords", UNSET)
coords: Union[Unset, System]
@ -185,7 +185,7 @@ class obj:
MP = TypeVar("MP", bound="ply")
RO = TypeVar("RO", bound="ply")
@attr.s(auto_attribs=True)
class ply:
@ -215,7 +215,7 @@ class ply:
return field_dict
@classmethod
def from_dict(cls: Type[MP], src_dict: Dict[str, Any]) -> MP:
def from_dict(cls: Type[RO], src_dict: Dict[str, Any]) -> RO:
d = src_dict.copy()
_coords = d.pop("coords", UNSET)
coords: Union[Unset, System]
@ -262,7 +262,7 @@ class ply:
WF = TypeVar("WF", bound="sldprt")
DN = TypeVar("DN", bound="sldprt")
@attr.s(auto_attribs=True)
class sldprt:
@ -282,7 +282,7 @@ class sldprt:
return field_dict
@classmethod
def from_dict(cls: Type[WF], src_dict: Dict[str, Any]) -> WF:
def from_dict(cls: Type[DN], src_dict: Dict[str, Any]) -> DN:
d = src_dict.copy()
type = d.pop("type", UNSET)
@ -313,7 +313,7 @@ class sldprt:
RO = TypeVar("RO", bound="step")
BA = TypeVar("BA", bound="step")
@attr.s(auto_attribs=True)
class step:
@ -333,7 +333,7 @@ class step:
return field_dict
@classmethod
def from_dict(cls: Type[RO], src_dict: Dict[str, Any]) -> RO:
def from_dict(cls: Type[BA], src_dict: Dict[str, Any]) -> BA:
d = src_dict.copy()
type = d.pop("type", UNSET)
@ -364,7 +364,7 @@ class step:
DN = TypeVar("DN", bound="stl")
OR = TypeVar("OR", bound="stl")
@attr.s(auto_attribs=True)
class stl:
@ -394,7 +394,7 @@ class stl:
return field_dict
@classmethod
def from_dict(cls: Type[DN], src_dict: Dict[str, Any]) -> DN:
def from_dict(cls: Type[OR], src_dict: Dict[str, Any]) -> OR:
d = src_dict.copy()
_coords = d.pop("coords", UNSET)
coords: Union[Unset, System]

View File

@ -8,7 +8,7 @@ from ..models.currency import Currency
from ..models.invoice_status import InvoiceStatus
from ..types import UNSET, Unset
BA = TypeVar("BA", bound="Invoice")
CB = TypeVar("CB", bound="Invoice")
@attr.s(auto_attribs=True)
class Invoice:
@ -138,7 +138,7 @@ class Invoice:
return field_dict
@classmethod
def from_dict(cls: Type[BA], src_dict: Dict[str, Any]) -> BA:
def from_dict(cls: Type[CB], src_dict: Dict[str, Any]) -> CB:
d = src_dict.copy()
amount_due = d.pop("amount_due", UNSET)

View File

@ -5,7 +5,7 @@ import attr
from ..models.currency import Currency
from ..types import UNSET, Unset
OR = TypeVar("OR", bound="InvoiceLineItem")
LC = TypeVar("LC", bound="InvoiceLineItem")
@attr.s(auto_attribs=True)
class InvoiceLineItem:
@ -48,7 +48,7 @@ class InvoiceLineItem:
return field_dict
@classmethod
def from_dict(cls: Type[OR], src_dict: Dict[str, Any]) -> OR:
def from_dict(cls: Type[LC], src_dict: Dict[str, Any]) -> LC:
d = src_dict.copy()
amount = d.pop("amount", UNSET)

View File

@ -7,7 +7,7 @@ from ..models.jetstream_stats import JetstreamStats
from ..models.meta_cluster_info import MetaClusterInfo
from ..types import UNSET, Unset
CB = TypeVar("CB", bound="Jetstream")
TO = TypeVar("TO", bound="Jetstream")
@attr.s(auto_attribs=True)
class Jetstream:
@ -39,7 +39,7 @@ class Jetstream:
return field_dict
@classmethod
def from_dict(cls: Type[CB], src_dict: Dict[str, Any]) -> CB:
def from_dict(cls: Type[TO], src_dict: Dict[str, Any]) -> TO:
d = src_dict.copy()
_config = d.pop("config", UNSET)
config: Union[Unset, JetstreamConfig]

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
LC = TypeVar("LC", bound="JetstreamApiStats")
ZP = TypeVar("ZP", bound="JetstreamApiStats")
@attr.s(auto_attribs=True)
class JetstreamApiStats:
@ -33,7 +33,7 @@ class JetstreamApiStats:
return field_dict
@classmethod
def from_dict(cls: Type[LC], src_dict: Dict[str, Any]) -> LC:
def from_dict(cls: Type[ZP], src_dict: Dict[str, Any]) -> ZP:
d = src_dict.copy()
errors = d.pop("errors", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
TO = TypeVar("TO", bound="JetstreamConfig")
EO = TypeVar("EO", bound="JetstreamConfig")
@attr.s(auto_attribs=True)
class JetstreamConfig:
@ -37,7 +37,7 @@ class JetstreamConfig:
return field_dict
@classmethod
def from_dict(cls: Type[TO], src_dict: Dict[str, Any]) -> TO:
def from_dict(cls: Type[EO], src_dict: Dict[str, Any]) -> EO:
d = src_dict.copy()
domain = d.pop("domain", UNSET)

View File

@ -5,7 +5,7 @@ import attr
from ..models.jetstream_api_stats import JetstreamApiStats
from ..types import UNSET, Unset
ZP = TypeVar("ZP", bound="JetstreamStats")
NY = TypeVar("NY", bound="JetstreamStats")
@attr.s(auto_attribs=True)
class JetstreamStats:
@ -51,7 +51,7 @@ class JetstreamStats:
return field_dict
@classmethod
def from_dict(cls: Type[ZP], src_dict: Dict[str, Any]) -> ZP:
def from_dict(cls: Type[NY], src_dict: Dict[str, Any]) -> NY:
d = src_dict.copy()
accounts = d.pop("accounts", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
EO = TypeVar("EO", bound="LeafNode")
QO = TypeVar("QO", bound="LeafNode")
@attr.s(auto_attribs=True)
class LeafNode:
@ -37,7 +37,7 @@ class LeafNode:
return field_dict
@classmethod
def from_dict(cls: Type[EO], src_dict: Dict[str, Any]) -> EO:
def from_dict(cls: Type[QO], src_dict: Dict[str, Any]) -> QO:
d = src_dict.copy()
auth_timeout = d.pop("auth_timeout", UNSET)

View File

@ -5,7 +5,7 @@ import attr
from ..models.unit_mass import UnitMass
from ..types import UNSET, Unset
NY = TypeVar("NY", bound="Mass")
KX = TypeVar("KX", bound="Mass")
@attr.s(auto_attribs=True)
class Mass:
@ -31,7 +31,7 @@ class Mass:
return field_dict
@classmethod
def from_dict(cls: Type[NY], src_dict: Dict[str, Any]) -> NY:
def from_dict(cls: Type[KX], src_dict: Dict[str, Any]) -> KX:
d = src_dict.copy()
mass = d.pop("mass", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
KX = TypeVar("KX", bound="MetaClusterInfo")
IZ = TypeVar("IZ", bound="MetaClusterInfo")
@attr.s(auto_attribs=True)
class MetaClusterInfo:
@ -33,7 +33,7 @@ class MetaClusterInfo:
return field_dict
@classmethod
def from_dict(cls: Type[KX], src_dict: Dict[str, Any]) -> KX:
def from_dict(cls: Type[IZ], src_dict: Dict[str, Any]) -> IZ:
d = src_dict.copy()
cluster_size = d.pop("cluster_size", UNSET)

View File

@ -6,10 +6,9 @@ from ..models.cache_metadata import CacheMetadata
from ..models.connection import Connection
from ..models.environment import Environment
from ..models.file_system_metadata import FileSystemMetadata
from ..models.point_e_metadata import PointEMetadata
from ..types import UNSET, Unset
IZ = TypeVar("IZ", bound="Metadata")
WO = TypeVar("WO", bound="Metadata")
@attr.s(auto_attribs=True)
class Metadata:
@ -20,7 +19,6 @@ This is mostly used for internal purposes and debugging. """ # noqa: E501
environment: Union[Unset, Environment] = UNSET
fs: Union[Unset, FileSystemMetadata] = UNSET
git_hash: Union[Unset, str] = UNSET
point_e: Union[Unset, PointEMetadata] = UNSET
pubsub: Union[Unset, Connection] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
@ -33,8 +31,6 @@ This is mostly used for internal purposes and debugging. """ # noqa: E501
if not isinstance(self.fs, Unset):
fs = self.fs
git_hash = self.git_hash
if not isinstance(self.point_e, Unset):
point_e = self.point_e
if not isinstance(self.pubsub, Unset):
pubsub = self.pubsub
@ -49,15 +45,13 @@ This is mostly used for internal purposes and debugging. """ # noqa: E501
field_dict['fs'] = fs
if git_hash is not UNSET:
field_dict['git_hash'] = git_hash
if point_e is not UNSET:
field_dict['point_e'] = point_e
if pubsub is not UNSET:
field_dict['pubsub'] = pubsub
return field_dict
@classmethod
def from_dict(cls: Type[IZ], src_dict: Dict[str, Any]) -> IZ:
def from_dict(cls: Type[WO], src_dict: Dict[str, Any]) -> WO:
d = src_dict.copy()
_cache = d.pop("cache", UNSET)
cache: Union[Unset, CacheMetadata]
@ -82,13 +76,6 @@ This is mostly used for internal purposes and debugging. """ # noqa: E501
git_hash = d.pop("git_hash", UNSET)
_point_e = d.pop("point_e", UNSET)
point_e: Union[Unset, PointEMetadata]
if isinstance(_point_e, Unset):
point_e = UNSET
else:
point_e = _point_e # type: ignore[arg-type]
_pubsub = d.pop("pubsub", UNSET)
pubsub: Union[Unset, Connection]
if isinstance(_pubsub, Unset):
@ -102,7 +89,6 @@ This is mostly used for internal purposes and debugging. """ # noqa: E501
environment= environment,
fs= fs,
git_hash= git_hash,
point_e= point_e,
pubsub= pubsub,
)

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,75 @@
from typing import Any, Dict, List, Type, TypeVar, Union
import attr
from ..models.modeling_cmd import ModelingCmd
from ..models.modeling_cmd_id import ModelingCmdId
from ..types import UNSET, Unset
GS = TypeVar("GS", bound="ModelingCmdReq")
@attr.s(auto_attribs=True)
class ModelingCmdReq:
""" A graphics command submitted to the KittyCAD engine via the Modeling API. """ # noqa: E501
cmd: Union[Unset, ModelingCmd] = UNSET
cmd_id: Union[Unset, ModelingCmdId] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
if not isinstance(self.cmd, Unset):
cmd = self.cmd
if not isinstance(self.cmd_id, Unset):
cmd_id = self.cmd_id
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if cmd is not UNSET:
field_dict['cmd'] = cmd
if cmd_id is not UNSET:
field_dict['cmd_id'] = cmd_id
return field_dict
@classmethod
def from_dict(cls: Type[GS], src_dict: Dict[str, Any]) -> GS:
d = src_dict.copy()
_cmd = d.pop("cmd", UNSET)
cmd: Union[Unset, ModelingCmd]
if isinstance(_cmd, Unset):
cmd = UNSET
else:
cmd = _cmd # type: ignore[arg-type]
_cmd_id = d.pop("cmd_id", UNSET)
cmd_id: Union[Unset, ModelingCmdId]
if isinstance(_cmd_id, Unset):
cmd_id = UNSET
else:
cmd_id = _cmd_id # type: ignore[arg-type]
modeling_cmd_req = cls(
cmd= cmd,
cmd_id= cmd_id,
)
modeling_cmd_req.additional_properties = d
return modeling_cmd_req
@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

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
JD = TypeVar("JD", bound="MouseClick")
SO = TypeVar("SO", bound="MouseClick")
@attr.s(auto_attribs=True)
class MouseClick:
@ -33,7 +33,7 @@ class MouseClick:
return field_dict
@classmethod
def from_dict(cls: Type[JD], src_dict: Dict[str, Any]) -> JD:
def from_dict(cls: Type[SO], src_dict: Dict[str, Any]) -> SO:
d = src_dict.copy()
entities_modified = cast(List[str], d.pop("entities_modified", UNSET))

View File

@ -5,7 +5,7 @@ import attr
from ..models.country_code import CountryCode
from ..types import UNSET, Unset
RZ = TypeVar("RZ", bound="NewAddress")
ZS = TypeVar("ZS", bound="NewAddress")
@attr.s(auto_attribs=True)
class NewAddress:
@ -51,7 +51,7 @@ class NewAddress:
return field_dict
@classmethod
def from_dict(cls: Type[RZ], src_dict: Dict[str, Any]) -> RZ:
def from_dict(cls: Type[ZS], src_dict: Dict[str, Any]) -> ZS:
d = src_dict.copy()
city = d.pop("city", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
BH = TypeVar("BH", bound="OAuth2ClientInfo")
AM = TypeVar("AM", bound="OAuth2ClientInfo")
@attr.s(auto_attribs=True)
class OAuth2ClientInfo:
@ -33,7 +33,7 @@ class OAuth2ClientInfo:
return field_dict
@classmethod
def from_dict(cls: Type[BH], src_dict: Dict[str, Any]) -> BH:
def from_dict(cls: Type[AM], src_dict: Dict[str, Any]) -> AM:
d = src_dict.copy()
csrf_token = d.pop("csrf_token", UNSET)

View File

@ -13,12 +13,14 @@ from ..models.entity_get_num_children import EntityGetNumChildren
from ..models.entity_get_parent_id import EntityGetParentId
from ..models.export import Export
from ..models.get_entity_type import GetEntityType
from ..models.get_sketch_mode_plane import GetSketchModePlane
from ..models.highlight_set_entity import HighlightSetEntity
from ..models.import_files import ImportFiles
from ..models.mass import Mass
from ..models.mouse_click import MouseClick
from ..models.path_get_curve_uuids_for_vertices import PathGetCurveUuidsForVertices
from ..models.path_get_info import PathGetInfo
from ..models.path_get_vertex_uuids import PathGetVertexUuids
from ..models.plane_intersect_and_project import PlaneIntersectAndProject
from ..models.select_get import SelectGet
from ..models.select_with_point import SelectWithPoint
@ -32,7 +34,7 @@ from ..models.take_snapshot import TakeSnapshot
from ..models.volume import Volume
from ..types import UNSET, Unset
SX = TypeVar("SX", bound="empty")
GK = TypeVar("GK", bound="empty")
@attr.s(auto_attribs=True)
class empty:
@ -52,7 +54,7 @@ class empty:
return field_dict
@classmethod
def from_dict(cls: Type[SX], src_dict: Dict[str, Any]) -> SX:
def from_dict(cls: Type[GK], src_dict: Dict[str, Any]) -> GK:
d = src_dict.copy()
type = d.pop("type", UNSET)
@ -83,7 +85,7 @@ class empty:
CN = TypeVar("CN", bound="export")
SG = TypeVar("SG", bound="export")
@attr.s(auto_attribs=True)
class export:
@ -108,7 +110,7 @@ class export:
return field_dict
@classmethod
def from_dict(cls: Type[CN], src_dict: Dict[str, Any]) -> CN:
def from_dict(cls: Type[SG], src_dict: Dict[str, Any]) -> SG:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, Export]
@ -147,7 +149,7 @@ class export:
GS = TypeVar("GS", bound="select_with_point")
QZ = TypeVar("QZ", bound="select_with_point")
@attr.s(auto_attribs=True)
class select_with_point:
@ -172,7 +174,7 @@ class select_with_point:
return field_dict
@classmethod
def from_dict(cls: Type[GS], src_dict: Dict[str, Any]) -> GS:
def from_dict(cls: Type[QZ], src_dict: Dict[str, Any]) -> QZ:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, SelectWithPoint]
@ -211,7 +213,7 @@ class select_with_point:
SO = TypeVar("SO", bound="highlight_set_entity")
SY = TypeVar("SY", bound="highlight_set_entity")
@attr.s(auto_attribs=True)
class highlight_set_entity:
@ -236,7 +238,7 @@ class highlight_set_entity:
return field_dict
@classmethod
def from_dict(cls: Type[SO], src_dict: Dict[str, Any]) -> SO:
def from_dict(cls: Type[SY], src_dict: Dict[str, Any]) -> SY:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, HighlightSetEntity]
@ -275,7 +277,7 @@ class highlight_set_entity:
ZS = TypeVar("ZS", bound="entity_get_child_uuid")
YK = TypeVar("YK", bound="entity_get_child_uuid")
@attr.s(auto_attribs=True)
class entity_get_child_uuid:
@ -300,7 +302,7 @@ class entity_get_child_uuid:
return field_dict
@classmethod
def from_dict(cls: Type[ZS], src_dict: Dict[str, Any]) -> ZS:
def from_dict(cls: Type[YK], src_dict: Dict[str, Any]) -> YK:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, EntityGetChildUuid]
@ -339,7 +341,7 @@ class entity_get_child_uuid:
AM = TypeVar("AM", bound="entity_get_num_children")
WS = TypeVar("WS", bound="entity_get_num_children")
@attr.s(auto_attribs=True)
class entity_get_num_children:
@ -364,7 +366,7 @@ class entity_get_num_children:
return field_dict
@classmethod
def from_dict(cls: Type[AM], src_dict: Dict[str, Any]) -> AM:
def from_dict(cls: Type[WS], src_dict: Dict[str, Any]) -> WS:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, EntityGetNumChildren]
@ -403,7 +405,7 @@ class entity_get_num_children:
GK = TypeVar("GK", bound="entity_get_parent_id")
SL = TypeVar("SL", bound="entity_get_parent_id")
@attr.s(auto_attribs=True)
class entity_get_parent_id:
@ -428,7 +430,7 @@ class entity_get_parent_id:
return field_dict
@classmethod
def from_dict(cls: Type[GK], src_dict: Dict[str, Any]) -> GK:
def from_dict(cls: Type[SL], src_dict: Dict[str, Any]) -> SL:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, EntityGetParentId]
@ -467,7 +469,7 @@ class entity_get_parent_id:
SG = TypeVar("SG", bound="entity_get_all_child_uuids")
MK = TypeVar("MK", bound="entity_get_all_child_uuids")
@attr.s(auto_attribs=True)
class entity_get_all_child_uuids:
@ -492,7 +494,7 @@ class entity_get_all_child_uuids:
return field_dict
@classmethod
def from_dict(cls: Type[SG], src_dict: Dict[str, Any]) -> SG:
def from_dict(cls: Type[MK], src_dict: Dict[str, Any]) -> MK:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, EntityGetAllChildUuids]
@ -531,7 +533,7 @@ class entity_get_all_child_uuids:
QZ = TypeVar("QZ", bound="select_get")
TU = TypeVar("TU", bound="select_get")
@attr.s(auto_attribs=True)
class select_get:
@ -556,7 +558,7 @@ class select_get:
return field_dict
@classmethod
def from_dict(cls: Type[QZ], src_dict: Dict[str, Any]) -> QZ:
def from_dict(cls: Type[TU], src_dict: Dict[str, Any]) -> TU:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, SelectGet]
@ -595,7 +597,7 @@ class select_get:
SY = TypeVar("SY", bound="get_entity_type")
FY = TypeVar("FY", bound="get_entity_type")
@attr.s(auto_attribs=True)
class get_entity_type:
@ -620,7 +622,7 @@ class get_entity_type:
return field_dict
@classmethod
def from_dict(cls: Type[SY], src_dict: Dict[str, Any]) -> SY:
def from_dict(cls: Type[FY], src_dict: Dict[str, Any]) -> FY:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, GetEntityType]
@ -659,7 +661,7 @@ class get_entity_type:
YK = TypeVar("YK", bound="solid3d_get_all_edge_faces")
FD = TypeVar("FD", bound="solid3d_get_all_edge_faces")
@attr.s(auto_attribs=True)
class solid3d_get_all_edge_faces:
@ -684,7 +686,7 @@ class solid3d_get_all_edge_faces:
return field_dict
@classmethod
def from_dict(cls: Type[YK], src_dict: Dict[str, Any]) -> YK:
def from_dict(cls: Type[FD], src_dict: Dict[str, Any]) -> FD:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, Solid3dGetAllEdgeFaces]
@ -723,7 +725,7 @@ class solid3d_get_all_edge_faces:
WS = TypeVar("WS", bound="solid3d_get_all_opposite_edges")
TZ = TypeVar("TZ", bound="solid3d_get_all_opposite_edges")
@attr.s(auto_attribs=True)
class solid3d_get_all_opposite_edges:
@ -748,7 +750,7 @@ class solid3d_get_all_opposite_edges:
return field_dict
@classmethod
def from_dict(cls: Type[WS], src_dict: Dict[str, Any]) -> WS:
def from_dict(cls: Type[TZ], src_dict: Dict[str, Any]) -> TZ:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, Solid3dGetAllOppositeEdges]
@ -787,7 +789,7 @@ class solid3d_get_all_opposite_edges:
SL = TypeVar("SL", bound="solid3d_get_opposite_edge")
AX = TypeVar("AX", bound="solid3d_get_opposite_edge")
@attr.s(auto_attribs=True)
class solid3d_get_opposite_edge:
@ -812,7 +814,7 @@ class solid3d_get_opposite_edge:
return field_dict
@classmethod
def from_dict(cls: Type[SL], src_dict: Dict[str, Any]) -> SL:
def from_dict(cls: Type[AX], src_dict: Dict[str, Any]) -> AX:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, Solid3dGetOppositeEdge]
@ -851,7 +853,7 @@ class solid3d_get_opposite_edge:
MK = TypeVar("MK", bound="solid3d_get_prev_adjacent_edge")
RQ = TypeVar("RQ", bound="solid3d_get_prev_adjacent_edge")
@attr.s(auto_attribs=True)
class solid3d_get_prev_adjacent_edge:
@ -876,7 +878,7 @@ class solid3d_get_prev_adjacent_edge:
return field_dict
@classmethod
def from_dict(cls: Type[MK], src_dict: Dict[str, Any]) -> MK:
def from_dict(cls: Type[RQ], src_dict: Dict[str, Any]) -> RQ:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, Solid3dGetPrevAdjacentEdge]
@ -915,7 +917,7 @@ class solid3d_get_prev_adjacent_edge:
TU = TypeVar("TU", bound="solid3d_get_next_adjacent_edge")
ZL = TypeVar("ZL", bound="solid3d_get_next_adjacent_edge")
@attr.s(auto_attribs=True)
class solid3d_get_next_adjacent_edge:
@ -940,7 +942,7 @@ class solid3d_get_next_adjacent_edge:
return field_dict
@classmethod
def from_dict(cls: Type[TU], src_dict: Dict[str, Any]) -> TU:
def from_dict(cls: Type[ZL], src_dict: Dict[str, Any]) -> ZL:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, Solid3dGetNextAdjacentEdge]
@ -979,7 +981,7 @@ class solid3d_get_next_adjacent_edge:
FY = TypeVar("FY", bound="mouse_click")
CM = TypeVar("CM", bound="mouse_click")
@attr.s(auto_attribs=True)
class mouse_click:
@ -1004,7 +1006,7 @@ class mouse_click:
return field_dict
@classmethod
def from_dict(cls: Type[FY], src_dict: Dict[str, Any]) -> FY:
def from_dict(cls: Type[CM], src_dict: Dict[str, Any]) -> CM:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, MouseClick]
@ -1043,7 +1045,7 @@ class mouse_click:
FD = TypeVar("FD", bound="curve_get_type")
OS = TypeVar("OS", bound="curve_get_type")
@attr.s(auto_attribs=True)
class curve_get_type:
@ -1068,7 +1070,7 @@ class curve_get_type:
return field_dict
@classmethod
def from_dict(cls: Type[FD], src_dict: Dict[str, Any]) -> FD:
def from_dict(cls: Type[OS], src_dict: Dict[str, Any]) -> OS:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, CurveGetType]
@ -1107,7 +1109,7 @@ class curve_get_type:
TZ = TypeVar("TZ", bound="curve_get_control_points")
WP = TypeVar("WP", bound="curve_get_control_points")
@attr.s(auto_attribs=True)
class curve_get_control_points:
@ -1132,7 +1134,7 @@ class curve_get_control_points:
return field_dict
@classmethod
def from_dict(cls: Type[TZ], src_dict: Dict[str, Any]) -> TZ:
def from_dict(cls: Type[WP], src_dict: Dict[str, Any]) -> WP:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, CurveGetControlPoints]
@ -1171,7 +1173,7 @@ class curve_get_control_points:
AX = TypeVar("AX", bound="take_snapshot")
XO = TypeVar("XO", bound="take_snapshot")
@attr.s(auto_attribs=True)
class take_snapshot:
@ -1196,7 +1198,7 @@ class take_snapshot:
return field_dict
@classmethod
def from_dict(cls: Type[AX], src_dict: Dict[str, Any]) -> AX:
def from_dict(cls: Type[XO], src_dict: Dict[str, Any]) -> XO:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, TakeSnapshot]
@ -1235,7 +1237,7 @@ class take_snapshot:
RQ = TypeVar("RQ", bound="path_get_info")
LN = TypeVar("LN", bound="path_get_info")
@attr.s(auto_attribs=True)
class path_get_info:
@ -1260,7 +1262,7 @@ class path_get_info:
return field_dict
@classmethod
def from_dict(cls: Type[RQ], src_dict: Dict[str, Any]) -> RQ:
def from_dict(cls: Type[LN], src_dict: Dict[str, Any]) -> LN:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, PathGetInfo]
@ -1299,7 +1301,7 @@ class path_get_info:
ZL = TypeVar("ZL", bound="path_get_curve_uuids_for_vertices")
KR = TypeVar("KR", bound="path_get_curve_uuids_for_vertices")
@attr.s(auto_attribs=True)
class path_get_curve_uuids_for_vertices:
@ -1324,7 +1326,7 @@ class path_get_curve_uuids_for_vertices:
return field_dict
@classmethod
def from_dict(cls: Type[ZL], src_dict: Dict[str, Any]) -> ZL:
def from_dict(cls: Type[KR], src_dict: Dict[str, Any]) -> KR:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, PathGetCurveUuidsForVertices]
@ -1363,7 +1365,71 @@ class path_get_curve_uuids_for_vertices:
CM = TypeVar("CM", bound="plane_intersect_and_project")
MG = TypeVar("MG", bound="path_get_vertex_uuids")
@attr.s(auto_attribs=True)
class path_get_vertex_uuids:
""" The response from the `Path Get Vertex UUIDs` command. """ # noqa: E501
data: Union[Unset, PathGetVertexUuids] = UNSET
type: str = "path_get_vertex_uuids"
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
if not isinstance(self.data, Unset):
data = self.data
type = self.type
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if data is not UNSET:
field_dict['data'] = data
field_dict['type'] = type
return field_dict
@classmethod
def from_dict(cls: Type[MG], src_dict: Dict[str, Any]) -> MG:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, PathGetVertexUuids]
if isinstance(_data, Unset):
data = UNSET
else:
data = _data # type: ignore[arg-type]
type = d.pop("type", UNSET)
path_get_vertex_uuids = cls(
data= data,
type= type,
)
path_get_vertex_uuids.additional_properties = d
return path_get_vertex_uuids
@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
UE = TypeVar("UE", bound="plane_intersect_and_project")
@attr.s(auto_attribs=True)
class plane_intersect_and_project:
@ -1388,7 +1454,7 @@ class plane_intersect_and_project:
return field_dict
@classmethod
def from_dict(cls: Type[CM], src_dict: Dict[str, Any]) -> CM:
def from_dict(cls: Type[UE], src_dict: Dict[str, Any]) -> UE:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, PlaneIntersectAndProject]
@ -1427,7 +1493,7 @@ class plane_intersect_and_project:
OS = TypeVar("OS", bound="curve_get_end_points")
BF = TypeVar("BF", bound="curve_get_end_points")
@attr.s(auto_attribs=True)
class curve_get_end_points:
@ -1452,7 +1518,7 @@ class curve_get_end_points:
return field_dict
@classmethod
def from_dict(cls: Type[OS], src_dict: Dict[str, Any]) -> OS:
def from_dict(cls: Type[BF], src_dict: Dict[str, Any]) -> BF:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, CurveGetEndPoints]
@ -1491,7 +1557,7 @@ class curve_get_end_points:
WP = TypeVar("WP", bound="import_files")
UU = TypeVar("UU", bound="import_files")
@attr.s(auto_attribs=True)
class import_files:
@ -1516,7 +1582,7 @@ class import_files:
return field_dict
@classmethod
def from_dict(cls: Type[WP], src_dict: Dict[str, Any]) -> WP:
def from_dict(cls: Type[UU], src_dict: Dict[str, Any]) -> UU:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, ImportFiles]
@ -1555,7 +1621,7 @@ class import_files:
XO = TypeVar("XO", bound="mass")
MB = TypeVar("MB", bound="mass")
@attr.s(auto_attribs=True)
class mass:
@ -1580,7 +1646,7 @@ class mass:
return field_dict
@classmethod
def from_dict(cls: Type[XO], src_dict: Dict[str, Any]) -> XO:
def from_dict(cls: Type[MB], src_dict: Dict[str, Any]) -> MB:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, Mass]
@ -1619,7 +1685,7 @@ class mass:
LN = TypeVar("LN", bound="volume")
TB = TypeVar("TB", bound="volume")
@attr.s(auto_attribs=True)
class volume:
@ -1644,7 +1710,7 @@ class volume:
return field_dict
@classmethod
def from_dict(cls: Type[LN], src_dict: Dict[str, Any]) -> LN:
def from_dict(cls: Type[TB], src_dict: Dict[str, Any]) -> TB:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, Volume]
@ -1683,7 +1749,7 @@ class volume:
KR = TypeVar("KR", bound="density")
FJ = TypeVar("FJ", bound="density")
@attr.s(auto_attribs=True)
class density:
@ -1708,7 +1774,7 @@ class density:
return field_dict
@classmethod
def from_dict(cls: Type[KR], src_dict: Dict[str, Any]) -> KR:
def from_dict(cls: Type[FJ], src_dict: Dict[str, Any]) -> FJ:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, Density]
@ -1747,7 +1813,7 @@ class density:
MG = TypeVar("MG", bound="surface_area")
HB = TypeVar("HB", bound="surface_area")
@attr.s(auto_attribs=True)
class surface_area:
@ -1772,7 +1838,7 @@ class surface_area:
return field_dict
@classmethod
def from_dict(cls: Type[MG], src_dict: Dict[str, Any]) -> MG:
def from_dict(cls: Type[HB], src_dict: Dict[str, Any]) -> HB:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, SurfaceArea]
@ -1811,7 +1877,7 @@ class surface_area:
UE = TypeVar("UE", bound="center_of_mass")
SF = TypeVar("SF", bound="center_of_mass")
@attr.s(auto_attribs=True)
class center_of_mass:
@ -1836,7 +1902,7 @@ class center_of_mass:
return field_dict
@classmethod
def from_dict(cls: Type[UE], src_dict: Dict[str, Any]) -> UE:
def from_dict(cls: Type[SF], src_dict: Dict[str, Any]) -> SF:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, CenterOfMass]
@ -1872,4 +1938,68 @@ class center_of_mass:
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
OkModelingCmdResponse = Union[empty, export, select_with_point, highlight_set_entity, entity_get_child_uuid, entity_get_num_children, entity_get_parent_id, entity_get_all_child_uuids, select_get, get_entity_type, solid3d_get_all_edge_faces, solid3d_get_all_opposite_edges, solid3d_get_opposite_edge, solid3d_get_prev_adjacent_edge, solid3d_get_next_adjacent_edge, mouse_click, curve_get_type, curve_get_control_points, take_snapshot, path_get_info, path_get_curve_uuids_for_vertices, plane_intersect_and_project, curve_get_end_points, import_files, mass, volume, density, surface_area, center_of_mass]
DU = TypeVar("DU", bound="get_sketch_mode_plane")
@attr.s(auto_attribs=True)
class get_sketch_mode_plane:
""" The response from the `GetSketchModePlane` command. """ # noqa: E501
data: Union[Unset, GetSketchModePlane] = UNSET
type: str = "get_sketch_mode_plane"
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
if not isinstance(self.data, Unset):
data = self.data
type = self.type
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if data is not UNSET:
field_dict['data'] = data
field_dict['type'] = type
return field_dict
@classmethod
def from_dict(cls: Type[DU], src_dict: Dict[str, Any]) -> DU:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, GetSketchModePlane]
if isinstance(_data, Unset):
data = UNSET
else:
data = _data # type: ignore[arg-type]
type = d.pop("type", UNSET)
get_sketch_mode_plane = cls(
data= data,
type= type,
)
get_sketch_mode_plane.additional_properties = d
return get_sketch_mode_plane
@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
OkModelingCmdResponse = Union[empty, export, select_with_point, highlight_set_entity, entity_get_child_uuid, entity_get_num_children, entity_get_parent_id, entity_get_all_child_uuids, select_get, get_entity_type, solid3d_get_all_edge_faces, solid3d_get_all_opposite_edges, solid3d_get_opposite_edge, solid3d_get_prev_adjacent_edge, solid3d_get_next_adjacent_edge, mouse_click, curve_get_type, curve_get_control_points, take_snapshot, path_get_info, path_get_curve_uuids_for_vertices, path_get_vertex_uuids, plane_intersect_and_project, curve_get_end_points, import_files, mass, volume, density, surface_area, center_of_mass, get_sketch_mode_plane]

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
BF = TypeVar("BF", bound="ice_server_info")
BM = TypeVar("BM", bound="ice_server_info")
@attr.s(auto_attribs=True)
class ice_server_info:
@ -28,7 +28,7 @@ class ice_server_info:
return field_dict
@classmethod
def from_dict(cls: Type[BF], src_dict: Dict[str, Any]) -> BF:
def from_dict(cls: Type[BM], src_dict: Dict[str, Any]) -> BM:
d = src_dict.copy()
data = d.pop("data", UNSET)
type = d.pop("type", UNSET)
@ -61,7 +61,7 @@ class ice_server_info:
UU = TypeVar("UU", bound="trickle_ice")
TY = TypeVar("TY", bound="trickle_ice")
@attr.s(auto_attribs=True)
class trickle_ice:
@ -85,7 +85,7 @@ class trickle_ice:
return field_dict
@classmethod
def from_dict(cls: Type[UU], src_dict: Dict[str, Any]) -> UU:
def from_dict(cls: Type[TY], src_dict: Dict[str, Any]) -> TY:
d = src_dict.copy()
data = d.pop("data", UNSET)
type = d.pop("type", UNSET)
@ -118,7 +118,7 @@ class trickle_ice:
MB = TypeVar("MB", bound="sdp_answer")
NC = TypeVar("NC", bound="sdp_answer")
@attr.s(auto_attribs=True)
class sdp_answer:
@ -142,7 +142,7 @@ class sdp_answer:
return field_dict
@classmethod
def from_dict(cls: Type[MB], src_dict: Dict[str, Any]) -> MB:
def from_dict(cls: Type[NC], src_dict: Dict[str, Any]) -> NC:
d = src_dict.copy()
data = d.pop("data", UNSET)
type = d.pop("type", UNSET)
@ -175,7 +175,7 @@ class sdp_answer:
TB = TypeVar("TB", bound="modeling")
GP = TypeVar("GP", bound="modeling")
@attr.s(auto_attribs=True)
class modeling:
@ -199,7 +199,7 @@ class modeling:
return field_dict
@classmethod
def from_dict(cls: Type[TB], src_dict: Dict[str, Any]) -> TB:
def from_dict(cls: Type[GP], src_dict: Dict[str, Any]) -> GP:
d = src_dict.copy()
data = d.pop("data", UNSET)
type = d.pop("type", UNSET)
@ -232,7 +232,7 @@ class modeling:
FJ = TypeVar("FJ", bound="export")
FF = TypeVar("FF", bound="export")
@attr.s(auto_attribs=True)
class export:
@ -256,7 +256,7 @@ class export:
return field_dict
@classmethod
def from_dict(cls: Type[FJ], src_dict: Dict[str, Any]) -> FJ:
def from_dict(cls: Type[FF], src_dict: Dict[str, Any]) -> FF:
d = src_dict.copy()
data = d.pop("data", UNSET)
type = d.pop("type", UNSET)
@ -289,7 +289,7 @@ class export:
HB = TypeVar("HB", bound="metrics_request")
YO = TypeVar("YO", bound="metrics_request")
@attr.s(auto_attribs=True)
class metrics_request:
@ -313,7 +313,7 @@ class metrics_request:
return field_dict
@classmethod
def from_dict(cls: Type[HB], src_dict: Dict[str, Any]) -> HB:
def from_dict(cls: Type[YO], src_dict: Dict[str, Any]) -> YO:
d = src_dict.copy()
data = d.pop("data", UNSET)
type = d.pop("type", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
SF = TypeVar("SF", bound="Onboarding")
FS = TypeVar("FS", bound="Onboarding")
@attr.s(auto_attribs=True)
class Onboarding:
@ -33,7 +33,7 @@ class Onboarding:
return field_dict
@classmethod
def from_dict(cls: Type[SF], src_dict: Dict[str, Any]) -> SF:
def from_dict(cls: Type[FS], src_dict: Dict[str, Any]) -> FS:
d = src_dict.copy()
first_call_from__their_machine_date = d.pop("first_call_from_their_machine_date", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
DU = TypeVar("DU", bound="OutputFile")
WN = TypeVar("WN", bound="OutputFile")
@attr.s(auto_attribs=True)
class OutputFile:
@ -29,7 +29,7 @@ class OutputFile:
return field_dict
@classmethod
def from_dict(cls: Type[DU], src_dict: Dict[str, Any]) -> DU:
def from_dict(cls: Type[WN], src_dict: Dict[str, Any]) -> WN:
d = src_dict.copy()
contents = d.pop("contents", UNSET)

View File

@ -11,7 +11,7 @@ from ..models.system import System
from ..models.unit_length import UnitLength
from ..types import UNSET, Unset
BM = TypeVar("BM", bound="fbx")
EQ = TypeVar("EQ", bound="fbx")
@attr.s(auto_attribs=True)
class fbx:
@ -36,7 +36,7 @@ class fbx:
return field_dict
@classmethod
def from_dict(cls: Type[BM], src_dict: Dict[str, Any]) -> BM:
def from_dict(cls: Type[EQ], src_dict: Dict[str, Any]) -> EQ:
d = src_dict.copy()
_storage = d.pop("storage", UNSET)
storage: Union[Unset, FbxStorage]
@ -75,7 +75,7 @@ class fbx:
TY = TypeVar("TY", bound="gltf")
UW = TypeVar("UW", bound="gltf")
@attr.s(auto_attribs=True)
class gltf:
@ -105,7 +105,7 @@ class gltf:
return field_dict
@classmethod
def from_dict(cls: Type[TY], src_dict: Dict[str, Any]) -> TY:
def from_dict(cls: Type[UW], src_dict: Dict[str, Any]) -> UW:
d = src_dict.copy()
_presentation = d.pop("presentation", UNSET)
presentation: Union[Unset, GltfPresentation]
@ -152,7 +152,7 @@ class gltf:
NC = TypeVar("NC", bound="obj")
MD = TypeVar("MD", bound="obj")
@attr.s(auto_attribs=True)
class obj:
@ -182,7 +182,7 @@ class obj:
return field_dict
@classmethod
def from_dict(cls: Type[NC], src_dict: Dict[str, Any]) -> NC:
def from_dict(cls: Type[MD], src_dict: Dict[str, Any]) -> MD:
d = src_dict.copy()
_coords = d.pop("coords", UNSET)
coords: Union[Unset, System]
@ -229,7 +229,7 @@ class obj:
GP = TypeVar("GP", bound="ply")
HD = TypeVar("HD", bound="ply")
@attr.s(auto_attribs=True)
class ply:
@ -259,7 +259,7 @@ class ply:
return field_dict
@classmethod
def from_dict(cls: Type[GP], src_dict: Dict[str, Any]) -> GP:
def from_dict(cls: Type[HD], src_dict: Dict[str, Any]) -> HD:
d = src_dict.copy()
_coords = d.pop("coords", UNSET)
coords: Union[Unset, System]
@ -306,7 +306,7 @@ class ply:
FF = TypeVar("FF", bound="step")
UJ = TypeVar("UJ", bound="step")
@attr.s(auto_attribs=True)
class step:
@ -331,7 +331,7 @@ class step:
return field_dict
@classmethod
def from_dict(cls: Type[FF], src_dict: Dict[str, Any]) -> FF:
def from_dict(cls: Type[UJ], src_dict: Dict[str, Any]) -> UJ:
d = src_dict.copy()
_coords = d.pop("coords", UNSET)
coords: Union[Unset, System]
@ -370,7 +370,7 @@ class step:
YO = TypeVar("YO", bound="stl")
RU = TypeVar("RU", bound="stl")
@attr.s(auto_attribs=True)
class stl:
@ -405,7 +405,7 @@ class stl:
return field_dict
@classmethod
def from_dict(cls: Type[YO], src_dict: Dict[str, Any]) -> YO:
def from_dict(cls: Type[RU], src_dict: Dict[str, Any]) -> RU:
d = src_dict.copy()
_coords = d.pop("coords", UNSET)
coords: Union[Unset, System]

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
FS = TypeVar("FS", bound="PathGetCurveUuidsForVertices")
DL = TypeVar("DL", bound="PathGetCurveUuidsForVertices")
@attr.s(auto_attribs=True)
class PathGetCurveUuidsForVertices:
@ -27,7 +27,7 @@ class PathGetCurveUuidsForVertices:
return field_dict
@classmethod
def from_dict(cls: Type[FS], src_dict: Dict[str, Any]) -> FS:
def from_dict(cls: Type[DL], src_dict: Dict[str, Any]) -> DL:
d = src_dict.copy()
curve_ids = cast(List[str], d.pop("curve_ids", UNSET))

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
WN = TypeVar("WN", bound="PathGetInfo")
QT = TypeVar("QT", bound="PathGetInfo")
@attr.s(auto_attribs=True)
class PathGetInfo:
@ -29,7 +29,7 @@ class PathGetInfo:
return field_dict
@classmethod
def from_dict(cls: Type[WN], src_dict: Dict[str, Any]) -> WN:
def from_dict(cls: Type[QT], src_dict: Dict[str, Any]) -> QT:
d = src_dict.copy()
from ..models.path_segment_info import PathSegmentInfo
segments = cast(List[PathSegmentInfo], d.pop("segments", UNSET))

View File

@ -1,40 +1,43 @@
from typing import Any, Dict, List, Type, TypeVar, Union
from typing import Any, Dict, List, Type, TypeVar, Union, cast
import attr
from ..types import UNSET, Unset
QO = TypeVar("QO", bound="Mesh")
PT = TypeVar("PT", bound="PathGetVertexUuids")
@attr.s(auto_attribs=True)
class Mesh:
mesh: Union[Unset, str] = UNSET
class PathGetVertexUuids:
""" The response from the `PathGetVertexUuids` command. """ # noqa: E501
vertex_ids: Union[Unset, List[str]] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
mesh = self.mesh
vertex_ids: Union[Unset, List[str]] = UNSET
if not isinstance(self.vertex_ids, Unset):
vertex_ids = self.vertex_ids
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if mesh is not UNSET:
field_dict['mesh'] = mesh
if vertex_ids is not UNSET:
field_dict['vertex_ids'] = vertex_ids
return field_dict
@classmethod
def from_dict(cls: Type[QO], src_dict: Dict[str, Any]) -> QO:
def from_dict(cls: Type[PT], src_dict: Dict[str, Any]) -> PT:
d = src_dict.copy()
mesh = d.pop("mesh", UNSET)
vertex_ids = cast(List[str], d.pop("vertex_ids", UNSET))
mesh = cls(
mesh= mesh,
path_get_vertex_uuids = cls(
vertex_ids= vertex_ids,
)
mesh.additional_properties = d
return mesh
path_get_vertex_uuids.additional_properties = d
return path_get_vertex_uuids
@property
def additional_keys(self) -> List[str]:

View File

@ -7,7 +7,7 @@ from ..models.point2d import Point2d
from ..models.point3d import Point3d
from ..types import UNSET, Unset
EQ = TypeVar("EQ", bound="line")
HR = TypeVar("HR", bound="line")
@attr.s(auto_attribs=True)
class line:
@ -36,7 +36,7 @@ class line:
return field_dict
@classmethod
def from_dict(cls: Type[EQ], src_dict: Dict[str, Any]) -> EQ:
def from_dict(cls: Type[HR], src_dict: Dict[str, Any]) -> HR:
d = src_dict.copy()
_end = d.pop("end", UNSET)
end: Union[Unset, Point3d]
@ -78,7 +78,7 @@ class line:
UW = TypeVar("UW", bound="arc")
VF = TypeVar("VF", bound="arc")
@attr.s(auto_attribs=True)
class arc:
@ -86,8 +86,10 @@ class arc:
angle_end: Union[Unset, float] = UNSET
angle_start: Union[Unset, float] = UNSET
center: Union[Unset, Point2d] = UNSET
end: Union[Unset, Angle] = UNSET
radius: Union[Unset, float] = UNSET
relative: Union[Unset, bool] = False
start: Union[Unset, Angle] = UNSET
type: str = "arc"
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
@ -97,8 +99,12 @@ class arc:
angle_start = self.angle_start
if not isinstance(self.center, Unset):
center = self.center
if not isinstance(self.end, Unset):
end = self.end
radius = self.radius
relative = self.relative
if not isinstance(self.start, Unset):
start = self.start
type = self.type
field_dict: Dict[str, Any] = {}
@ -110,16 +116,20 @@ class arc:
field_dict['angle_start'] = angle_start
if center is not UNSET:
field_dict['center'] = center
if end is not UNSET:
field_dict['end'] = end
if radius is not UNSET:
field_dict['radius'] = radius
if relative is not UNSET:
field_dict['relative'] = relative
if start is not UNSET:
field_dict['start'] = start
field_dict['type'] = type
return field_dict
@classmethod
def from_dict(cls: Type[UW], src_dict: Dict[str, Any]) -> UW:
def from_dict(cls: Type[VF], src_dict: Dict[str, Any]) -> VF:
d = src_dict.copy()
angle_end = d.pop("angle_end", UNSET)
@ -132,10 +142,24 @@ class arc:
else:
center = _center # type: ignore[arg-type]
_end = d.pop("end", UNSET)
end: Union[Unset, Angle]
if isinstance(_end, Unset):
end = UNSET
else:
end = _end # type: ignore[arg-type]
radius = d.pop("radius", UNSET)
relative = d.pop("relative", UNSET)
_start = d.pop("start", UNSET)
start: Union[Unset, Angle]
if isinstance(_start, Unset):
start = UNSET
else:
start = _start # type: ignore[arg-type]
type = d.pop("type", UNSET)
@ -143,8 +167,10 @@ class arc:
angle_end= angle_end,
angle_start= angle_start,
center= center,
end= end,
radius= radius,
relative= relative,
start= start,
type= type,
)
@ -170,7 +196,7 @@ class arc:
MD = TypeVar("MD", bound="bezier")
VM = TypeVar("VM", bound="bezier")
@attr.s(auto_attribs=True)
class bezier:
@ -209,7 +235,7 @@ class bezier:
return field_dict
@classmethod
def from_dict(cls: Type[MD], src_dict: Dict[str, Any]) -> MD:
def from_dict(cls: Type[VM], src_dict: Dict[str, Any]) -> VM:
d = src_dict.copy()
_control1 = d.pop("control1", UNSET)
control1: Union[Unset, Point3d]
@ -267,7 +293,7 @@ class bezier:
HD = TypeVar("HD", bound="tangential_arc")
WH = TypeVar("WH", bound="tangential_arc")
@attr.s(auto_attribs=True)
class tangential_arc:
@ -296,7 +322,7 @@ class tangential_arc:
return field_dict
@classmethod
def from_dict(cls: Type[HD], src_dict: Dict[str, Any]) -> HD:
def from_dict(cls: Type[WH], src_dict: Dict[str, Any]) -> WH:
d = src_dict.copy()
_offset = d.pop("offset", UNSET)
offset: Union[Unset, Angle]
@ -338,7 +364,7 @@ class tangential_arc:
UJ = TypeVar("UJ", bound="tangential_arc_to")
DQ = TypeVar("DQ", bound="tangential_arc_to")
@attr.s(auto_attribs=True)
class tangential_arc_to:
@ -368,7 +394,7 @@ class tangential_arc_to:
return field_dict
@classmethod
def from_dict(cls: Type[UJ], src_dict: Dict[str, Any]) -> UJ:
def from_dict(cls: Type[DQ], src_dict: Dict[str, Any]) -> DQ:
d = src_dict.copy()
_angle_snap_increment = d.pop("angle_snap_increment", UNSET)
angle_snap_increment: Union[Unset, Angle]

View File

@ -6,7 +6,7 @@ from ..models.modeling_cmd_id import ModelingCmdId
from ..models.path_command import PathCommand
from ..types import UNSET, Unset
RU = TypeVar("RU", bound="PathSegmentInfo")
UY = TypeVar("UY", bound="PathSegmentInfo")
@attr.s(auto_attribs=True)
class PathSegmentInfo:
@ -37,7 +37,7 @@ class PathSegmentInfo:
return field_dict
@classmethod
def from_dict(cls: Type[RU], src_dict: Dict[str, Any]) -> RU:
def from_dict(cls: Type[UY], src_dict: Dict[str, Any]) -> UY:
d = src_dict.copy()
_command = d.pop("command", UNSET)
command: Union[Unset, PathCommand]

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
DL = TypeVar("DL", bound="PaymentIntent")
PD = TypeVar("PD", bound="PaymentIntent")
@attr.s(auto_attribs=True)
class PaymentIntent:
@ -25,7 +25,7 @@ class PaymentIntent:
return field_dict
@classmethod
def from_dict(cls: Type[DL], src_dict: Dict[str, Any]) -> DL:
def from_dict(cls: Type[PD], src_dict: Dict[str, Any]) -> PD:
d = src_dict.copy()
client_secret = d.pop("client_secret", UNSET)

View File

@ -9,7 +9,7 @@ from ..models.card_details import CardDetails
from ..models.payment_method_type import PaymentMethodType
from ..types import UNSET, Unset
QT = TypeVar("QT", bound="PaymentMethod")
SM = TypeVar("SM", bound="PaymentMethod")
@attr.s(auto_attribs=True)
class PaymentMethod:
@ -56,7 +56,7 @@ class PaymentMethod:
return field_dict
@classmethod
def from_dict(cls: Type[QT], src_dict: Dict[str, Any]) -> QT:
def from_dict(cls: Type[SM], src_dict: Dict[str, Any]) -> SM:
d = src_dict.copy()
_billing_info = d.pop("billing_info", UNSET)
billing_info: Union[Unset, BillingInfo]

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
PT = TypeVar("PT", bound="PaymentMethodCardChecks")
JL = TypeVar("JL", bound="PaymentMethodCardChecks")
@attr.s(auto_attribs=True)
class PaymentMethodCardChecks:
@ -33,7 +33,7 @@ class PaymentMethodCardChecks:
return field_dict
@classmethod
def from_dict(cls: Type[PT], src_dict: Dict[str, Any]) -> PT:
def from_dict(cls: Type[JL], src_dict: Dict[str, Any]) -> JL:
d = src_dict.copy()
address_line1_check = d.pop("address_line1_check", UNSET)

View File

@ -5,7 +5,7 @@ import attr
from ..models.point2d import Point2d
from ..types import UNSET, Unset
HR = TypeVar("HR", bound="PlaneIntersectAndProject")
CG = TypeVar("CG", bound="PlaneIntersectAndProject")
@attr.s(auto_attribs=True)
class PlaneIntersectAndProject:
@ -27,7 +27,7 @@ class PlaneIntersectAndProject:
return field_dict
@classmethod
def from_dict(cls: Type[HR], src_dict: Dict[str, Any]) -> HR:
def from_dict(cls: Type[CG], src_dict: Dict[str, Any]) -> CG:
d = src_dict.copy()
_plane_coordinates = d.pop("plane_coordinates", UNSET)
plane_coordinates: Union[Unset, Point2d]

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
VF = TypeVar("VF", bound="Point2d")
QA = TypeVar("QA", bound="Point2d")
@attr.s(auto_attribs=True)
class Point2d:
@ -29,7 +29,7 @@ class Point2d:
return field_dict
@classmethod
def from_dict(cls: Type[VF], src_dict: Dict[str, Any]) -> VF:
def from_dict(cls: Type[QA], src_dict: Dict[str, Any]) -> QA:
d = src_dict.copy()
x = d.pop("x", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
VM = TypeVar("VM", bound="Point3d")
ZB = TypeVar("ZB", bound="Point3d")
@attr.s(auto_attribs=True)
class Point3d:
@ -33,7 +33,7 @@ class Point3d:
return field_dict
@classmethod
def from_dict(cls: Type[VM], src_dict: Dict[str, Any]) -> VM:
def from_dict(cls: Type[ZB], src_dict: Dict[str, Any]) -> ZB:
d = src_dict.copy()
x = d.pop("x", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
DQ = TypeVar("DQ", bound="Pong")
AU = TypeVar("AU", bound="Pong")
@attr.s(auto_attribs=True)
class Pong:
@ -25,7 +25,7 @@ class Pong:
return field_dict
@classmethod
def from_dict(cls: Type[DQ], src_dict: Dict[str, Any]) -> DQ:
def from_dict(cls: Type[AU], src_dict: Dict[str, Any]) -> AU:
d = src_dict.copy()
message = d.pop("message", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
UY = TypeVar("UY", bound="RawFile")
FX = TypeVar("FX", bound="RawFile")
@attr.s(auto_attribs=True)
class RawFile:
@ -31,7 +31,7 @@ class RawFile:
return field_dict
@classmethod
def from_dict(cls: Type[UY], src_dict: Dict[str, Any]) -> UY:
def from_dict(cls: Type[FX], src_dict: Dict[str, Any]) -> FX:
d = src_dict.copy()
contents = cast(List[int], d.pop("contents", UNSET))

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
PD = TypeVar("PD", bound="RtcIceCandidateInit")
BL = TypeVar("BL", bound="RtcIceCandidateInit")
@attr.s(auto_attribs=True)
class RtcIceCandidateInit:
@ -37,7 +37,7 @@ class RtcIceCandidateInit:
return field_dict
@classmethod
def from_dict(cls: Type[PD], src_dict: Dict[str, Any]) -> PD:
def from_dict(cls: Type[BL], src_dict: Dict[str, Any]) -> BL:
d = src_dict.copy()
candidate = d.pop("candidate", UNSET)

View File

@ -5,7 +5,7 @@ import attr
from ..models.rtc_sdp_type import RtcSdpType
from ..types import UNSET, Unset
SM = TypeVar("SM", bound="RtcSessionDescription")
KU = TypeVar("KU", bound="RtcSessionDescription")
@attr.s(auto_attribs=True)
class RtcSessionDescription:
@ -31,7 +31,7 @@ class RtcSessionDescription:
return field_dict
@classmethod
def from_dict(cls: Type[SM], src_dict: Dict[str, Any]) -> SM:
def from_dict(cls: Type[KU], src_dict: Dict[str, Any]) -> KU:
d = src_dict.copy()
sdp = d.pop("sdp", UNSET)

View File

@ -7,6 +7,7 @@ class SceneToolType(str, Enum):
SELECT = 'select'
MOVE = 'move'
SKETCH_LINE = 'sketch_line'
SKETCH_TANGENTIAL_ARC = 'sketch_tangential_arc'
SKETCH_CURVE = 'sketch_curve'
SKETCH_CURVE_MOD = 'sketch_curve_mod'

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
JL = TypeVar("JL", bound="SelectGet")
PZ = TypeVar("PZ", bound="SelectGet")
@attr.s(auto_attribs=True)
class SelectGet:
@ -27,7 +27,7 @@ class SelectGet:
return field_dict
@classmethod
def from_dict(cls: Type[JL], src_dict: Dict[str, Any]) -> JL:
def from_dict(cls: Type[PZ], src_dict: Dict[str, Any]) -> PZ:
d = src_dict.copy()
entity_ids = cast(List[str], d.pop("entity_ids", UNSET))

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
CG = TypeVar("CG", bound="SelectWithPoint")
FA = TypeVar("FA", bound="SelectWithPoint")
@attr.s(auto_attribs=True)
class SelectWithPoint:
@ -25,7 +25,7 @@ class SelectWithPoint:
return field_dict
@classmethod
def from_dict(cls: Type[CG], src_dict: Dict[str, Any]) -> CG:
def from_dict(cls: Type[FA], src_dict: Dict[str, Any]) -> FA:
d = src_dict.copy()
entity_id = d.pop("entity_id", UNSET)

View File

@ -7,7 +7,7 @@ from dateutil.parser import isoparse
from ..models.uuid import Uuid
from ..types import UNSET, Unset
QA = TypeVar("QA", bound="Session")
GE = TypeVar("GE", bound="Session")
@attr.s(auto_attribs=True)
class Session:
@ -56,7 +56,7 @@ For our UIs, these are automatically created by Next.js. """ # noqa: E501
return field_dict
@classmethod
def from_dict(cls: Type[QA], src_dict: Dict[str, Any]) -> QA:
def from_dict(cls: Type[GE], src_dict: Dict[str, Any]) -> GE:
d = src_dict.copy()
_created_at = d.pop("created_at", UNSET)
created_at: Union[Unset, datetime.datetime]

Some files were not shown because too many files have changed in this diff Show More