upgrade pydantic (#266)

* upgrade pydantic

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* update other deps

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* update other deps

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* ruff

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* bump more deps

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* update

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* format

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* bump

Signed-off-by: Jess Frazelle <github@jessfraz.com>

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
Jess Frazelle
2024-09-10 12:52:57 -07:00
committed by GitHub
parent b430b49382
commit bf0710f0e6
221 changed files with 2158 additions and 3109 deletions

View File

@ -1,38 +0,0 @@
name: black
on:
push:
branches: main
paths:
- '**.py'
- .github/workflows/black.yml
- 'pyproject.toml'
pull_request:
paths:
- '**.py'
- .github/workflows/black.yml
- 'pyproject.toml'
jobs:
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
# Installation instructions are from: https://python-poetry.org/docs/
- name: Install dependencies
shell: bash
run: |
pip install \
poetry
- name: Build
shell: bash
run: |
poetry install
poetry build
- name: Run black
shell: bash
run: |
poetry run black --check --diff . generate/generate.py docs/conf.py kittycad/client_test.py kittycad/examples_test.py

View File

@ -36,3 +36,4 @@ jobs:
shell: bash
run: |
poetry run ruff check --output-format=github .
poetry run ruff format --check

View File

@ -20,8 +20,8 @@ poetry run python generate/generate.py
# Format and lint.
poetry run isort .
poetry run black . generate/generate.py docs/conf.py kittycad/client_test.py kittycad/examples_test.py kittycad/models/*.py kittycad/api/*.py kittycad/api/*/*.py
poetry run ruff check --fix .
poetry run ruff format
poetry run mypy . --exclude venv || true

File diff suppressed because it is too large Load Diff

View File

@ -1 +1 @@
""" A client library for accessing KittyCAD """
"""A client library for accessing KittyCAD"""

View File

@ -1 +1 @@
""" Contains methods for accessing the API """
"""Contains methods for accessing the API"""

View File

@ -1 +1 @@
""" Contains methods for accessing the api_calls API paths: API calls that have been performed by users can be queried by the API. This is helpful for debugging as well as billing. """ # noqa: E501
"""Contains methods for accessing the api_calls API paths: API calls that have been performed by users can be queried by the API. This is helpful for debugging as well as billing.""" # noqa: E501

View File

@ -19,7 +19,6 @@ def _get_kwargs(
) # noqa: E501
if group_by is not None:
if "?" in url:
url = url + "&group_by=" + str(group_by)
else:

View File

@ -36,7 +36,9 @@ def _get_kwargs(
}
def _parse_response(*, response: httpx.Response) -> Optional[
def _parse_response(
*, response: httpx.Response
) -> Optional[
Union[
FileConversion,
FileCenterOfMass,
@ -132,7 +134,9 @@ def _parse_response(*, response: httpx.Response) -> Optional[
return Error(**response.json())
def _build_response(*, response: httpx.Response) -> Response[
def _build_response(
*, response: httpx.Response
) -> Response[
Optional[
Union[
FileConversion,
@ -207,8 +211,7 @@ def sync(
"""Get the status and output of an async operation.
This endpoint requires authentication by any Zoo user. It returns details of the requested async operation for the user.
If the user is not authenticated to view the specified async operation, then it is not returned.
Only Zoo employees with the proper access can view async operations for other users.
""" # noqa: E501
Only Zoo employees with the proper access can view async operations for other users.""" # noqa: E501
return sync_detailed(
id=id,
@ -266,8 +269,7 @@ async def asyncio(
"""Get the status and output of an async operation.
This endpoint requires authentication by any Zoo user. It returns details of the requested async operation for the user.
If the user is not authenticated to view the specified async operation, then it is not returned.
Only Zoo employees with the proper access can view async operations for other users.
""" # noqa: E501
Only Zoo employees with the proper access can view async operations for other users.""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -21,21 +21,18 @@ def _get_kwargs(
) # 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:

View File

@ -23,21 +23,18 @@ def _get_kwargs(
) # 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:
@ -115,8 +112,7 @@ def sync(
"""This endpoint requires authentication by any Zoo user. It returns the API calls for the authenticated user if "me" is passed as the user id.
Alternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user.
If the authenticated user is a Zoo employee, then the API calls are returned for the user specified by the user id.
The API calls are returned in order of creation, with the most recently created API calls first.
""" # noqa: E501
The API calls are returned in order of creation, with the most recently created API calls first.""" # noqa: E501
return sync_detailed(
id=id,
@ -160,8 +156,7 @@ async def asyncio(
"""This endpoint requires authentication by any Zoo user. It returns the API calls for the authenticated user if "me" is passed as the user id.
Alternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user.
If the authenticated user is a Zoo employee, then the API calls are returned for the user specified by the user id.
The API calls are returned in order of creation, with the most recently created API calls first.
""" # noqa: E501
The API calls are returned in order of creation, with the most recently created API calls first.""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -23,28 +23,24 @@ def _get_kwargs(
) # 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)
if status is not None:
if "?" in url:
url = url + "&status=" + str(status)
else:

View File

@ -21,21 +21,18 @@ def _get_kwargs(
) # 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:
@ -109,8 +106,7 @@ def sync(
) -> Optional[Union[ApiCallWithPriceResultsPage, Error]]:
"""This includes all API calls that were made by users in the org.
This endpoint requires authentication by an org admin. It returns the API calls for the authenticated user's org.
The API calls are returned in order of creation, with the most recently created API calls first.
""" # noqa: E501
The API calls are returned in order of creation, with the most recently created API calls first.""" # noqa: E501
return sync_detailed(
limit=limit,
@ -149,8 +145,7 @@ async def asyncio(
) -> Optional[Union[ApiCallWithPriceResultsPage, Error]]:
"""This includes all API calls that were made by users in the org.
This endpoint requires authentication by an org admin. It returns the API calls for the authenticated user's org.
The API calls are returned in order of creation, with the most recently created API calls first.
""" # noqa: E501
The API calls are returned in order of creation, with the most recently created API calls first.""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -21,21 +21,18 @@ def _get_kwargs(
) # 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:
@ -108,8 +105,7 @@ def sync(
page_token: Optional[str] = None,
) -> Optional[Union[ApiCallWithPriceResultsPage, Error]]:
"""This endpoint requires authentication by any Zoo user. It returns the API calls for the authenticated user.
The API calls are returned in order of creation, with the most recently created API calls first.
""" # noqa: E501
The API calls are returned in order of creation, with the most recently created API calls first.""" # noqa: E501
return sync_detailed(
limit=limit,
@ -147,8 +143,7 @@ async def asyncio(
page_token: Optional[str] = None,
) -> Optional[Union[ApiCallWithPriceResultsPage, Error]]:
"""This endpoint requires authentication by any Zoo user. It returns the API calls for the authenticated user.
The API calls are returned in order of creation, with the most recently created API calls first.
""" # noqa: E501
The API calls are returned in order of creation, with the most recently created API calls first.""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -1 +1 @@
""" Contains methods for accessing the api_tokens API paths: API tokens allow users to call the API outside of their session token that is used as a cookie in the user interface. Users can create, delete, and list their API tokens. But, of course, you need an API token to do this, so first be sure to generate one in the account UI. """ # noqa: E501
"""Contains methods for accessing the api_tokens API paths: API tokens allow users to call the API outside of their session token that is used as a cookie in the user interface. Users can create, delete, and list their API tokens. But, of course, you need an API token to do this, so first be sure to generate one in the account UI.""" # noqa: E501

View File

@ -18,7 +18,6 @@ def _get_kwargs(
) # noqa: E501
if label is not None:
if "?" in url:
url = url + "&label=" + str(label)
else:

View File

@ -73,8 +73,7 @@ def sync(
client: Client,
) -> Optional[Error]:
"""This endpoint requires authentication by any Zoo user. It deletes the requested API token for the user.
This endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes.
""" # noqa: E501
This endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes.""" # noqa: E501
return sync_detailed(
token=token,
@ -104,8 +103,7 @@ async def asyncio(
client: Client,
) -> Optional[Error]:
"""This endpoint requires authentication by any Zoo user. It deletes the requested API token for the user.
This endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes.
""" # noqa: E501
This endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes.""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -21,21 +21,18 @@ def _get_kwargs(
) # 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:
@ -108,8 +105,7 @@ def sync(
page_token: Optional[str] = None,
) -> Optional[Union[ApiTokenResultsPage, Error]]:
"""This endpoint requires authentication by any Zoo user. It returns the API tokens for the authenticated user.
The API tokens are returned in order of creation, with the most recently created API tokens first.
""" # noqa: E501
The API tokens are returned in order of creation, with the most recently created API tokens first.""" # noqa: E501
return sync_detailed(
limit=limit,
@ -147,8 +143,7 @@ async def asyncio(
page_token: Optional[str] = None,
) -> Optional[Union[ApiTokenResultsPage, Error]]:
"""This endpoint requires authentication by any Zoo user. It returns the API tokens for the authenticated user.
The API tokens are returned in order of creation, with the most recently created API tokens first.
""" # noqa: E501
The API tokens are returned in order of creation, with the most recently created API tokens first.""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -1 +1 @@
""" Contains methods for accessing the apps API paths: Endpoints for third party app grant flows. """ # noqa: E501
"""Contains methods for accessing the apps API paths: Endpoints for third party app grant flows.""" # noqa: E501

View File

@ -67,8 +67,7 @@ def sync(
client: Client,
) -> Optional[Error]:
"""This is different than OAuth 2.0 authentication for users. This endpoint grants access for Zoo to access user's repos.
The user doesn't need Zoo OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.
""" # noqa: E501
The user doesn't need Zoo OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.""" # noqa: E501
return sync_detailed(
client=client,
@ -94,8 +93,7 @@ async def asyncio(
client: Client,
) -> Optional[Error]:
"""This is different than OAuth 2.0 authentication for users. This endpoint grants access for Zoo to access user's repos.
The user doesn't need Zoo OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.
""" # noqa: E501
The user doesn't need Zoo OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -74,8 +74,7 @@ def sync(
client: Client,
) -> Optional[Union[AppClientInfo, Error]]:
"""This is different than OAuth 2.0 authentication for users. This endpoint grants access for Zoo to access user's repos.
The user doesn't need Zoo OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.
""" # noqa: E501
The user doesn't need Zoo OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.""" # noqa: E501
return sync_detailed(
client=client,
@ -101,8 +100,7 @@ async def asyncio(
client: Client,
) -> Optional[Union[AppClientInfo, Error]]:
"""This is different than OAuth 2.0 authentication for users. This endpoint grants access for Zoo to access user's repos.
The user doesn't need Zoo OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.
""" # noqa: E501
The user doesn't need Zoo OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -1 +1 @@
""" Contains methods for accessing the beta API paths: Beta API endpoints. We will not charge for these endpoints while they are in beta. """ # noqa: E501
"""Contains methods for accessing the beta API paths: Beta API endpoints. We will not charge for these endpoints while they are in beta.""" # noqa: E501

View File

@ -1 +1 @@
""" Contains methods for accessing the constant API paths: Constants. These are helpful as helpers. """ # noqa: E501
"""Contains methods for accessing the constant API paths: Constants. These are helpful as helpers.""" # noqa: E501

View File

@ -1 +1 @@
""" Contains methods for accessing the executor API paths: Endpoints that allow for code execution or creation of code execution environments. """ # noqa: E501
"""Contains methods for accessing the executor API paths: Endpoints that allow for code execution or creation of code execution environments.""" # noqa: E501

View File

@ -33,7 +33,12 @@ def sync(
client=client,
)
return ws_connect(kwargs["url"].replace("http", "ws"), additional_headers=kwargs["headers"], close_timeout=120, max_size=None) # type: ignore
return ws_connect(
kwargs["url"].replace("http", "ws"),
additional_headers=kwargs["headers"],
close_timeout=120,
max_size=None,
) # type: ignore
async def asyncio(

View File

@ -22,7 +22,6 @@ def _get_kwargs(
) # noqa: E501
if output is not None:
if "?" in url:
url = url + "&output=" + str(output)
else:
@ -93,7 +92,6 @@ def sync(
client: Client,
output: Optional[str] = None,
) -> Optional[Union[CodeOutput, Error]]:
return sync_detailed(
lang=lang,
output=output,
@ -129,7 +127,6 @@ async def asyncio(
client: Client,
output: Optional[str] = None,
) -> Optional[Union[CodeOutput, Error]]:
return (
await asyncio_detailed(
lang=lang,

View File

@ -1 +1 @@
""" Contains methods for accessing the file API paths: CAD file operations. Create, get, and list CAD file conversions. More endpoints will be added here in the future as we build out transforms, etc on CAD models. """ # noqa: E501
"""Contains methods for accessing the file API paths: CAD file operations. Create, get, and list CAD file conversions. More endpoints will be added here in the future as we build out transforms, etc on CAD models.""" # noqa: E501

View File

@ -22,14 +22,12 @@ def _get_kwargs(
) # noqa: E501
if output_unit is not None:
if "?" in url:
url = url + "&output_unit=" + str(output_unit)
else:
url = url + "?output_unit=" + str(output_unit)
if src_format is not None:
if "?" in url:
url = url + "&src_format=" + str(src_format)
else:
@ -106,8 +104,7 @@ def sync(
This endpoint returns the cartesian coordinate in world space measure units.
In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.
Get the center of mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
""" # noqa: E501
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501
return sync_detailed(
output_unit=output_unit,
@ -148,8 +145,7 @@ async def asyncio(
This endpoint returns the cartesian coordinate in world space measure units.
In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.
Get the center of mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
""" # noqa: E501
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -93,8 +93,7 @@ def sync(
"""If you wish to specify the conversion options, use the `/file/conversion` endpoint instead.
Convert a CAD file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously.
If the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string.
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
""" # noqa: E501
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501
return sync_detailed(
output_format=output_format,
@ -134,8 +133,7 @@ async def asyncio(
"""If you wish to specify the conversion options, use the `/file/conversion` endpoint instead.
Convert a CAD file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously.
If the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string.
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
""" # noqa: E501
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -25,28 +25,24 @@ def _get_kwargs(
) # noqa: E501
if material_mass is not None:
if "?" in url:
url = url + "&material_mass=" + str(material_mass)
else:
url = url + "?material_mass=" + str(material_mass)
if material_mass_unit is not None:
if "?" in url:
url = url + "&material_mass_unit=" + str(material_mass_unit)
else:
url = url + "?material_mass_unit=" + str(material_mass_unit)
if output_unit is not None:
if "?" in url:
url = url + "&output_unit=" + str(output_unit)
else:
url = url + "?output_unit=" + str(output_unit)
if src_format is not None:
if "?" in url:
url = url + "&src_format=" + str(src_format)
else:
@ -127,8 +123,7 @@ def sync(
This endpoint assumes if you are giving a material mass in a specific mass units, we return a density in mass unit per cubic measure unit.
In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.
Get the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
""" # noqa: E501
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501
return sync_detailed(
material_mass=material_mass,
@ -177,8 +172,7 @@ async def asyncio(
This endpoint assumes if you are giving a material mass in a specific mass units, we return a density in mass unit per cubic measure unit.
In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.
Get the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
""" # noqa: E501
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -25,28 +25,24 @@ def _get_kwargs(
) # noqa: E501
if material_density is not None:
if "?" in url:
url = url + "&material_density=" + str(material_density)
else:
url = url + "?material_density=" + str(material_density)
if material_density_unit is not None:
if "?" in url:
url = url + "&material_density_unit=" + str(material_density_unit)
else:
url = url + "?material_density_unit=" + str(material_density_unit)
if output_unit is not None:
if "?" in url:
url = url + "&output_unit=" + str(output_unit)
else:
url = url + "?output_unit=" + str(output_unit)
if src_format is not None:
if "?" in url:
url = url + "&src_format=" + str(src_format)
else:
@ -127,8 +123,7 @@ def sync(
This endpoint assumes if you are giving a material density in a specific mass unit per cubic measure unit, we return a mass in mass units. The same mass units as passed in the material density.
In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.
Get the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
""" # noqa: E501
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501
return sync_detailed(
material_density=material_density,
@ -177,8 +172,7 @@ async def asyncio(
This endpoint assumes if you are giving a material density in a specific mass unit per cubic measure unit, we return a mass in mass units. The same mass units as passed in the material density.
In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.
Get the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
""" # noqa: E501
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -22,14 +22,12 @@ def _get_kwargs(
) # noqa: E501
if output_unit is not None:
if "?" in url:
url = url + "&output_unit=" + str(output_unit)
else:
url = url + "?output_unit=" + str(output_unit)
if src_format is not None:
if "?" in url:
url = url + "&src_format=" + str(src_format)
else:
@ -106,8 +104,7 @@ def sync(
This endpoint returns the square measure units.
In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.
Get the surface area of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
""" # noqa: E501
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501
return sync_detailed(
output_unit=output_unit,
@ -148,8 +145,7 @@ async def asyncio(
This endpoint returns the square measure units.
In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.
Get the surface area of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
""" # noqa: E501
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -22,14 +22,12 @@ def _get_kwargs(
) # noqa: E501
if output_unit is not None:
if "?" in url:
url = url + "&output_unit=" + str(output_unit)
else:
url = url + "?output_unit=" + str(output_unit)
if src_format is not None:
if "?" in url:
url = url + "&src_format=" + str(src_format)
else:
@ -104,8 +102,7 @@ def sync(
This endpoint returns the cubic measure units.
In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.
Get the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
""" # noqa: E501
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501
return sync_detailed(
output_unit=output_unit,
@ -146,8 +143,7 @@ async def asyncio(
This endpoint returns the cubic measure units.
In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.
Get the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
""" # noqa: E501
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -1 +1 @@
""" Contains methods for accessing the hidden API paths: Hidden API endpoints that should not show up in the docs. """ # noqa: E501
"""Contains methods for accessing the hidden API paths: Hidden API endpoints that should not show up in the docs.""" # noqa: E501

View File

@ -79,7 +79,6 @@ def sync(
*,
client: Client,
) -> Optional[Union[VerificationTokenResponse, Error]]:
return sync_detailed(
body=body,
client=client,
@ -107,7 +106,6 @@ async def asyncio(
*,
client: Client,
) -> Optional[Union[VerificationTokenResponse, Error]]:
return (
await asyncio_detailed(
body=body,

View File

@ -19,21 +19,18 @@ def _get_kwargs(
) # noqa: E501
if callback_url is not None:
if "?" in url:
url = url + "&callback_url=" + str(callback_url)
else:
url = url + "?callback_url=" + str(callback_url)
if email is not None:
if "?" in url:
url = url + "&email=" + str(email)
else:
url = url + "?email=" + str(email)
if token is not None:
if "?" in url:
url = url + "&token=" + str(token)
else:
@ -99,7 +96,6 @@ def sync(
client: Client,
callback_url: Optional[str] = None,
) -> Optional[Error]:
return sync_detailed(
callback_url=callback_url,
email=email,
@ -135,7 +131,6 @@ async def asyncio(
client: Client,
callback_url: Optional[str] = None,
) -> Optional[Error]:
return (
await asyncio_detailed(
callback_url=callback_url,

View File

@ -20,7 +20,6 @@ def _get_kwargs(
) # noqa: E501
if callback_url is not None:
if "?" in url:
url = url + "&callback_url=" + str(callback_url)
else:

View File

@ -77,7 +77,6 @@ def sync(
*,
client: Client,
) -> Optional[Error]:
return sync_detailed(
provider_id=provider_id,
body=body,
@ -109,7 +108,6 @@ async def asyncio(
*,
client: Client,
) -> Optional[Error]:
return (
await asyncio_detailed(
provider_id=provider_id,

View File

@ -1 +1 @@
""" Contains methods for accessing the meta API paths: Meta information about the API. """ # noqa: E501
"""Contains methods for accessing the meta API paths: Meta information about the API.""" # noqa: E501

View File

@ -71,7 +71,6 @@ def sync(
*,
client: Client,
) -> Optional[Union[IpAddrInfo, Error]]:
return sync_detailed(
client=client,
).parsed
@ -95,7 +94,6 @@ async def asyncio(
*,
client: Client,
) -> Optional[Union[IpAddrInfo, Error]]:
return (
await asyncio_detailed(
client=client,

View File

@ -70,7 +70,6 @@ def sync(
*,
client: Client,
) -> Optional[Union[dict, Error]]:
return sync_detailed(
client=client,
).parsed
@ -94,7 +93,6 @@ async def asyncio(
*,
client: Client,
) -> Optional[Union[dict, Error]]:
return (
await asyncio_detailed(
client=client,

View File

@ -71,7 +71,6 @@ def sync(
*,
client: Client,
) -> Optional[Union[Pong, Error]]:
return sync_detailed(
client=client,
).parsed
@ -95,7 +94,6 @@ async def asyncio(
*,
client: Client,
) -> Optional[Union[Pong, Error]]:
return (
await asyncio_detailed(
client=client,

View File

@ -1 +1 @@
""" Contains methods for accessing the ml API paths: Machine learning to generate CAD models and other things. """ # noqa: E501
"""Contains methods for accessing the ml API paths: Machine learning to generate CAD models and other things.""" # noqa: E501

View File

@ -79,7 +79,6 @@ def sync(
*,
client: Client,
) -> Optional[Union[KclCodeCompletionResponse, Error]]:
return sync_detailed(
body=body,
client=client,
@ -107,7 +106,6 @@ async def asyncio(
*,
client: Client,
) -> Optional[Union[KclCodeCompletionResponse, Error]]:
return (
await asyncio_detailed(
body=body,

View File

@ -23,7 +23,6 @@ def _get_kwargs(
) # noqa: E501
if kcl is not None:
if "?" in url:
url = url + "&kcl=" + str(kcl)
else:
@ -96,8 +95,7 @@ def sync(
) -> Optional[Union[TextToCad, Error]]:
"""Because our source of truth for the resulting model is a STEP file, you will always have STEP file contents when you list your generated models. Any other formats you request here will also be returned when you list your generated models.
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.
One thing to note, if you hit the cache, this endpoint will return right away. So you only have to wait if the status is not `Completed` or `Failed`.
""" # noqa: E501
One thing to note, if you hit the cache, this endpoint will return right away. So you only have to wait if the status is not `Completed` or `Failed`.""" # noqa: E501
return sync_detailed(
output_format=output_format,
@ -136,8 +134,7 @@ async def asyncio(
) -> Optional[Union[TextToCad, Error]]:
"""Because our source of truth for the resulting model is a STEP file, you will always have STEP file contents when you list your generated models. Any other formats you request here will also be returned when you list your generated models.
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.
One thing to note, if you hit the cache, this endpoint will return right away. So you only have to wait if the status is not `Completed` or `Failed`.
""" # noqa: E501
One thing to note, if you hit the cache, this endpoint will return right away. So you only have to wait if the status is not `Completed` or `Failed`.""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -20,7 +20,6 @@ def _get_kwargs(
) # noqa: E501
if feedback is not None:
if "?" in url:
url = url + "&feedback=" + str(feedback)
else:

View File

@ -21,21 +21,18 @@ def _get_kwargs(
) # 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:
@ -109,8 +106,7 @@ def sync(
) -> Optional[Union[MlPromptResultsPage, Error]]:
"""For text-to-cad prompts, this will always return the STEP file contents as well as the format the user originally requested.
This endpoint requires authentication by a Zoo employee.
The ML prompts are returned in order of creation, with the most recently created ML prompts first.
""" # noqa: E501
The ML prompts are returned in order of creation, with the most recently created ML prompts first.""" # noqa: E501
return sync_detailed(
limit=limit,
@ -149,8 +145,7 @@ async def asyncio(
) -> Optional[Union[MlPromptResultsPage, Error]]:
"""For text-to-cad prompts, this will always return the STEP file contents as well as the format the user originally requested.
This endpoint requires authentication by a Zoo employee.
The ML prompts are returned in order of creation, with the most recently created ML prompts first.
""" # noqa: E501
The ML prompts are returned in order of creation, with the most recently created ML prompts first.""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -22,28 +22,24 @@ def _get_kwargs(
) # 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)
if no_models is not None:
if "?" in url:
url = url + "&no_models=" + str(no_models)
else:
@ -120,8 +116,7 @@ def sync(
) -> Optional[Union[TextToCadResultsPage, Error]]:
"""This will always return the STEP file contents as well as the format the user originally requested.
This endpoint requires authentication by any Zoo 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
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,
@ -164,8 +159,7 @@ async def asyncio(
) -> Optional[Union[TextToCadResultsPage, Error]]:
"""This will always return the STEP file contents as well as the format the user originally requested.
This endpoint requires authentication by any Zoo 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
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(

View File

@ -1 +1 @@
""" Contains methods for accessing the modeling API paths: Modeling API for updating your 3D files using the Zoo engine. """ # noqa: E501
"""Contains methods for accessing the modeling API paths: Modeling API for updating your 3D files using the Zoo engine.""" # noqa: E501

View File

@ -27,63 +27,54 @@ def _get_kwargs(
url = "{}/ws/modeling/commands".format(client.base_url) # noqa: E501
if fps is not None:
if "?" in url:
url = url + "&fps=" + str(fps)
else:
url = url + "?fps=" + str(fps)
if pool is not None:
if "?" in url:
url = url + "&pool=" + str(pool)
else:
url = url + "?pool=" + str(pool)
if post_effect is not None:
if "?" in url:
url = url + "&post_effect=" + str(post_effect)
else:
url = url + "?post_effect=" + str(post_effect)
if replay is not None:
if "?" in url:
url = url + "&replay=" + str(replay)
else:
url = url + "?replay=" + str(replay)
if show_grid is not None:
if "?" in url:
url = url + "&show_grid=" + str(show_grid).lower()
else:
url = url + "?show_grid=" + str(show_grid).lower()
if unlocked_framerate is not None:
if "?" in url:
url = url + "&unlocked_framerate=" + str(unlocked_framerate).lower()
else:
url = url + "?unlocked_framerate=" + str(unlocked_framerate).lower()
if video_res_height is not None:
if "?" in url:
url = url + "&video_res_height=" + str(video_res_height)
else:
url = url + "?video_res_height=" + str(video_res_height)
if video_res_width is not None:
if "?" in url:
url = url + "&video_res_width=" + str(video_res_width)
else:
url = url + "?video_res_width=" + str(video_res_width)
if webrtc is not None:
if "?" in url:
url = url + "&webrtc=" + str(webrtc).lower()
else:
@ -128,7 +119,12 @@ def sync(
client=client,
)
return ws_connect(kwargs["url"].replace("http", "ws"), additional_headers=kwargs["headers"], close_timeout=120, max_size=None) # type: ignore
return ws_connect(
kwargs["url"].replace("http", "ws"),
additional_headers=kwargs["headers"],
close_timeout=120,
max_size=None,
) # type: ignore
async def asyncio(

View File

@ -1 +1 @@
""" Contains methods for accessing the oauth2 API paths: Endpoints that implement OAuth 2.0 grant flows. """ # noqa: E501
"""Contains methods for accessing the oauth2 API paths: Endpoints that implement OAuth 2.0 grant flows.""" # noqa: E501

View File

@ -1 +1 @@
""" Contains methods for accessing the orgs API paths: An organization is a group of users of the Zoo API. Here, we can add users to an org and perform operations on orgs. """ # noqa: E501
"""Contains methods for accessing the orgs API paths: An organization is a group of users of the Zoo API. Here, we can add users to an org and perform operations on orgs.""" # noqa: E501

View File

@ -81,8 +81,7 @@ def sync(
In both cases the user gets an email that they have been added to the org.
If the user is already in your org, this will return a 400 and a message.
If the user is already in a different org, this will return a 400 and a message.
This endpoint requires authentication by an org admin. It adds the specified member to the authenticated user's org.
""" # noqa: E501
This endpoint requires authentication by an org admin. It adds the specified member to the authenticated user's org.""" # noqa: E501
return sync_detailed(
body=body,
@ -115,8 +114,7 @@ async def asyncio(
In both cases the user gets an email that they have been added to the org.
If the user is already in your org, this will return a 400 and a message.
If the user is already in a different org, this will return a 400 and a message.
This endpoint requires authentication by an org admin. It adds the specified member to the authenticated user's org.
""" # noqa: E501
This endpoint requires authentication by an org admin. It adds the specified member to the authenticated user's org.""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -68,8 +68,7 @@ def sync(
) -> Optional[Error]:
"""In order to delete an org, you must first delete all of its members, except yourself.
You must also have no outstanding invoices or unpaid balances.
This endpoint requires authentication by an org admin. It deletes the authenticated user's org.
""" # noqa: E501
This endpoint requires authentication by an org admin. It deletes the authenticated user's org.""" # noqa: E501
return sync_detailed(
client=client,
@ -96,8 +95,7 @@ async def asyncio(
) -> Optional[Error]:
"""In order to delete an org, you must first delete all of its members, except yourself.
You must also have no outstanding invoices or unpaid balances.
This endpoint requires authentication by an org admin. It deletes the authenticated user's org.
""" # noqa: E501
This endpoint requires authentication by an org admin. It deletes the authenticated user's org.""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -23,28 +23,24 @@ def _get_kwargs(
) # 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)
if role is not None:
if "?" in url:
url = url + "&role=" + str(role)
else:

View File

@ -21,21 +21,18 @@ def _get_kwargs(
) # 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:

View File

@ -1 +1 @@
""" Contains methods for accessing the payments API paths: Operations around payments and billing. """ # noqa: E501
"""Contains methods for accessing the payments API paths: Operations around payments and billing.""" # noqa: E501

View File

@ -78,8 +78,7 @@ def sync(
client: Client,
) -> Optional[Union[Customer, Error]]:
"""This includes billing address, phone, and name.
This endpoint requires authentication by the org admin. It creates the payment information for the authenticated user's org.
""" # noqa: E501
This endpoint requires authentication by the org admin. It creates the payment information for the authenticated user's org.""" # noqa: E501
return sync_detailed(
body=body,
@ -109,8 +108,7 @@ async def asyncio(
client: Client,
) -> Optional[Union[Customer, Error]]:
"""This includes billing address, phone, and name.
This endpoint requires authentication by the org admin. It creates the payment information for the authenticated user's org.
""" # noqa: E501
This endpoint requires authentication by the org admin. It creates the payment information for the authenticated user's org.""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -78,8 +78,7 @@ def sync(
client: Client,
) -> Optional[Union[Customer, Error]]:
"""This includes billing address, phone, and name.
This endpoint requires authentication by any Zoo user. It creates the payment information for the authenticated user.
""" # noqa: E501
This endpoint requires authentication by any Zoo user. It creates the payment information for the authenticated user.""" # noqa: E501
return sync_detailed(
body=body,
@ -109,8 +108,7 @@ async def asyncio(
client: Client,
) -> Optional[Union[Customer, Error]]:
"""This includes billing address, phone, and name.
This endpoint requires authentication by any Zoo user. It creates the payment information for the authenticated user.
""" # noqa: E501
This endpoint requires authentication by any Zoo user. It creates the payment information for the authenticated user.""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -67,8 +67,7 @@ def sync(
client: Client,
) -> Optional[Error]:
"""This includes billing address, phone, and name.
This endpoint requires authentication by an org admin. It deletes the payment information for the authenticated user's org.
""" # noqa: E501
This endpoint requires authentication by an org admin. It deletes the payment information for the authenticated user's org.""" # noqa: E501
return sync_detailed(
client=client,
@ -94,8 +93,7 @@ async def asyncio(
client: Client,
) -> Optional[Error]:
"""This includes billing address, phone, and name.
This endpoint requires authentication by an org admin. It deletes the payment information for the authenticated user's org.
""" # noqa: E501
This endpoint requires authentication by an org admin. It deletes the payment information for the authenticated user's org.""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -67,8 +67,7 @@ def sync(
client: Client,
) -> Optional[Error]:
"""This includes billing address, phone, and name.
This endpoint requires authentication by any Zoo user. It deletes the payment information for the authenticated user.
""" # noqa: E501
This endpoint requires authentication by any Zoo user. It deletes the payment information for the authenticated user.""" # noqa: E501
return sync_detailed(
client=client,
@ -94,8 +93,7 @@ async def asyncio(
client: Client,
) -> Optional[Error]:
"""This includes billing address, phone, and name.
This endpoint requires authentication by any Zoo user. It deletes the payment information for the authenticated user.
""" # noqa: E501
This endpoint requires authentication by any Zoo user. It deletes the payment information for the authenticated user.""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -72,8 +72,7 @@ def sync(
client: Client,
) -> Optional[Union[Customer, Error]]:
"""This includes billing address, phone, and name.
This endpoint requires authentication by an org admin. It gets the payment information for the authenticated user's org.
""" # noqa: E501
This endpoint requires authentication by an org admin. It gets the payment information for the authenticated user's org.""" # noqa: E501
return sync_detailed(
client=client,
@ -99,8 +98,7 @@ async def asyncio(
client: Client,
) -> Optional[Union[Customer, Error]]:
"""This includes billing address, phone, and name.
This endpoint requires authentication by an org admin. It gets the payment information for the authenticated user's org.
""" # noqa: E501
This endpoint requires authentication by an org admin. It gets the payment information for the authenticated user's org.""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -72,8 +72,7 @@ def sync(
client: Client,
) -> Optional[Union[Customer, Error]]:
"""This includes billing address, phone, and name.
This endpoint requires authentication by any Zoo user. It gets the payment information for the authenticated user.
""" # noqa: E501
This endpoint requires authentication by any Zoo user. It gets the payment information for the authenticated user.""" # noqa: E501
return sync_detailed(
client=client,
@ -99,8 +98,7 @@ async def asyncio(
client: Client,
) -> Optional[Union[Customer, Error]]:
"""This includes billing address, phone, and name.
This endpoint requires authentication by any Zoo user. It gets the payment information for the authenticated user.
""" # noqa: E501
This endpoint requires authentication by any Zoo user. It gets the payment information for the authenticated user.""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -78,8 +78,7 @@ def sync(
client: Client,
) -> Optional[Union[Customer, Error]]:
"""This includes billing address, phone, and name.
This endpoint requires authentication by an org admin. It updates the payment information for the authenticated user's org.
""" # noqa: E501
This endpoint requires authentication by an org admin. It updates the payment information for the authenticated user's org.""" # noqa: E501
return sync_detailed(
body=body,
@ -109,8 +108,7 @@ async def asyncio(
client: Client,
) -> Optional[Union[Customer, Error]]:
"""This includes billing address, phone, and name.
This endpoint requires authentication by an org admin. It updates the payment information for the authenticated user's org.
""" # noqa: E501
This endpoint requires authentication by an org admin. It updates the payment information for the authenticated user's org.""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -78,8 +78,7 @@ def sync(
client: Client,
) -> Optional[Union[Customer, Error]]:
"""This includes billing address, phone, and name.
This endpoint requires authentication by any Zoo user. It updates the payment information for the authenticated user.
""" # noqa: E501
This endpoint requires authentication by any Zoo user. It updates the payment information for the authenticated user.""" # noqa: E501
return sync_detailed(
body=body,
@ -109,8 +108,7 @@ async def asyncio(
client: Client,
) -> Optional[Union[Customer, Error]]:
"""This includes billing address, phone, and name.
This endpoint requires authentication by any Zoo user. It updates the payment information for the authenticated user.
""" # noqa: E501
This endpoint requires authentication by any Zoo user. It updates the payment information for the authenticated user.""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -1 +1 @@
""" Contains methods for accessing the service_accounts API paths: Service accounts allow organizations to call the API. Organization admins can create, delete, and list the service accounts for their org. Service accounts are scoped to an organization not individual users, these are better to use for automations than individual API tokens, since they won't stop working when an individual leaves the company. """ # noqa: E501
"""Contains methods for accessing the service_accounts API paths: Service accounts allow organizations to call the API. Organization admins can create, delete, and list the service accounts for their org. Service accounts are scoped to an organization not individual users, these are better to use for automations than individual API tokens, since they won't stop working when an individual leaves the company.""" # noqa: E501

View File

@ -18,7 +18,6 @@ def _get_kwargs(
) # noqa: E501
if label is not None:
if "?" in url:
url = url + "&label=" + str(label)
else:

View File

@ -73,8 +73,7 @@ def sync(
client: Client,
) -> Optional[Error]:
"""This endpoint requires authentication by an org admin. It deletes the requested service account for the organization.
This endpoint does not actually delete the service account from the database. It merely marks the token as invalid. We still want to keep the service account in the database for historical purposes.
""" # noqa: E501
This endpoint does not actually delete the service account from the database. It merely marks the token as invalid. We still want to keep the service account in the database for historical purposes.""" # noqa: E501
return sync_detailed(
token=token,
@ -104,8 +103,7 @@ async def asyncio(
client: Client,
) -> Optional[Error]:
"""This endpoint requires authentication by an org admin. It deletes the requested service account for the organization.
This endpoint does not actually delete the service account from the database. It merely marks the token as invalid. We still want to keep the service account in the database for historical purposes.
""" # noqa: E501
This endpoint does not actually delete the service account from the database. It merely marks the token as invalid. We still want to keep the service account in the database for historical purposes.""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -21,21 +21,18 @@ def _get_kwargs(
) # 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:
@ -108,8 +105,7 @@ def sync(
page_token: Optional[str] = None,
) -> Optional[Union[ServiceAccountResultsPage, Error]]:
"""This endpoint requires authentication by an org admin. It returns the service accounts for the organization.
The service accounts are returned in order of creation, with the most recently created service accounts first.
""" # noqa: E501
The service accounts are returned in order of creation, with the most recently created service accounts first.""" # noqa: E501
return sync_detailed(
limit=limit,
@ -147,8 +143,7 @@ async def asyncio(
page_token: Optional[str] = None,
) -> Optional[Union[ServiceAccountResultsPage, Error]]:
"""This endpoint requires authentication by an org admin. It returns the service accounts for the organization.
The service accounts are returned in order of creation, with the most recently created service accounts first.
""" # noqa: E501
The service accounts are returned in order of creation, with the most recently created service accounts first.""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -1 +1 @@
""" Contains methods for accessing the store API paths: Operations involving our swag store. """ # noqa: E501
"""Contains methods for accessing the store API paths: Operations involving our swag store.""" # noqa: E501

View File

@ -1 +1 @@
""" Contains methods for accessing the unit API paths: Unit conversion operations. """ # noqa: E501
"""Contains methods for accessing the unit API paths: Unit conversion operations.""" # noqa: E501

View File

@ -23,7 +23,6 @@ def _get_kwargs(
) # noqa: E501
if value is not None:
if "?" in url:
url = url + "&value=" + str(value)
else:

View File

@ -23,7 +23,6 @@ def _get_kwargs(
) # noqa: E501
if value is not None:
if "?" in url:
url = url + "&value=" + str(value)
else:

View File

@ -23,7 +23,6 @@ def _get_kwargs(
) # noqa: E501
if value is not None:
if "?" in url:
url = url + "&value=" + str(value)
else:

View File

@ -23,7 +23,6 @@ def _get_kwargs(
) # noqa: E501
if value is not None:
if "?" in url:
url = url + "&value=" + str(value)
else:

View File

@ -23,7 +23,6 @@ def _get_kwargs(
) # noqa: E501
if value is not None:
if "?" in url:
url = url + "&value=" + str(value)
else:

View File

@ -23,7 +23,6 @@ def _get_kwargs(
) # noqa: E501
if value is not None:
if "?" in url:
url = url + "&value=" + str(value)
else:

View File

@ -23,7 +23,6 @@ def _get_kwargs(
) # noqa: E501
if value is not None:
if "?" in url:
url = url + "&value=" + str(value)
else:

View File

@ -23,7 +23,6 @@ def _get_kwargs(
) # noqa: E501
if value is not None:
if "?" in url:
url = url + "&value=" + str(value)
else:

View File

@ -23,7 +23,6 @@ def _get_kwargs(
) # noqa: E501
if value is not None:
if "?" in url:
url = url + "&value=" + str(value)
else:

View File

@ -23,7 +23,6 @@ def _get_kwargs(
) # noqa: E501
if value is not None:
if "?" in url:
url = url + "&value=" + str(value)
else:

View File

@ -23,7 +23,6 @@ def _get_kwargs(
) # noqa: E501
if value is not None:
if "?" in url:
url = url + "&value=" + str(value)
else:

View File

@ -23,7 +23,6 @@ def _get_kwargs(
) # noqa: E501
if value is not None:
if "?" in url:
url = url + "&value=" + str(value)
else:

View File

@ -23,7 +23,6 @@ def _get_kwargs(
) # noqa: E501
if value is not None:
if "?" in url:
url = url + "&value=" + str(value)
else:

View File

@ -1 +1 @@
""" Contains methods for accessing the users API paths: A user is someone who uses the Zoo API. Here, we can create, delete, and list users. We can also get information about a user. Operations will only be authorized if the user is requesting information about themselves. """ # noqa: E501
"""Contains methods for accessing the users API paths: A user is someone who uses the Zoo API. Here, we can create, delete, and list users. We can also get information about a user. Operations will only be authorized if the user is requesting information about themselves.""" # noqa: E501

View File

@ -67,8 +67,7 @@ def sync(
client: Client,
) -> Optional[Error]:
"""This endpoint requires authentication by any Zoo user. It deletes the authenticated user from Zoo's database.
This call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance.
""" # noqa: E501
This call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance.""" # noqa: E501
return sync_detailed(
client=client,
@ -94,8 +93,7 @@ async def asyncio(
client: Client,
) -> Optional[Error]:
"""This endpoint requires authentication by any Zoo user. It deletes the authenticated user from Zoo's database.
This call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance.
""" # noqa: E501
This call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance.""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -74,8 +74,7 @@ def sync(
client: Client,
) -> Optional[Union[List[AccountProvider], Error]]:
"""If this returns an empty array, then the user has not connected any OAuth2 providers and uses raw email authentication.
This endpoint requires authentication by any Zoo user. It gets the providers for the authenticated user.
""" # noqa: E501
This endpoint requires authentication by any Zoo user. It gets the providers for the authenticated user.""" # noqa: E501
return sync_detailed(
client=client,
@ -101,8 +100,7 @@ async def asyncio(
client: Client,
) -> Optional[Union[List[AccountProvider], Error]]:
"""If this returns an empty array, then the user has not connected any OAuth2 providers and uses raw email authentication.
This endpoint requires authentication by any Zoo user. It gets the providers for the authenticated user.
""" # noqa: E501
This endpoint requires authentication by any Zoo user. It gets the providers for the authenticated user.""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -21,21 +21,18 @@ def _get_kwargs(
) # 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:

View File

@ -21,21 +21,18 @@ def _get_kwargs(
) # 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:

View File

@ -160,7 +160,7 @@ def test_file_convert_stl():
# Make sure the bytes are not empty.
for key, value in fc.outputs.items():
assert len(value.get_decoded()) > 0
assert len(value) > 0
@pytest.mark.asyncio
@ -174,14 +174,14 @@ async def test_file_convert_stl_async():
file.close()
# Get the fc.
result: Optional[Union[FileConversion, Error]] = (
await create_file_conversion.asyncio(
result: Optional[
Union[FileConversion, Error]
] = await create_file_conversion.asyncio(
client=client,
body=content,
src_format=FileImportFormat.STL,
output_format=FileExportFormat.OBJ,
)
)
assert isinstance(result, FileConversion)
@ -199,7 +199,7 @@ async def test_file_convert_stl_async():
# Make sure the bytes are not empty.
for key, value in fc.outputs.items():
assert len(value.get_decoded()) > 0
assert len(value) > 0
@pytest.mark.asyncio
@ -213,14 +213,14 @@ async def test_file_convert_obj_async():
file.close()
# Get the fc.
result: Optional[Union[FileConversion, Error]] = (
await create_file_conversion.asyncio(
result: Optional[
Union[FileConversion, Error]
] = await create_file_conversion.asyncio(
client=client,
body=content,
src_format=FileImportFormat.OBJ,
output_format=FileExportFormat.STL,
)
)
assert isinstance(result, FileConversion)
@ -238,7 +238,7 @@ async def test_file_convert_obj_async():
# Make sure the bytes are not empty.
for key, value in fc.outputs.items():
assert len(value.get_decoded()) > 0
assert len(value) > 0
def test_file_mass():
@ -508,7 +508,7 @@ def test_ws_import():
# Break since now we know it was a success.
png_contents = message_dict["resp"]["data"]["modeling_response"][
"data"
]["contents"].get_decoded()
]["contents"]
break
# Save the contents to a file.
@ -534,7 +534,27 @@ def test_serialize_deserialize():
assert model_dump["request_id"] == "16a06065-6ca3-4a96-a042-d0bec6b161a6" # type: ignore
assert model_dump["resp"]["type"] == "modeling" # type: ignore
assert model_dump["resp"]["data"]["modeling_response"]["type"] == "import_files" # type: ignore
assert model_dump["resp"]["data"]["modeling_response"]["data"]["object_id"] == "f61ac02e-77bd-468f-858f-fd4141a26acd" # type: ignore
assert (
model_dump["resp"]["data"]["modeling_response"]["data"]["object_id"]
== "f61ac02e-77bd-468f-858f-fd4141a26acd"
) # type: ignore
def test_deserialize_null_request_id():
json_str = """{"success":true,"request_id":null,"resp":{"type":"modeling_session_data","data":{"session":{"api_call_id":"91f7fd17-8846-4593-97ff-6400a81b8cdd"}}}}"""
d = json.loads(json_str)
print(d)
message = WebSocketResponse(**d)
model_dump = message.model_dump()
print(model_dump)
assert model_dump["success"] is True # type: ignore
assert model_dump["success"] is True # type: ignore
assert model_dump["request_id"] is None # type: ignore
assert model_dump["resp"]["type"] == "modeling_session_data" # type: ignore
assert (
model_dump["resp"]["data"]["session"]["api_call_id"]
== "91f7fd17-8846-4593-97ff-6400a81b8cdd"
) # type: ignore
def test_text_to_cad():

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
""" Contains all the data models used in inputs/outputs """
"""Contains all the data models used in inputs/outputs"""
from .account_provider import AccountProvider
from .add_org_member import AddOrgMember

View File

@ -1,4 +1,3 @@
from pydantic import BaseModel, ConfigDict
from ..models.user_org_role import UserOrgRole

View File

@ -1,4 +1,3 @@
from pydantic import BaseModel, ConfigDict
from ..models.unit_angle import UnitAngle

View File

@ -1,4 +1,3 @@
from pydantic import BaseModel, ConfigDict
from ..models.annotation_line_end import AnnotationLineEnd

View File

@ -1,4 +1,3 @@
from pydantic import BaseModel, ConfigDict
from ..models.annotation_text_alignment_x import AnnotationTextAlignmentX

View File

@ -1,8 +1,6 @@
from pydantic import BaseModel, ConfigDict
class ApiCallQueryGroup(BaseModel):
"""A response for a query on the API call table that is grouped by something."""

View File

@ -1,4 +1,3 @@
from pydantic import BaseModel, ConfigDict
from ..models.error_code import ErrorCode

View File

@ -3,7 +3,6 @@ from typing import Optional
from pydantic import BaseModel, ConfigDict
class AppClientInfo(BaseModel):
"""Information about a third party app client."""

View File

@ -3,7 +3,6 @@ from typing import Optional
from pydantic import BaseModel, ConfigDict
class AuthCallback(BaseModel):
"""The authentication callback from the OAuth 2.0 client. This is typically posted to the redirect URL as query params after authenticating."""

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