2023-05-04 00:58:06 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								from  typing  import  Any ,  Dict ,  Optional ,  Union 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-06 20:35:34 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								import  httpx 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								from  . . . client  import  Client 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-06 22:41:11 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								from  . . . models . api_call_with_price_results_page  import  ApiCallWithPriceResultsPage 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-06 20:35:34 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								from  . . . models . created_at_sort_mode  import  CreatedAtSortMode 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-04 00:58:06 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								from  . . . models . error  import  Error 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-06 20:35:34 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								from  . . . types  import  Response 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-05-04 00:58:06 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-04-06 20:35:34 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								def  _get_kwargs ( 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-04 00:58:06 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    sort_by :  CreatedAtSortMode , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    * , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    client :  Client , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    limit :  Optional [ int ]  =  None , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    page_token :  Optional [ str ]  =  None , 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-06 20:35:34 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								)  - >  Dict [ str ,  Any ] : 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-27 16:01:20 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    url  =  " {} /api-calls " . format ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        client . base_url , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    )   # noqa: E501 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-05-04 00:58:06 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    if  limit  is  not  None : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        if  " ? "  in  url : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            url  =  url  +  " &limit= "  +  str ( limit ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        else : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            url  =  url  +  " ?limit= "  +  str ( limit ) 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-27 16:01:20 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-05-04 00:58:06 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    if  page_token  is  not  None : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        if  " ? "  in  url : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            url  =  url  +  " &page_token= "  +  str ( page_token ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        else : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            url  =  url  +  " ?page_token= "  +  str ( page_token ) 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-27 16:01:20 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-05-04 00:58:06 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    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 ( ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-11-27 16:01:20 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								def  _parse_response ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    * ,  response :  httpx . Response 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								)  - >  Optional [ Union [ ApiCallWithPriceResultsPage ,  Error ] ] : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    if  response . status_code  ==  200 : 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-28 23:50:50 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        response_200  =  ApiCallWithPriceResultsPage ( * * response . json ( ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-27 16:01:20 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  response_200 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    if  response . status_code  ==  400 : 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-28 23:50:50 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        response_4XX  =  Error ( * * response . json ( ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-27 16:01:20 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  response_4XX 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    if  response . status_code  ==  500 : 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-28 23:50:50 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        response_5XX  =  Error ( * * response . json ( ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-27 16:01:20 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  response_5XX 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-28 23:50:50 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    return  Error ( * * response . json ( ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-04 00:58:06 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								def  _build_response ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    * ,  response :  httpx . Response 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-27 16:01:20 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								)  - >  Response [ Optional [ Union [ ApiCallWithPriceResultsPage ,  Error ] ] ] : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-04 00:58:06 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    return  Response ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        status_code = response . status_code , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        content = response . content , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        headers = response . headers , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        parsed = _parse_response ( response = response ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    ) 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-06 20:35:34 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								def  sync_detailed ( 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-04 00:58:06 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    sort_by :  CreatedAtSortMode , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    * , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    client :  Client , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    limit :  Optional [ int ]  =  None , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    page_token :  Optional [ str ]  =  None , 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-27 16:01:20 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								)  - >  Response [ Optional [ Union [ ApiCallWithPriceResultsPage ,  Error ] ] ] : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-04 00:58:06 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    kwargs  =  _get_kwargs ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        limit = limit , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        page_token = page_token , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        sort_by = sort_by , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        client = client , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    ) 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-06 20:35:34 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-05-04 00:58:06 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    response  =  httpx . get ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        verify = client . verify_ssl , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        * * kwargs , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    ) 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-06 20:35:34 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-05-04 00:58:06 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    return  _build_response ( response = response ) 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-06 20:35:34 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								def  sync ( 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-04 00:58:06 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    sort_by :  CreatedAtSortMode , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    * , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    client :  Client , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    limit :  Optional [ int ]  =  None , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    page_token :  Optional [ str ]  =  None , 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-27 16:01:20 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								)  - >  Optional [ Union [ ApiCallWithPriceResultsPage ,  Error ] ] : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-04 00:58:06 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    """ This endpoint requires authentication by a KittyCAD employee. The API calls are returned in order of creation, with the most recently created API calls first. """   # noqa: E501 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-06 20:35:34 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-05-04 00:58:06 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    return  sync_detailed ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        limit = limit , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        page_token = page_token , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        sort_by = sort_by , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        client = client , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    ) . parsed 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-06 20:35:34 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								async  def  asyncio_detailed ( 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-04 00:58:06 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    sort_by :  CreatedAtSortMode , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    * , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    client :  Client , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    limit :  Optional [ int ]  =  None , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    page_token :  Optional [ str ]  =  None , 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-27 16:01:20 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								)  - >  Response [ Optional [ Union [ ApiCallWithPriceResultsPage ,  Error ] ] ] : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-04 00:58:06 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    kwargs  =  _get_kwargs ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        limit = limit , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        page_token = page_token , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        sort_by = sort_by , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        client = client , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    ) 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-06 20:35:34 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-05-04 00:58:06 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    async  with  httpx . AsyncClient ( verify = client . verify_ssl )  as  _client : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        response  =  await  _client . get ( * * kwargs ) 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-06 20:35:34 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-05-04 00:58:06 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    return  _build_response ( response = response ) 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-06 20:35:34 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								async  def  asyncio ( 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-04 00:58:06 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    sort_by :  CreatedAtSortMode , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    * , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    client :  Client , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    limit :  Optional [ int ]  =  None , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    page_token :  Optional [ str ]  =  None , 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-27 16:01:20 -08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								)  - >  Optional [ Union [ ApiCallWithPriceResultsPage ,  Error ] ] : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-04 00:58:06 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    """ This endpoint requires authentication by a KittyCAD employee. The API calls are returned in order of creation, with the most recently created API calls first. """   # noqa: E501 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    return  ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        await  asyncio_detailed ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            limit = limit , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            page_token = page_token , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            sort_by = sort_by , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            client = client , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    ) . parsed