Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions generated/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ docs/DetectorGroupsApi.md
docs/DetectorResetApi.md
docs/DetectorTypeEnum.md
docs/DetectorsApi.md
docs/EdgeApi.md
docs/EdgeModelInfo.md
docs/EscalationTypeEnum.md
docs/ImageQueriesApi.md
docs/ImageQuery.md
Expand Down Expand Up @@ -60,6 +62,7 @@ groundlight_openapi_client/api/actions_api.py
groundlight_openapi_client/api/detector_groups_api.py
groundlight_openapi_client/api/detector_reset_api.py
groundlight_openapi_client/api/detectors_api.py
groundlight_openapi_client/api/edge_api.py
groundlight_openapi_client/api/image_queries_api.py
groundlight_openapi_client/api/labels_api.py
groundlight_openapi_client/api/notes_api.py
Expand Down Expand Up @@ -87,6 +90,7 @@ groundlight_openapi_client/model/detector_creation_input_request.py
groundlight_openapi_client/model/detector_group.py
groundlight_openapi_client/model/detector_group_request.py
groundlight_openapi_client/model/detector_type_enum.py
groundlight_openapi_client/model/edge_model_info.py
groundlight_openapi_client/model/escalation_type_enum.py
groundlight_openapi_client/model/image_query.py
groundlight_openapi_client/model/image_query_type_enum.py
Expand Down Expand Up @@ -122,7 +126,4 @@ setup.cfg
setup.py
test-requirements.txt
test/__init__.py
test/test_text_recognition_result.py
test/test_webhook_action.py
test/test_webhook_action_request.py
tox.ini
2 changes: 2 additions & 0 deletions generated/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ Class | Method | HTTP request | Description
*DetectorsApi* | [**get_detector**](docs/DetectorsApi.md#get_detector) | **GET** /v1/detectors/{id} |
*DetectorsApi* | [**list_detectors**](docs/DetectorsApi.md#list_detectors) | **GET** /v1/detectors |
*DetectorsApi* | [**update_detector**](docs/DetectorsApi.md#update_detector) | **PATCH** /v1/detectors/{id} |
*EdgeApi* | [**get_model_urls**](docs/EdgeApi.md#get_model_urls) | **GET** /v1/edge/fetch-model-urls/{detector_id}/ |
*ImageQueriesApi* | [**get_image**](docs/ImageQueriesApi.md#get_image) | **GET** /v1/image-queries/{id}/image |
*ImageQueriesApi* | [**get_image_query**](docs/ImageQueriesApi.md#get_image_query) | **GET** /v1/image-queries/{id} |
*ImageQueriesApi* | [**list_image_queries**](docs/ImageQueriesApi.md#list_image_queries) | **GET** /v1/image-queries |
Expand Down Expand Up @@ -154,6 +155,7 @@ Class | Method | HTTP request | Description
- [DetectorGroup](docs/DetectorGroup.md)
- [DetectorGroupRequest](docs/DetectorGroupRequest.md)
- [DetectorTypeEnum](docs/DetectorTypeEnum.md)
- [EdgeModelInfo](docs/EdgeModelInfo.md)
- [EscalationTypeEnum](docs/EscalationTypeEnum.md)
- [ImageQuery](docs/ImageQuery.md)
- [ImageQueryTypeEnum](docs/ImageQueryTypeEnum.md)
Expand Down
2 changes: 1 addition & 1 deletion generated/docs/Detector.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Detector

Spec for serializing a detector object in the public API.
Groundlight Detectors provide answers to natural language questions about images. Each detector can answer a single question, and multiple detectors can be strung together for more complex logic. Detectors can be created through the create_detector method, or through the create_[MODE]_detector methods for pro tier users

## Properties
Name | Type | Description | Notes
Expand Down
86 changes: 86 additions & 0 deletions generated/docs/EdgeApi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# groundlight_openapi_client.EdgeApi

All URIs are relative to *https://api.groundlight.ai/device-api*

Method | HTTP request | Description
------------- | ------------- | -------------
[**get_model_urls**](EdgeApi.md#get_model_urls) | **GET** /v1/edge/fetch-model-urls/{detector_id}/ |


# **get_model_urls**
> EdgeModelInfo get_model_urls(detector_id)



Gets time limited pre-authenticated URLs to download a detector's edge model and oodd model.

### Example

* Api Key Authentication (ApiToken):

```python
import time
import groundlight_openapi_client
from groundlight_openapi_client.api import edge_api
from groundlight_openapi_client.model.edge_model_info import EdgeModelInfo
from pprint import pprint
# Defining the host is optional and defaults to https://api.groundlight.ai/device-api
# See configuration.py for a list of all supported configuration parameters.
configuration = groundlight_openapi_client.Configuration(
host = "https://api.groundlight.ai/device-api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiToken
configuration.api_key['ApiToken'] = 'YOUR_API_KEY'

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiToken'] = 'Bearer'

# Enter a context with an instance of the API client
with groundlight_openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = edge_api.EdgeApi(api_client)
detector_id = "detector_id_example" # str |

# example passing only required values which don't have defaults set
try:
api_response = api_instance.get_model_urls(detector_id)
pprint(api_response)
except groundlight_openapi_client.ApiException as e:
print("Exception when calling EdgeApi->get_model_urls: %s\n" % e)
```


### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**detector_id** | **str**| |

### Return type

[**EdgeModelInfo**](EdgeModelInfo.md)

### Authorization

[ApiToken](../README.md#ApiToken)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json


### HTTP response details

| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | | - |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

19 changes: 19 additions & 0 deletions generated/docs/EdgeModelInfo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# EdgeModelInfo

Information for the model running on edge, including temporary presigned urls to the model binaries

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**model_binary_id** | **str** | | [optional]
**model_binary_url** | **str** | | [optional]
**oodd_model_binary_id** | **str** | | [optional]
**oodd_model_binary_url** | **str** | | [optional]
**pipeline_config** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional]
**oodd_pipeline_config** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional]
**predictor_metadata** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional]
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


2 changes: 1 addition & 1 deletion generated/docs/ImageQuery.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ImageQuery

Spec for serializing a image-query object in the public API.
ImageQuery objects are the answers to natural language questions about images created by detectors.

## Properties
Name | Type | Description | Notes
Expand Down
2 changes: 1 addition & 1 deletion generated/docs/PatchedDetectorRequest.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# PatchedDetectorRequest

Spec for serializing a detector object in the public API.
Groundlight Detectors provide answers to natural language questions about images. Each detector can answer a single question, and multiple detectors can be strung together for more complex logic. Detectors can be created through the create_detector method, or through the create_[MODE]_detector methods for pro tier users

## Properties
Name | Type | Description | Notes
Expand Down
135 changes: 135 additions & 0 deletions generated/groundlight_openapi_client/api/edge_api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
"""
Groundlight API

Groundlight makes it simple to understand images. You can easily create computer vision detectors just by describing what you want to know using natural language. # noqa: E501

The version of the OpenAPI document: 0.18.2
Contact: support@groundlight.ai
Generated by: https://openapi-generator.tech
"""

import re # noqa: F401
import sys # noqa: F401

from groundlight_openapi_client.api_client import ApiClient, Endpoint as _Endpoint
from groundlight_openapi_client.model_utils import ( # noqa: F401
check_allowed_values,
check_validations,
date,
datetime,
file_type,
none_type,
validate_and_convert_types,
)
from groundlight_openapi_client.model.edge_model_info import EdgeModelInfo


class EdgeApi(object):
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech

Do not edit the class manually.
"""

def __init__(self, api_client=None):
if api_client is None:
api_client = ApiClient()
self.api_client = api_client
self.get_model_urls_endpoint = _Endpoint(
settings={
"response_type": (EdgeModelInfo,),
"auth": ["ApiToken"],
"endpoint_path": "/v1/edge/fetch-model-urls/{detector_id}/",
"operation_id": "get_model_urls",
"http_method": "GET",
"servers": None,
},
params_map={
"all": [
"detector_id",
],
"required": [
"detector_id",
],
"nullable": [],
"enum": [],
"validation": [],
},
root_map={
"validations": {},
"allowed_values": {},
"openapi_types": {
"detector_id": (str,),
},
"attribute_map": {
"detector_id": "detector_id",
},
"location_map": {
"detector_id": "path",
},
"collection_format_map": {},
},
headers_map={
"accept": ["application/json"],
"content_type": [],
},
api_client=api_client,
)

def get_model_urls(self, detector_id, **kwargs):
"""get_model_urls # noqa: E501

Gets time limited pre-authenticated URLs to download a detector's edge model and oodd model. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True

>>> thread = api.get_model_urls(detector_id, async_req=True)
>>> result = thread.get()

Args:
detector_id (str):

Keyword Args:
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object
will be returned without reading/decoding response data.
Default is True.
_request_timeout (int/float/tuple): timeout setting for this request. If
one number provided, it will be total request timeout. It can also
be a pair (tuple) of (connection, read) timeouts.
Default is None.
_check_input_type (bool): specifies if type checking
should be done one the data sent to the server.
Default is True.
_check_return_type (bool): specifies if type checking
should be done one the data received from the server.
Default is True.
_spec_property_naming (bool): True if the variable names in the input data
are serialized names, as specified in the OpenAPI document.
False if the variable names in the input data
are pythonic names, e.g. snake case (default)
_content_type (str/None): force body content-type.
Default is None and content-type will be predicted by allowed
content-types and body.
_host_index (int/None): specifies the index of the server
that we want to use.
Default is read from the configuration.
async_req (bool): execute request asynchronously

Returns:
EdgeModelInfo
If the method is called asynchronously, returns the request
thread.
"""
kwargs["async_req"] = kwargs.get("async_req", False)
kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True)
kwargs["_preload_content"] = kwargs.get("_preload_content", True)
kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
kwargs["_check_return_type"] = kwargs.get("_check_return_type", True)
kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False)
kwargs["_content_type"] = kwargs.get("_content_type")
kwargs["_host_index"] = kwargs.get("_host_index")
kwargs["detector_id"] = detector_id
return self.get_model_urls_endpoint.call_with_http_info(**kwargs)
1 change: 1 addition & 0 deletions generated/groundlight_openapi_client/apis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from groundlight_openapi_client.api.detector_groups_api import DetectorGroupsApi
from groundlight_openapi_client.api.detector_reset_api import DetectorResetApi
from groundlight_openapi_client.api.detectors_api import DetectorsApi
from groundlight_openapi_client.api.edge_api import EdgeApi
from groundlight_openapi_client.api.image_queries_api import ImageQueriesApi
from groundlight_openapi_client.api.labels_api import LabelsApi
from groundlight_openapi_client.api.notes_api import NotesApi
Expand Down
Loading
Loading