pixano_inference.client
Pixano inference client.
PixanoInferenceClient(**data)
Bases: Settings
Pixano Inference Client.
Source code in pixano_inference/settings.py
connect(url)
staticmethod
Connect to pixano inference.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
url
|
str
|
The URL of the pixano inference server. |
required |
Source code in pixano_inference/client.py
delete(path, **kwargs)
async
Perform a DELETE request to the pixano inference server.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
The path of the request. |
required |
kwargs
|
Any
|
The keyword arguments to pass to the request or httpx client. |
{}
|
Source code in pixano_inference/client.py
detection(request)
async
Perform an inference to perform zero-shot detection.
Source code in pixano_inference/client.py
get(path, **kwargs)
async
Perform a GET request to the pixano inference server.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
The path of the request. |
required |
kwargs
|
Any
|
The keyword arguments to pass to the request or httpx client. |
{}
|
Source code in pixano_inference/client.py
get_settings()
async
Get the settings for the pixano inference server.
inference(route, request, response_type)
async
Perform inference via a POST request to the pixano inference server.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
route
|
str
|
The route for the request. |
required |
request
|
BaseRequest
|
The request payload. |
required |
response_type
|
type[BaseResponse]
|
The expected response type. |
required |
Returns:
| Type | Description |
|---|---|
BaseResponse
|
The parsed response from the server. |
Source code in pixano_inference/client.py
list_models()
async
post(path, **kwargs)
async
Perform a POST request to the pixano inference server.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
The path of the request. |
required |
kwargs
|
Any
|
The keyword arguments to pass to the request or httpx client. |
{}
|
Source code in pixano_inference/client.py
put(path, **kwargs)
async
Perform a PUT request to the pixano inference server.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
The path of the request. |
required |
kwargs
|
Any
|
The keyword arguments to pass to the request or httpx client. |
{}
|
Source code in pixano_inference/client.py
segmentation(request)
async
Perform an inference to perform image segmentation.
Source code in pixano_inference/client.py
tracking(request)
async
Perform an inference to perform video tracking.
Source code in pixano_inference/client.py
vlm(request)
async
Perform an inference for vision-language model generation.
Source code in pixano_inference/client.py
raise_if_error(response)
Raise an error from a response.