kittycad / kittycad.py Goto Github PK
View Code? Open in Web Editor NEWThe Python API client for Zoo.
Home Page: https://zoo.dev/docs/api?lang=python
License: MIT License
The Python API client for Zoo.
Home Page: https://zoo.dev/docs/api?lang=python
License: MIT License
The LengthUnit only accepts int values and not floats. Non-integer inputs are rounded.
This prevents us from sketching arcs with non-integer radii, or extruding sketches to a non-integer depth.
This is a code generation error in the python lib only. In the typescript lib, LengthUnit is a number. In the rust crate, we use f64.
happening for modeling cmd which is a weird one
part of https://github.com/KittyCAD/website/issues/485
we should do that for deprecated fields/fns if so
When I try to create CAD models from text using the exact code from the documentation, I get this error:
File "------\venv\lib\site-packages\h11\_connection.py", line 520, in send return b"".join(data_list) TypeError: sequence item 1: expected a bytes-like object, tuple found
I realised this is beause the data_list that is being created in the send function has a tuple: ("prompt": <"whatever you put as prompt">)
If i manually change data_list to contain only the user prompt, I get this error:
error_code=None message='unable to parse JSON body: expected value at line 1 column 1' request_id='2cb8924a-3fb0-4224-8047-dbc2f746291c'
Return types for create_file_conversion_with_base64_helper.sync()
and .asyncio
are generated as Optional[Union[Any, Tuple[FileConversion, bytes], Error]]
Any
type because it negates type checkingThe desired return type is Union[Tuple[FileConversion, bytes], Error]]
or a hypothetical equivalent Union[FileConversionSuccess, Error]
Our Python client library still has the pagination token bug. The raw API command works as intended, but the client lib does not. See below:
curl "https://api.kittycad.io/users-extended?limit=10&sort_by=created-at-ascending" \ --header "Authorization: Bearer bb403021-6de8-4191-ae3f-c3015b4458a4" | jq
{
"next_page": "eyJ2IjoidjEiLCJwYWdlX3N0YXJ0Ijp7InNvcnRfYnkiOiJjcmVhdGVkLWF0LWFzY2VuZGluZyIsImxhc3Rfc2VlbiI6IjIwMjItMDEtMjdUMTk6NDM6MDIuMDU3WiJ9fQ==",
"items": [
{
"id": "ckv5prd3j000609mlnmwlpyw8",
"name": "Jess Frazelle",
"email": "[email protected]",
"image": "https://avatars.githubusercontent.com/u/1445228?v=4",
"phone": "",
"created_at": "2022-01-27T19:43:02.057Z",
"updated_at": "2022-01-30T02:46:07.284Z",
"github": "jessfraz",
"mailchimp_id": "f167b0eaf91fc1348ba18042504b7898",
"stripe_id": "cus_KTDi3DDw78NL4L",
"front_id": "crd_2cbq32k"
},
{
"id": "ckv5qow3c000608l03wos8i6c",
"email": "[email protected]",
"email_verified": "2022-03-11T01:57:51.293Z",
"image": "",
"phone": "",
"created_at": "2022-01-27T19:43:02.057Z",
"updated_at": "2022-03-11T01:57:51.425Z",
"mailchimp_id": "a54ba22c38f91ae92f3c3141a224ca31",
"stripe_id": "cus_KTTNd0YAsD59aR",
"front_id": "crd_2cbq1fw"
.
.
Continued
from kittycad.client import Client as Kittycad_Client
from kittycad.api.users.list_users_extended import *
import json
kittycad_client = Kittycad_Client(token="bb403021-6de8-4191-ae3f-c3015b4458a4")
response = sync(
sort_by = "created-at-ascending",
client=kittycad_client,
limit = 10)
print(response)
Error(error_code=<kittycad.types.Unset object at 0x104ec1e20>, message='unable to parse query string: failed to parse pagination token: corrupted token', request_id='8d1216fe-7be3-42f6-86e4-bb45aa3349c9', additional_properties={})
This also fails if you use the following:
page_token=""
page_token=None
See discussion in: KittyCAD/litterbox#29
fv: FileVolume = create_file_volume.sync(
client=client,
body=content,
src_format=FileSourceFormat.OBJ)
fv.to_dict()
Errors with
Traceback (most recent call last):
File "/Users/kurthutten/kittycad/litterbox/tutorials/get_mass/get_mass.py", line 26, in <module>
fm.to_dict()
File "/Users/kurthutten/kittycad/litterbox/my_env/lib/python3.9/site-packages/kittycad/models/file_mass.py", line 42, in to_dict
id = self.id.value
AttributeError: 'Uuid' object has no attribute 'value'
Same thing for mass, and maybe others?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.