diff --git a/Makefile b/Makefile index 98bcc509..f36630f5 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,8 @@ install-generator: install ## Install dependencies for SDK code generator generate: install-generator ## Generate the SDK from our public openapi spec node_modules/.bin/openapi-generator-cli generate -i spec/public-api.yaml \ -g python \ - -o ./generated + -o ./generated \ + --additional-properties=packageName=groundlight_openapi_client poetry run datamodel-codegen --input spec/public-api.yaml --output generated/model.py poetry run black . diff --git a/generated/.gitlab-ci.yml b/generated/.gitlab-ci.yml index 5a39c639..03ea3147 100644 --- a/generated/.gitlab-ci.yml +++ b/generated/.gitlab-ci.yml @@ -8,7 +8,7 @@ stages: script: - pip install -r requirements.txt - pip install -r test-requirements.txt - - pytest --cov=openapi_client + - pytest --cov=groundlight_openapi_client test-3.6: extends: .tests diff --git a/generated/.openapi-generator/FILES b/generated/.openapi-generator/FILES index e709f337..4d3ebbad 100644 --- a/generated/.openapi-generator/FILES +++ b/generated/.openapi-generator/FILES @@ -28,41 +28,41 @@ docs/RulesApi.md docs/User.md docs/UserApi.md git_push.sh -openapi_client/__init__.py -openapi_client/api/__init__.py -openapi_client/api/detectors_api.py -openapi_client/api/image_queries_api.py -openapi_client/api/images_api.py -openapi_client/api/notes_api.py -openapi_client/api/rules_api.py -openapi_client/api/user_api.py -openapi_client/api_client.py -openapi_client/apis/__init__.py -openapi_client/configuration.py -openapi_client/exceptions.py -openapi_client/model/__init__.py -openapi_client/model/action.py -openapi_client/model/classification_result.py -openapi_client/model/condition.py -openapi_client/model/detector.py -openapi_client/model/detector_creation_input.py -openapi_client/model/detector_type_enum.py -openapi_client/model/image_query.py -openapi_client/model/image_query_type_enum.py -openapi_client/model/inline_response200.py -openapi_client/model/note.py -openapi_client/model/note_creation_input.py -openapi_client/model/paginated_detector_list.py -openapi_client/model/paginated_image_query_list.py -openapi_client/model/paginated_rule_list.py -openapi_client/model/result_type_enum.py -openapi_client/model/rule.py -openapi_client/model/rule_base.py -openapi_client/model/rule_creation_input.py -openapi_client/model/user.py -openapi_client/model_utils.py -openapi_client/models/__init__.py -openapi_client/rest.py +groundlight_openapi_client/__init__.py +groundlight_openapi_client/api/__init__.py +groundlight_openapi_client/api/detectors_api.py +groundlight_openapi_client/api/image_queries_api.py +groundlight_openapi_client/api/images_api.py +groundlight_openapi_client/api/notes_api.py +groundlight_openapi_client/api/rules_api.py +groundlight_openapi_client/api/user_api.py +groundlight_openapi_client/api_client.py +groundlight_openapi_client/apis/__init__.py +groundlight_openapi_client/configuration.py +groundlight_openapi_client/exceptions.py +groundlight_openapi_client/model/__init__.py +groundlight_openapi_client/model/action.py +groundlight_openapi_client/model/classification_result.py +groundlight_openapi_client/model/condition.py +groundlight_openapi_client/model/detector.py +groundlight_openapi_client/model/detector_creation_input.py +groundlight_openapi_client/model/detector_type_enum.py +groundlight_openapi_client/model/image_query.py +groundlight_openapi_client/model/image_query_type_enum.py +groundlight_openapi_client/model/inline_response200.py +groundlight_openapi_client/model/note.py +groundlight_openapi_client/model/note_creation_input.py +groundlight_openapi_client/model/paginated_detector_list.py +groundlight_openapi_client/model/paginated_image_query_list.py +groundlight_openapi_client/model/paginated_rule_list.py +groundlight_openapi_client/model/result_type_enum.py +groundlight_openapi_client/model/rule.py +groundlight_openapi_client/model/rule_base.py +groundlight_openapi_client/model/rule_creation_input.py +groundlight_openapi_client/model/user.py +groundlight_openapi_client/model_utils.py +groundlight_openapi_client/models/__init__.py +groundlight_openapi_client/rest.py requirements.txt setup.cfg setup.py diff --git a/generated/.travis.yml b/generated/.travis.yml index 5b7949cc..7a48c12c 100644 --- a/generated/.travis.yml +++ b/generated/.travis.yml @@ -10,4 +10,4 @@ install: - "pip install -r requirements.txt" - "pip install -r test-requirements.txt" # command to run tests -script: pytest --cov=openapi_client +script: pytest --cov=groundlight_openapi_client diff --git a/generated/README.md b/generated/README.md index 323c6fb7..991169e8 100644 --- a/generated/README.md +++ b/generated/README.md @@ -1,4 +1,4 @@ -# openapi-client +# groundlight-openapi-client Easy Computer Vision powered by Natural Language This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: @@ -23,7 +23,7 @@ pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git Then import the package: ```python -import openapi_client +import groundlight_openapi_client ``` ### Setuptools @@ -37,7 +37,7 @@ python setup.py install --user Then import the package: ```python -import openapi_client +import groundlight_openapi_client ``` ## Getting Started @@ -47,15 +47,15 @@ Please follow the [installation procedure](#installation--usage) and then run th ```python import time -import openapi_client +import groundlight_openapi_client from pprint import pprint -from openapi_client.api import detectors_api -from openapi_client.model.detector import Detector -from openapi_client.model.detector_creation_input import DetectorCreationInput -from openapi_client.model.paginated_detector_list import PaginatedDetectorList +from groundlight_openapi_client.api import detectors_api +from groundlight_openapi_client.model.detector import Detector +from groundlight_openapi_client.model.detector_creation_input import DetectorCreationInput +from groundlight_openapi_client.model.paginated_detector_list import PaginatedDetectorList # 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 = openapi_client.Configuration( +configuration = groundlight_openapi_client.Configuration( host = "https://api.groundlight.ai/device-api" ) @@ -72,7 +72,7 @@ configuration.api_key['ApiToken'] = 'YOUR_API_KEY' # Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: +with groundlight_openapi_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = detectors_api.DetectorsApi(api_client) detector_creation_input = DetectorCreationInput( @@ -87,7 +87,7 @@ with openapi_client.ApiClient(configuration) as api_client: try: api_response = api_instance.create_detector(detector_creation_input) pprint(api_response) - except openapi_client.ApiException as e: + except groundlight_openapi_client.ApiException as e: print("Exception when calling DetectorsApi->create_detector: %s\n" % e) ``` @@ -152,21 +152,21 @@ support@groundlight.ai ## Notes for Large OpenAPI documents -If the OpenAPI document is large, imports in openapi_client.apis and openapi_client.models may fail with a +If the OpenAPI document is large, imports in groundlight_openapi_client.apis and groundlight_openapi_client.models may fail with a RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions: Solution 1: Use specific imports for apis and models like: -- `from openapi_client.api.default_api import DefaultApi` -- `from openapi_client.model.pet import Pet` +- `from groundlight_openapi_client.api.default_api import DefaultApi` +- `from groundlight_openapi_client.model.pet import Pet` Solution 2: Before importing the package, adjust the maximum recursion limit as shown below: ``` import sys sys.setrecursionlimit(1500) -import openapi_client -from openapi_client.apis import * -from openapi_client.models import * +import groundlight_openapi_client +from groundlight_openapi_client.apis import * +from groundlight_openapi_client.models import * ``` diff --git a/generated/docs/DetectorsApi.md b/generated/docs/DetectorsApi.md index de83e8bc..491e6d85 100644 --- a/generated/docs/DetectorsApi.md +++ b/generated/docs/DetectorsApi.md @@ -1,4 +1,4 @@ -# openapi_client.DetectorsApi +# groundlight_openapi_client.DetectorsApi All URIs are relative to *https://api.groundlight.ai/device-api* @@ -22,14 +22,14 @@ Create a new detector. ```python import time -import openapi_client -from openapi_client.api import detectors_api -from openapi_client.model.detector_creation_input import DetectorCreationInput -from openapi_client.model.detector import Detector +import groundlight_openapi_client +from groundlight_openapi_client.api import detectors_api +from groundlight_openapi_client.model.detector import Detector +from groundlight_openapi_client.model.detector_creation_input import DetectorCreationInput 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 = openapi_client.Configuration( +configuration = groundlight_openapi_client.Configuration( host = "https://api.groundlight.ai/device-api" ) @@ -45,7 +45,7 @@ configuration.api_key['ApiToken'] = 'YOUR_API_KEY' # configuration.api_key_prefix['ApiToken'] = 'Bearer' # Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: +with groundlight_openapi_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = detectors_api.DetectorsApi(api_client) detector_creation_input = DetectorCreationInput( @@ -61,7 +61,7 @@ with openapi_client.ApiClient(configuration) as api_client: try: api_response = api_instance.create_detector(detector_creation_input) pprint(api_response) - except openapi_client.ApiException as e: + except groundlight_openapi_client.ApiException as e: print("Exception when calling DetectorsApi->create_detector: %s\n" % e) ``` @@ -107,13 +107,13 @@ Retrieve a detector by its ID. ```python import time -import openapi_client -from openapi_client.api import detectors_api -from openapi_client.model.detector import Detector +import groundlight_openapi_client +from groundlight_openapi_client.api import detectors_api +from groundlight_openapi_client.model.detector import Detector 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 = openapi_client.Configuration( +configuration = groundlight_openapi_client.Configuration( host = "https://api.groundlight.ai/device-api" ) @@ -129,7 +129,7 @@ configuration.api_key['ApiToken'] = 'YOUR_API_KEY' # configuration.api_key_prefix['ApiToken'] = 'Bearer' # Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: +with groundlight_openapi_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = detectors_api.DetectorsApi(api_client) id = "id_example" # str | Choose a detector by its ID. @@ -138,7 +138,7 @@ with openapi_client.ApiClient(configuration) as api_client: try: api_response = api_instance.get_detector(id) pprint(api_response) - except openapi_client.ApiException as e: + except groundlight_openapi_client.ApiException as e: print("Exception when calling DetectorsApi->get_detector: %s\n" % e) ``` @@ -184,13 +184,13 @@ Retrieve a list of detectors. ```python import time -import openapi_client -from openapi_client.api import detectors_api -from openapi_client.model.paginated_detector_list import PaginatedDetectorList +import groundlight_openapi_client +from groundlight_openapi_client.api import detectors_api +from groundlight_openapi_client.model.paginated_detector_list import PaginatedDetectorList 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 = openapi_client.Configuration( +configuration = groundlight_openapi_client.Configuration( host = "https://api.groundlight.ai/device-api" ) @@ -206,7 +206,7 @@ configuration.api_key['ApiToken'] = 'YOUR_API_KEY' # configuration.api_key_prefix['ApiToken'] = 'Bearer' # Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: +with groundlight_openapi_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = detectors_api.DetectorsApi(api_client) page = 1 # int | A page number within the paginated result set. (optional) @@ -217,7 +217,7 @@ with openapi_client.ApiClient(configuration) as api_client: try: api_response = api_instance.list_detectors(page=page, page_size=page_size) pprint(api_response) - except openapi_client.ApiException as e: + except groundlight_openapi_client.ApiException as e: print("Exception when calling DetectorsApi->list_detectors: %s\n" % e) ``` diff --git a/generated/docs/ImageQueriesApi.md b/generated/docs/ImageQueriesApi.md index 03549c75..207ddadd 100644 --- a/generated/docs/ImageQueriesApi.md +++ b/generated/docs/ImageQueriesApi.md @@ -1,4 +1,4 @@ -# openapi_client.ImageQueriesApi +# groundlight_openapi_client.ImageQueriesApi All URIs are relative to *https://api.groundlight.ai/device-api* @@ -22,13 +22,13 @@ Retrieve an image-query by its ID. ```python import time -import openapi_client -from openapi_client.api import image_queries_api -from openapi_client.model.image_query import ImageQuery +import groundlight_openapi_client +from groundlight_openapi_client.api import image_queries_api +from groundlight_openapi_client.model.image_query import ImageQuery 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 = openapi_client.Configuration( +configuration = groundlight_openapi_client.Configuration( host = "https://api.groundlight.ai/device-api" ) @@ -44,7 +44,7 @@ configuration.api_key['ApiToken'] = 'YOUR_API_KEY' # configuration.api_key_prefix['ApiToken'] = 'Bearer' # Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: +with groundlight_openapi_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = image_queries_api.ImageQueriesApi(api_client) id = "id_example" # str | Choose an image query by its ID. @@ -53,7 +53,7 @@ with openapi_client.ApiClient(configuration) as api_client: try: api_response = api_instance.get_image_query(id) pprint(api_response) - except openapi_client.ApiException as e: + except groundlight_openapi_client.ApiException as e: print("Exception when calling ImageQueriesApi->get_image_query: %s\n" % e) ``` @@ -99,13 +99,13 @@ Retrieve a list of image-queries. ```python import time -import openapi_client -from openapi_client.api import image_queries_api -from openapi_client.model.paginated_image_query_list import PaginatedImageQueryList +import groundlight_openapi_client +from groundlight_openapi_client.api import image_queries_api +from groundlight_openapi_client.model.paginated_image_query_list import PaginatedImageQueryList 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 = openapi_client.Configuration( +configuration = groundlight_openapi_client.Configuration( host = "https://api.groundlight.ai/device-api" ) @@ -121,7 +121,7 @@ configuration.api_key['ApiToken'] = 'YOUR_API_KEY' # configuration.api_key_prefix['ApiToken'] = 'Bearer' # Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: +with groundlight_openapi_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = image_queries_api.ImageQueriesApi(api_client) page = 1 # int | A page number within the paginated result set. (optional) @@ -132,7 +132,7 @@ with openapi_client.ApiClient(configuration) as api_client: try: api_response = api_instance.list_image_queries(page=page, page_size=page_size) pprint(api_response) - except openapi_client.ApiException as e: + except groundlight_openapi_client.ApiException as e: print("Exception when calling ImageQueriesApi->list_image_queries: %s\n" % e) ``` @@ -179,13 +179,13 @@ Name | Type | Description | Notes ```python import time -import openapi_client -from openapi_client.api import image_queries_api -from openapi_client.model.image_query import ImageQuery +import groundlight_openapi_client +from groundlight_openapi_client.api import image_queries_api +from groundlight_openapi_client.model.image_query import ImageQuery 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 = openapi_client.Configuration( +configuration = groundlight_openapi_client.Configuration( host = "https://api.groundlight.ai/device-api" ) @@ -201,7 +201,7 @@ configuration.api_key['ApiToken'] = 'YOUR_API_KEY' # configuration.api_key_prefix['ApiToken'] = 'Bearer' # Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: +with groundlight_openapi_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = image_queries_api.ImageQueriesApi(api_client) detector_id = "detector_id_example" # str | Choose a detector by its ID. @@ -216,7 +216,7 @@ with openapi_client.ApiClient(configuration) as api_client: try: api_response = api_instance.submit_image_query(detector_id) pprint(api_response) - except openapi_client.ApiException as e: + except groundlight_openapi_client.ApiException as e: print("Exception when calling ImageQueriesApi->submit_image_query: %s\n" % e) # example passing only required values which don't have defaults set @@ -224,7 +224,7 @@ with openapi_client.ApiClient(configuration) as api_client: try: api_response = api_instance.submit_image_query(detector_id, inspection_id=inspection_id, human_review=human_review, patience_time=patience_time, want_async=want_async, metadata=metadata, body=body) pprint(api_response) - except openapi_client.ApiException as e: + except groundlight_openapi_client.ApiException as e: print("Exception when calling ImageQueriesApi->submit_image_query: %s\n" % e) ``` diff --git a/generated/docs/ImagesApi.md b/generated/docs/ImagesApi.md index 123e3f4c..f9c5cf72 100644 --- a/generated/docs/ImagesApi.md +++ b/generated/docs/ImagesApi.md @@ -1,4 +1,4 @@ -# openapi_client.ImagesApi +# groundlight_openapi_client.ImagesApi All URIs are relative to *https://api.groundlight.ai/device-api* @@ -20,12 +20,12 @@ Retrieve an image by its image query id. ```python import time -import openapi_client -from openapi_client.api import images_api +import groundlight_openapi_client +from groundlight_openapi_client.api import images_api 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 = openapi_client.Configuration( +configuration = groundlight_openapi_client.Configuration( host = "https://api.groundlight.ai/device-api" ) @@ -41,7 +41,7 @@ configuration.api_key['ApiToken'] = 'YOUR_API_KEY' # configuration.api_key_prefix['ApiToken'] = 'Bearer' # Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: +with groundlight_openapi_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = images_api.ImagesApi(api_client) id = "id_example" # str | Choose an image by its image query id. @@ -50,7 +50,7 @@ with openapi_client.ApiClient(configuration) as api_client: try: api_response = api_instance.get_image(id) pprint(api_response) - except openapi_client.ApiException as e: + except groundlight_openapi_client.ApiException as e: print("Exception when calling ImagesApi->get_image: %s\n" % e) ``` diff --git a/generated/docs/NotesApi.md b/generated/docs/NotesApi.md index 05905728..844701d4 100644 --- a/generated/docs/NotesApi.md +++ b/generated/docs/NotesApi.md @@ -1,4 +1,4 @@ -# openapi_client.NotesApi +# groundlight_openapi_client.NotesApi All URIs are relative to *https://api.groundlight.ai/device-api* @@ -21,14 +21,14 @@ Create a new note. ```python import time -import openapi_client -from openapi_client.api import notes_api -from openapi_client.model.note import Note -from openapi_client.model.note_creation_input import NoteCreationInput +import groundlight_openapi_client +from groundlight_openapi_client.api import notes_api +from groundlight_openapi_client.model.note_creation_input import NoteCreationInput +from groundlight_openapi_client.model.note import Note 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 = openapi_client.Configuration( +configuration = groundlight_openapi_client.Configuration( host = "https://api.groundlight.ai/device-api" ) @@ -44,7 +44,7 @@ configuration.api_key['ApiToken'] = 'YOUR_API_KEY' # configuration.api_key_prefix['ApiToken'] = 'Bearer' # Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: +with groundlight_openapi_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = notes_api.NotesApi(api_client) detector_id = "detector_id_example" # str | the detector to associate the note with @@ -56,7 +56,7 @@ with openapi_client.ApiClient(configuration) as api_client: try: api_response = api_instance.create_note(detector_id, note_creation_input) pprint(api_response) - except openapi_client.ApiException as e: + except groundlight_openapi_client.ApiException as e: print("Exception when calling NotesApi->create_note: %s\n" % e) ``` @@ -103,13 +103,13 @@ Retrieve notes for a detector ```python import time -import openapi_client -from openapi_client.api import notes_api -from openapi_client.model.inline_response200 import InlineResponse200 +import groundlight_openapi_client +from groundlight_openapi_client.api import notes_api +from groundlight_openapi_client.model.inline_response200 import InlineResponse200 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 = openapi_client.Configuration( +configuration = groundlight_openapi_client.Configuration( host = "https://api.groundlight.ai/device-api" ) @@ -125,7 +125,7 @@ configuration.api_key['ApiToken'] = 'YOUR_API_KEY' # configuration.api_key_prefix['ApiToken'] = 'Bearer' # Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: +with groundlight_openapi_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = notes_api.NotesApi(api_client) detector_id = "detector_id_example" # str | the detector whose notes to retrieve @@ -134,7 +134,7 @@ with openapi_client.ApiClient(configuration) as api_client: try: api_response = api_instance.get_notes(detector_id) pprint(api_response) - except openapi_client.ApiException as e: + except groundlight_openapi_client.ApiException as e: print("Exception when calling NotesApi->get_notes: %s\n" % e) ``` diff --git a/generated/docs/RulesApi.md b/generated/docs/RulesApi.md index bf26e662..a147428a 100644 --- a/generated/docs/RulesApi.md +++ b/generated/docs/RulesApi.md @@ -1,4 +1,4 @@ -# openapi_client.RulesApi +# groundlight_openapi_client.RulesApi All URIs are relative to *https://api.groundlight.ai/device-api* @@ -23,14 +23,14 @@ Create a new rule for a detector. ```python import time -import openapi_client -from openapi_client.api import rules_api -from openapi_client.model.rule_creation_input import RuleCreationInput -from openapi_client.model.rule import Rule +import groundlight_openapi_client +from groundlight_openapi_client.api import rules_api +from groundlight_openapi_client.model.rule import Rule +from groundlight_openapi_client.model.rule_creation_input import RuleCreationInput 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 = openapi_client.Configuration( +configuration = groundlight_openapi_client.Configuration( host = "https://api.groundlight.ai/device-api" ) @@ -46,7 +46,7 @@ configuration.api_key['ApiToken'] = 'YOUR_API_KEY' # configuration.api_key_prefix['ApiToken'] = 'Bearer' # Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: +with groundlight_openapi_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = rules_api.RulesApi(api_client) detector_id = "detector_id_example" # str | Choose a detector by its ID. @@ -56,7 +56,7 @@ with openapi_client.ApiClient(configuration) as api_client: try: api_response = api_instance.create_rule(detector_id, rule_creation_input) pprint(api_response) - except openapi_client.ApiException as e: + except groundlight_openapi_client.ApiException as e: print("Exception when calling RulesApi->create_rule: %s\n" % e) ``` @@ -103,12 +103,12 @@ Delete a rule ```python import time -import openapi_client -from openapi_client.api import rules_api +import groundlight_openapi_client +from groundlight_openapi_client.api import rules_api 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 = openapi_client.Configuration( +configuration = groundlight_openapi_client.Configuration( host = "https://api.groundlight.ai/device-api" ) @@ -124,7 +124,7 @@ configuration.api_key['ApiToken'] = 'YOUR_API_KEY' # configuration.api_key_prefix['ApiToken'] = 'Bearer' # Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: +with groundlight_openapi_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = rules_api.RulesApi(api_client) id = 1 # int | Delete a rule by its ID. @@ -132,7 +132,7 @@ with openapi_client.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set try: api_instance.delete_rule(id) - except openapi_client.ApiException as e: + except groundlight_openapi_client.ApiException as e: print("Exception when calling RulesApi->delete_rule: %s\n" % e) ``` @@ -178,13 +178,13 @@ Retrieve a rule ```python import time -import openapi_client -from openapi_client.api import rules_api -from openapi_client.model.rule import Rule +import groundlight_openapi_client +from groundlight_openapi_client.api import rules_api +from groundlight_openapi_client.model.rule import Rule 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 = openapi_client.Configuration( +configuration = groundlight_openapi_client.Configuration( host = "https://api.groundlight.ai/device-api" ) @@ -200,7 +200,7 @@ configuration.api_key['ApiToken'] = 'YOUR_API_KEY' # configuration.api_key_prefix['ApiToken'] = 'Bearer' # Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: +with groundlight_openapi_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = rules_api.RulesApi(api_client) id = 1 # int | Get a rule by its ID. @@ -209,7 +209,7 @@ with openapi_client.ApiClient(configuration) as api_client: try: api_response = api_instance.get_rule(id) pprint(api_response) - except openapi_client.ApiException as e: + except groundlight_openapi_client.ApiException as e: print("Exception when calling RulesApi->get_rule: %s\n" % e) ``` @@ -255,13 +255,13 @@ Retrieve a list of rules. ```python import time -import openapi_client -from openapi_client.api import rules_api -from openapi_client.model.paginated_rule_list import PaginatedRuleList +import groundlight_openapi_client +from groundlight_openapi_client.api import rules_api +from groundlight_openapi_client.model.paginated_rule_list import PaginatedRuleList 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 = openapi_client.Configuration( +configuration = groundlight_openapi_client.Configuration( host = "https://api.groundlight.ai/device-api" ) @@ -277,7 +277,7 @@ configuration.api_key['ApiToken'] = 'YOUR_API_KEY' # configuration.api_key_prefix['ApiToken'] = 'Bearer' # Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: +with groundlight_openapi_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = rules_api.RulesApi(api_client) page = 1 # int | A page number within the paginated result set. (optional) @@ -288,7 +288,7 @@ with openapi_client.ApiClient(configuration) as api_client: try: api_response = api_instance.list_rules(page=page, page_size=page_size) pprint(api_response) - except openapi_client.ApiException as e: + except groundlight_openapi_client.ApiException as e: print("Exception when calling RulesApi->list_rules: %s\n" % e) ``` diff --git a/generated/docs/UserApi.md b/generated/docs/UserApi.md index b6962c3f..91367f4c 100644 --- a/generated/docs/UserApi.md +++ b/generated/docs/UserApi.md @@ -1,4 +1,4 @@ -# openapi_client.UserApi +# groundlight_openapi_client.UserApi All URIs are relative to *https://api.groundlight.ai/device-api* @@ -20,13 +20,13 @@ Retrieve the current user. ```python import time -import openapi_client -from openapi_client.api import user_api -from openapi_client.model.user import User +import groundlight_openapi_client +from groundlight_openapi_client.api import user_api +from groundlight_openapi_client.model.user import User 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 = openapi_client.Configuration( +configuration = groundlight_openapi_client.Configuration( host = "https://api.groundlight.ai/device-api" ) @@ -42,7 +42,7 @@ configuration.api_key['ApiToken'] = 'YOUR_API_KEY' # configuration.api_key_prefix['ApiToken'] = 'Bearer' # Enter a context with an instance of the API client -with openapi_client.ApiClient(configuration) as api_client: +with groundlight_openapi_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = user_api.UserApi(api_client) @@ -50,7 +50,7 @@ with openapi_client.ApiClient(configuration) as api_client: try: api_response = api_instance.who_am_i() pprint(api_response) - except openapi_client.ApiException as e: + except groundlight_openapi_client.ApiException as e: print("Exception when calling UserApi->who_am_i: %s\n" % e) ``` diff --git a/generated/groundlight_openapi_client/__init__.py b/generated/groundlight_openapi_client/__init__.py new file mode 100644 index 00000000..2e7d7b62 --- /dev/null +++ b/generated/groundlight_openapi_client/__init__.py @@ -0,0 +1,28 @@ +# flake8: noqa + +""" + Groundlight API + + Easy Computer Vision powered by Natural Language # noqa: E501 + + The version of the OpenAPI document: 0.6.0 + Contact: support@groundlight.ai + Generated by: https://openapi-generator.tech +""" + + +__version__ = "1.0.0" + +# import ApiClient +from groundlight_openapi_client.api_client import ApiClient + +# import Configuration +from groundlight_openapi_client.configuration import Configuration + +# import exceptions +from groundlight_openapi_client.exceptions import OpenApiException +from groundlight_openapi_client.exceptions import ApiAttributeError +from groundlight_openapi_client.exceptions import ApiTypeError +from groundlight_openapi_client.exceptions import ApiValueError +from groundlight_openapi_client.exceptions import ApiKeyError +from groundlight_openapi_client.exceptions import ApiException diff --git a/generated/openapi_client/api/__init__.py b/generated/groundlight_openapi_client/api/__init__.py similarity index 74% rename from generated/openapi_client/api/__init__.py rename to generated/groundlight_openapi_client/api/__init__.py index 9c796d20..fdbe2951 100644 --- a/generated/openapi_client/api/__init__.py +++ b/generated/groundlight_openapi_client/api/__init__.py @@ -1,3 +1,3 @@ # do not import all apis into this module because that uses a lot of memory and stack frames # if you need the ability to import all apis from one package, import them with -# from openapi_client.apis import DetectorsApi +# from groundlight_openapi_client.apis import DetectorsApi diff --git a/generated/openapi_client/api/detectors_api.py b/generated/groundlight_openapi_client/api/detectors_api.py similarity index 97% rename from generated/openapi_client/api/detectors_api.py rename to generated/groundlight_openapi_client/api/detectors_api.py index d3019d78..da583d5e 100644 --- a/generated/openapi_client/api/detectors_api.py +++ b/generated/groundlight_openapi_client/api/detectors_api.py @@ -12,8 +12,8 @@ import re # noqa: F401 import sys # noqa: F401 -from openapi_client.api_client import ApiClient, Endpoint as _Endpoint -from openapi_client.model_utils import ( # 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, @@ -22,9 +22,9 @@ none_type, validate_and_convert_types, ) -from openapi_client.model.detector import Detector -from openapi_client.model.detector_creation_input import DetectorCreationInput -from openapi_client.model.paginated_detector_list import PaginatedDetectorList +from groundlight_openapi_client.model.detector import Detector +from groundlight_openapi_client.model.detector_creation_input import DetectorCreationInput +from groundlight_openapi_client.model.paginated_detector_list import PaginatedDetectorList class DetectorsApi(object): diff --git a/generated/openapi_client/api/image_queries_api.py b/generated/groundlight_openapi_client/api/image_queries_api.py similarity index 98% rename from generated/openapi_client/api/image_queries_api.py rename to generated/groundlight_openapi_client/api/image_queries_api.py index 4685e4cc..690d7035 100644 --- a/generated/openapi_client/api/image_queries_api.py +++ b/generated/groundlight_openapi_client/api/image_queries_api.py @@ -12,8 +12,8 @@ import re # noqa: F401 import sys # noqa: F401 -from openapi_client.api_client import ApiClient, Endpoint as _Endpoint -from openapi_client.model_utils import ( # 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, @@ -22,8 +22,8 @@ none_type, validate_and_convert_types, ) -from openapi_client.model.image_query import ImageQuery -from openapi_client.model.paginated_image_query_list import PaginatedImageQueryList +from groundlight_openapi_client.model.image_query import ImageQuery +from groundlight_openapi_client.model.paginated_image_query_list import PaginatedImageQueryList class ImageQueriesApi(object): diff --git a/generated/openapi_client/api/images_api.py b/generated/groundlight_openapi_client/api/images_api.py similarity index 97% rename from generated/openapi_client/api/images_api.py rename to generated/groundlight_openapi_client/api/images_api.py index 0093669b..382d2dea 100644 --- a/generated/openapi_client/api/images_api.py +++ b/generated/groundlight_openapi_client/api/images_api.py @@ -12,8 +12,8 @@ import re # noqa: F401 import sys # noqa: F401 -from openapi_client.api_client import ApiClient, Endpoint as _Endpoint -from openapi_client.model_utils import ( # 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, diff --git a/generated/openapi_client/api/notes_api.py b/generated/groundlight_openapi_client/api/notes_api.py similarity index 96% rename from generated/openapi_client/api/notes_api.py rename to generated/groundlight_openapi_client/api/notes_api.py index 707f9326..40961a2d 100644 --- a/generated/openapi_client/api/notes_api.py +++ b/generated/groundlight_openapi_client/api/notes_api.py @@ -12,8 +12,8 @@ import re # noqa: F401 import sys # noqa: F401 -from openapi_client.api_client import ApiClient, Endpoint as _Endpoint -from openapi_client.model_utils import ( # 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, @@ -22,9 +22,9 @@ none_type, validate_and_convert_types, ) -from openapi_client.model.inline_response200 import InlineResponse200 -from openapi_client.model.note import Note -from openapi_client.model.note_creation_input import NoteCreationInput +from groundlight_openapi_client.model.inline_response200 import InlineResponse200 +from groundlight_openapi_client.model.note import Note +from groundlight_openapi_client.model.note_creation_input import NoteCreationInput class NotesApi(object): diff --git a/generated/openapi_client/api/rules_api.py b/generated/groundlight_openapi_client/api/rules_api.py similarity index 97% rename from generated/openapi_client/api/rules_api.py rename to generated/groundlight_openapi_client/api/rules_api.py index d8669b15..d5324196 100644 --- a/generated/openapi_client/api/rules_api.py +++ b/generated/groundlight_openapi_client/api/rules_api.py @@ -12,8 +12,8 @@ import re # noqa: F401 import sys # noqa: F401 -from openapi_client.api_client import ApiClient, Endpoint as _Endpoint -from openapi_client.model_utils import ( # 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, @@ -22,9 +22,9 @@ none_type, validate_and_convert_types, ) -from openapi_client.model.paginated_rule_list import PaginatedRuleList -from openapi_client.model.rule import Rule -from openapi_client.model.rule_creation_input import RuleCreationInput +from groundlight_openapi_client.model.paginated_rule_list import PaginatedRuleList +from groundlight_openapi_client.model.rule import Rule +from groundlight_openapi_client.model.rule_creation_input import RuleCreationInput class RulesApi(object): diff --git a/generated/openapi_client/api/user_api.py b/generated/groundlight_openapi_client/api/user_api.py similarity index 95% rename from generated/openapi_client/api/user_api.py rename to generated/groundlight_openapi_client/api/user_api.py index 567c2dc1..0d9aab8c 100644 --- a/generated/openapi_client/api/user_api.py +++ b/generated/groundlight_openapi_client/api/user_api.py @@ -12,8 +12,8 @@ import re # noqa: F401 import sys # noqa: F401 -from openapi_client.api_client import ApiClient, Endpoint as _Endpoint -from openapi_client.model_utils import ( # 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, @@ -22,7 +22,7 @@ none_type, validate_and_convert_types, ) -from openapi_client.model.user import User +from groundlight_openapi_client.model.user import User class UserApi(object): diff --git a/generated/openapi_client/api_client.py b/generated/groundlight_openapi_client/api_client.py similarity index 99% rename from generated/openapi_client/api_client.py rename to generated/groundlight_openapi_client/api_client.py index b8909270..8c2cfd6b 100644 --- a/generated/openapi_client/api_client.py +++ b/generated/groundlight_openapi_client/api_client.py @@ -21,10 +21,10 @@ from urllib3.fields import RequestField -from openapi_client import rest -from openapi_client.configuration import Configuration -from openapi_client.exceptions import ApiTypeError, ApiValueError, ApiException -from openapi_client.model_utils import ( +from groundlight_openapi_client import rest +from groundlight_openapi_client.configuration import Configuration +from groundlight_openapi_client.exceptions import ApiTypeError, ApiValueError, ApiException +from groundlight_openapi_client.model_utils import ( ModelNormal, ModelSimple, ModelComposed, diff --git a/generated/openapi_client/apis/__init__.py b/generated/groundlight_openapi_client/apis/__init__.py similarity index 51% rename from generated/openapi_client/apis/__init__.py rename to generated/groundlight_openapi_client/apis/__init__.py index 4a530a64..92d4a63f 100644 --- a/generated/openapi_client/apis/__init__.py +++ b/generated/groundlight_openapi_client/apis/__init__.py @@ -13,9 +13,9 @@ # sys.setrecursionlimit(n) # Import APIs into API package: -from openapi_client.api.detectors_api import DetectorsApi -from openapi_client.api.image_queries_api import ImageQueriesApi -from openapi_client.api.images_api import ImagesApi -from openapi_client.api.notes_api import NotesApi -from openapi_client.api.rules_api import RulesApi -from openapi_client.api.user_api import UserApi +from groundlight_openapi_client.api.detectors_api import DetectorsApi +from groundlight_openapi_client.api.image_queries_api import ImageQueriesApi +from groundlight_openapi_client.api.images_api import ImagesApi +from groundlight_openapi_client.api.notes_api import NotesApi +from groundlight_openapi_client.api.rules_api import RulesApi +from groundlight_openapi_client.api.user_api import UserApi diff --git a/generated/openapi_client/configuration.py b/generated/groundlight_openapi_client/configuration.py similarity index 98% rename from generated/openapi_client/configuration.py rename to generated/groundlight_openapi_client/configuration.py index bc08b296..cc771021 100644 --- a/generated/openapi_client/configuration.py +++ b/generated/groundlight_openapi_client/configuration.py @@ -16,7 +16,7 @@ import urllib3 from http import client as http_client -from openapi_client.exceptions import ApiValueError +from groundlight_openapi_client.exceptions import ApiValueError JSON_SCHEMA_VALIDATION_KEYWORDS = { @@ -98,7 +98,7 @@ class Configuration(object): You can programmatically set the cookie: - conf = openapi_client.Configuration( + conf = groundlight_openapi_client.Configuration( api_key={'cookieAuth': 'abc123'} api_key_prefix={'cookieAuth': 'JSESSIONID'} ) @@ -166,7 +166,7 @@ def __init__( self.logger = {} """Logging Settings """ - self.logger["package_logger"] = logging.getLogger("openapi_client") + self.logger["package_logger"] = logging.getLogger("groundlight_openapi_client") self.logger["urllib3_logger"] = logging.getLogger("urllib3") self.logger_format = "%(asctime)s %(levelname)s %(message)s" """Log format diff --git a/generated/openapi_client/exceptions.py b/generated/groundlight_openapi_client/exceptions.py similarity index 100% rename from generated/openapi_client/exceptions.py rename to generated/groundlight_openapi_client/exceptions.py diff --git a/generated/openapi_client/model/__init__.py b/generated/groundlight_openapi_client/model/__init__.py similarity index 100% rename from generated/openapi_client/model/__init__.py rename to generated/groundlight_openapi_client/model/__init__.py diff --git a/generated/openapi_client/model/action.py b/generated/groundlight_openapi_client/model/action.py similarity index 98% rename from generated/openapi_client/model/action.py rename to generated/groundlight_openapi_client/model/action.py index d3547748..038da192 100644 --- a/generated/openapi_client/model/action.py +++ b/generated/groundlight_openapi_client/model/action.py @@ -12,7 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 -from openapi_client.model_utils import ( # noqa: F401 +from groundlight_openapi_client.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, @@ -27,7 +27,7 @@ validate_get_composed_info, OpenApiModel, ) -from openapi_client.exceptions import ApiAttributeError +from groundlight_openapi_client.exceptions import ApiAttributeError class Action(ModelNormal): diff --git a/generated/openapi_client/model/classification_result.py b/generated/groundlight_openapi_client/model/classification_result.py similarity index 98% rename from generated/openapi_client/model/classification_result.py rename to generated/groundlight_openapi_client/model/classification_result.py index ca092105..4bb25e45 100644 --- a/generated/openapi_client/model/classification_result.py +++ b/generated/groundlight_openapi_client/model/classification_result.py @@ -12,7 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 -from openapi_client.model_utils import ( # noqa: F401 +from groundlight_openapi_client.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, @@ -27,7 +27,7 @@ validate_get_composed_info, OpenApiModel, ) -from openapi_client.exceptions import ApiAttributeError +from groundlight_openapi_client.exceptions import ApiAttributeError class ClassificationResult(ModelNormal): diff --git a/generated/openapi_client/model/condition.py b/generated/groundlight_openapi_client/model/condition.py similarity index 98% rename from generated/openapi_client/model/condition.py rename to generated/groundlight_openapi_client/model/condition.py index 29549fb2..5010c099 100644 --- a/generated/openapi_client/model/condition.py +++ b/generated/groundlight_openapi_client/model/condition.py @@ -12,7 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 -from openapi_client.model_utils import ( # noqa: F401 +from groundlight_openapi_client.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, @@ -27,7 +27,7 @@ validate_get_composed_info, OpenApiModel, ) -from openapi_client.exceptions import ApiAttributeError +from groundlight_openapi_client.exceptions import ApiAttributeError class Condition(ModelNormal): diff --git a/generated/openapi_client/model/detector.py b/generated/groundlight_openapi_client/model/detector.py similarity index 98% rename from generated/openapi_client/model/detector.py rename to generated/groundlight_openapi_client/model/detector.py index 7b662265..faf8a37c 100644 --- a/generated/openapi_client/model/detector.py +++ b/generated/groundlight_openapi_client/model/detector.py @@ -12,7 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 -from openapi_client.model_utils import ( # noqa: F401 +from groundlight_openapi_client.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, @@ -27,11 +27,11 @@ validate_get_composed_info, OpenApiModel, ) -from openapi_client.exceptions import ApiAttributeError +from groundlight_openapi_client.exceptions import ApiAttributeError def lazy_import(): - from openapi_client.model.detector_type_enum import DetectorTypeEnum + from groundlight_openapi_client.model.detector_type_enum import DetectorTypeEnum globals()["DetectorTypeEnum"] = DetectorTypeEnum diff --git a/generated/openapi_client/model/detector_creation_input.py b/generated/groundlight_openapi_client/model/detector_creation_input.py similarity index 99% rename from generated/openapi_client/model/detector_creation_input.py rename to generated/groundlight_openapi_client/model/detector_creation_input.py index aede10a2..4f922f5c 100644 --- a/generated/openapi_client/model/detector_creation_input.py +++ b/generated/groundlight_openapi_client/model/detector_creation_input.py @@ -12,7 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 -from openapi_client.model_utils import ( # noqa: F401 +from groundlight_openapi_client.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, @@ -27,7 +27,7 @@ validate_get_composed_info, OpenApiModel, ) -from openapi_client.exceptions import ApiAttributeError +from groundlight_openapi_client.exceptions import ApiAttributeError class DetectorCreationInput(ModelNormal): diff --git a/generated/openapi_client/model/detector_type_enum.py b/generated/groundlight_openapi_client/model/detector_type_enum.py similarity index 98% rename from generated/openapi_client/model/detector_type_enum.py rename to generated/groundlight_openapi_client/model/detector_type_enum.py index 0a2c5c68..65b6573a 100644 --- a/generated/openapi_client/model/detector_type_enum.py +++ b/generated/groundlight_openapi_client/model/detector_type_enum.py @@ -12,7 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 -from openapi_client.model_utils import ( # noqa: F401 +from groundlight_openapi_client.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, @@ -27,7 +27,7 @@ validate_get_composed_info, OpenApiModel, ) -from openapi_client.exceptions import ApiAttributeError +from groundlight_openapi_client.exceptions import ApiAttributeError class DetectorTypeEnum(ModelSimple): diff --git a/generated/openapi_client/model/image_query.py b/generated/groundlight_openapi_client/model/image_query.py similarity index 97% rename from generated/openapi_client/model/image_query.py rename to generated/groundlight_openapi_client/model/image_query.py index 71d4d7a8..3862cdb3 100644 --- a/generated/openapi_client/model/image_query.py +++ b/generated/groundlight_openapi_client/model/image_query.py @@ -12,7 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 -from openapi_client.model_utils import ( # noqa: F401 +from groundlight_openapi_client.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, @@ -27,13 +27,13 @@ validate_get_composed_info, OpenApiModel, ) -from openapi_client.exceptions import ApiAttributeError +from groundlight_openapi_client.exceptions import ApiAttributeError def lazy_import(): - from openapi_client.model.classification_result import ClassificationResult - from openapi_client.model.image_query_type_enum import ImageQueryTypeEnum - from openapi_client.model.result_type_enum import ResultTypeEnum + from groundlight_openapi_client.model.classification_result import ClassificationResult + from groundlight_openapi_client.model.image_query_type_enum import ImageQueryTypeEnum + from groundlight_openapi_client.model.result_type_enum import ResultTypeEnum globals()["ClassificationResult"] = ClassificationResult globals()["ImageQueryTypeEnum"] = ImageQueryTypeEnum diff --git a/generated/openapi_client/model/image_query_type_enum.py b/generated/groundlight_openapi_client/model/image_query_type_enum.py similarity index 98% rename from generated/openapi_client/model/image_query_type_enum.py rename to generated/groundlight_openapi_client/model/image_query_type_enum.py index 780ee705..2aeb4cef 100644 --- a/generated/openapi_client/model/image_query_type_enum.py +++ b/generated/groundlight_openapi_client/model/image_query_type_enum.py @@ -12,7 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 -from openapi_client.model_utils import ( # noqa: F401 +from groundlight_openapi_client.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, @@ -27,7 +27,7 @@ validate_get_composed_info, OpenApiModel, ) -from openapi_client.exceptions import ApiAttributeError +from groundlight_openapi_client.exceptions import ApiAttributeError class ImageQueryTypeEnum(ModelSimple): diff --git a/generated/openapi_client/model/inline_response200.py b/generated/groundlight_openapi_client/model/inline_response200.py similarity index 98% rename from generated/openapi_client/model/inline_response200.py rename to generated/groundlight_openapi_client/model/inline_response200.py index 2b079c01..531b7fad 100644 --- a/generated/openapi_client/model/inline_response200.py +++ b/generated/groundlight_openapi_client/model/inline_response200.py @@ -12,7 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 -from openapi_client.model_utils import ( # noqa: F401 +from groundlight_openapi_client.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, @@ -27,11 +27,11 @@ validate_get_composed_info, OpenApiModel, ) -from openapi_client.exceptions import ApiAttributeError +from groundlight_openapi_client.exceptions import ApiAttributeError def lazy_import(): - from openapi_client.model.note import Note + from groundlight_openapi_client.model.note import Note globals()["Note"] = Note diff --git a/generated/openapi_client/model/note.py b/generated/groundlight_openapi_client/model/note.py similarity index 98% rename from generated/openapi_client/model/note.py rename to generated/groundlight_openapi_client/model/note.py index 896be3e4..f977d91c 100644 --- a/generated/openapi_client/model/note.py +++ b/generated/groundlight_openapi_client/model/note.py @@ -12,7 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 -from openapi_client.model_utils import ( # noqa: F401 +from groundlight_openapi_client.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, @@ -27,7 +27,7 @@ validate_get_composed_info, OpenApiModel, ) -from openapi_client.exceptions import ApiAttributeError +from groundlight_openapi_client.exceptions import ApiAttributeError class Note(ModelNormal): diff --git a/generated/openapi_client/model/note_creation_input.py b/generated/groundlight_openapi_client/model/note_creation_input.py similarity index 98% rename from generated/openapi_client/model/note_creation_input.py rename to generated/groundlight_openapi_client/model/note_creation_input.py index 77970e93..2b285cba 100644 --- a/generated/openapi_client/model/note_creation_input.py +++ b/generated/groundlight_openapi_client/model/note_creation_input.py @@ -12,7 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 -from openapi_client.model_utils import ( # noqa: F401 +from groundlight_openapi_client.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, @@ -27,7 +27,7 @@ validate_get_composed_info, OpenApiModel, ) -from openapi_client.exceptions import ApiAttributeError +from groundlight_openapi_client.exceptions import ApiAttributeError class NoteCreationInput(ModelNormal): diff --git a/generated/openapi_client/model/paginated_detector_list.py b/generated/groundlight_openapi_client/model/paginated_detector_list.py similarity index 98% rename from generated/openapi_client/model/paginated_detector_list.py rename to generated/groundlight_openapi_client/model/paginated_detector_list.py index 3671e4be..fceaa7e2 100644 --- a/generated/openapi_client/model/paginated_detector_list.py +++ b/generated/groundlight_openapi_client/model/paginated_detector_list.py @@ -12,7 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 -from openapi_client.model_utils import ( # noqa: F401 +from groundlight_openapi_client.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, @@ -27,11 +27,11 @@ validate_get_composed_info, OpenApiModel, ) -from openapi_client.exceptions import ApiAttributeError +from groundlight_openapi_client.exceptions import ApiAttributeError def lazy_import(): - from openapi_client.model.detector import Detector + from groundlight_openapi_client.model.detector import Detector globals()["Detector"] = Detector diff --git a/generated/openapi_client/model/paginated_image_query_list.py b/generated/groundlight_openapi_client/model/paginated_image_query_list.py similarity index 98% rename from generated/openapi_client/model/paginated_image_query_list.py rename to generated/groundlight_openapi_client/model/paginated_image_query_list.py index e5ce5285..2a095dd4 100644 --- a/generated/openapi_client/model/paginated_image_query_list.py +++ b/generated/groundlight_openapi_client/model/paginated_image_query_list.py @@ -12,7 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 -from openapi_client.model_utils import ( # noqa: F401 +from groundlight_openapi_client.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, @@ -27,11 +27,11 @@ validate_get_composed_info, OpenApiModel, ) -from openapi_client.exceptions import ApiAttributeError +from groundlight_openapi_client.exceptions import ApiAttributeError def lazy_import(): - from openapi_client.model.image_query import ImageQuery + from groundlight_openapi_client.model.image_query import ImageQuery globals()["ImageQuery"] = ImageQuery diff --git a/generated/openapi_client/model/paginated_rule_list.py b/generated/groundlight_openapi_client/model/paginated_rule_list.py similarity index 98% rename from generated/openapi_client/model/paginated_rule_list.py rename to generated/groundlight_openapi_client/model/paginated_rule_list.py index 9597e93a..c6153bb8 100644 --- a/generated/openapi_client/model/paginated_rule_list.py +++ b/generated/groundlight_openapi_client/model/paginated_rule_list.py @@ -12,7 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 -from openapi_client.model_utils import ( # noqa: F401 +from groundlight_openapi_client.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, @@ -27,11 +27,11 @@ validate_get_composed_info, OpenApiModel, ) -from openapi_client.exceptions import ApiAttributeError +from groundlight_openapi_client.exceptions import ApiAttributeError def lazy_import(): - from openapi_client.model.rule import Rule + from groundlight_openapi_client.model.rule import Rule globals()["Rule"] = Rule diff --git a/generated/openapi_client/model/result_type_enum.py b/generated/groundlight_openapi_client/model/result_type_enum.py similarity index 98% rename from generated/openapi_client/model/result_type_enum.py rename to generated/groundlight_openapi_client/model/result_type_enum.py index f3bc011a..3dc5b04a 100644 --- a/generated/openapi_client/model/result_type_enum.py +++ b/generated/groundlight_openapi_client/model/result_type_enum.py @@ -12,7 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 -from openapi_client.model_utils import ( # noqa: F401 +from groundlight_openapi_client.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, @@ -27,7 +27,7 @@ validate_get_composed_info, OpenApiModel, ) -from openapi_client.exceptions import ApiAttributeError +from groundlight_openapi_client.exceptions import ApiAttributeError class ResultTypeEnum(ModelSimple): diff --git a/generated/openapi_client/model/rule.py b/generated/groundlight_openapi_client/model/rule.py similarity index 98% rename from generated/openapi_client/model/rule.py rename to generated/groundlight_openapi_client/model/rule.py index c6a032e9..851ade06 100644 --- a/generated/openapi_client/model/rule.py +++ b/generated/groundlight_openapi_client/model/rule.py @@ -12,7 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 -from openapi_client.model_utils import ( # noqa: F401 +from groundlight_openapi_client.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, @@ -27,13 +27,13 @@ validate_get_composed_info, OpenApiModel, ) -from openapi_client.exceptions import ApiAttributeError +from groundlight_openapi_client.exceptions import ApiAttributeError def lazy_import(): - from openapi_client.model.action import Action - from openapi_client.model.condition import Condition - from openapi_client.model.rule_base import RuleBase + from groundlight_openapi_client.model.action import Action + from groundlight_openapi_client.model.condition import Condition + from groundlight_openapi_client.model.rule_base import RuleBase globals()["Action"] = Action globals()["Condition"] = Condition diff --git a/generated/openapi_client/model/rule_base.py b/generated/groundlight_openapi_client/model/rule_base.py similarity index 98% rename from generated/openapi_client/model/rule_base.py rename to generated/groundlight_openapi_client/model/rule_base.py index 61972202..24ec181d 100644 --- a/generated/openapi_client/model/rule_base.py +++ b/generated/groundlight_openapi_client/model/rule_base.py @@ -12,7 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 -from openapi_client.model_utils import ( # noqa: F401 +from groundlight_openapi_client.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, @@ -27,12 +27,12 @@ validate_get_composed_info, OpenApiModel, ) -from openapi_client.exceptions import ApiAttributeError +from groundlight_openapi_client.exceptions import ApiAttributeError def lazy_import(): - from openapi_client.model.action import Action - from openapi_client.model.condition import Condition + from groundlight_openapi_client.model.action import Action + from groundlight_openapi_client.model.condition import Condition globals()["Action"] = Action globals()["Condition"] = Condition diff --git a/generated/openapi_client/model/rule_creation_input.py b/generated/groundlight_openapi_client/model/rule_creation_input.py similarity index 97% rename from generated/openapi_client/model/rule_creation_input.py rename to generated/groundlight_openapi_client/model/rule_creation_input.py index 4ec92726..656294fe 100644 --- a/generated/openapi_client/model/rule_creation_input.py +++ b/generated/groundlight_openapi_client/model/rule_creation_input.py @@ -12,7 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 -from openapi_client.model_utils import ( # noqa: F401 +from groundlight_openapi_client.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, @@ -27,13 +27,13 @@ validate_get_composed_info, OpenApiModel, ) -from openapi_client.exceptions import ApiAttributeError +from groundlight_openapi_client.exceptions import ApiAttributeError def lazy_import(): - from openapi_client.model.action import Action - from openapi_client.model.condition import Condition - from openapi_client.model.rule_base import RuleBase + from groundlight_openapi_client.model.action import Action + from groundlight_openapi_client.model.condition import Condition + from groundlight_openapi_client.model.rule_base import RuleBase globals()["Action"] = Action globals()["Condition"] = Condition diff --git a/generated/openapi_client/model/user.py b/generated/groundlight_openapi_client/model/user.py similarity index 98% rename from generated/openapi_client/model/user.py rename to generated/groundlight_openapi_client/model/user.py index 95181191..d2633d88 100644 --- a/generated/openapi_client/model/user.py +++ b/generated/groundlight_openapi_client/model/user.py @@ -12,7 +12,7 @@ import re # noqa: F401 import sys # noqa: F401 -from openapi_client.model_utils import ( # noqa: F401 +from groundlight_openapi_client.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, @@ -27,7 +27,7 @@ validate_get_composed_info, OpenApiModel, ) -from openapi_client.exceptions import ApiAttributeError +from groundlight_openapi_client.exceptions import ApiAttributeError class User(ModelNormal): diff --git a/generated/openapi_client/model_utils.py b/generated/groundlight_openapi_client/model_utils.py similarity index 99% rename from generated/openapi_client/model_utils.py rename to generated/groundlight_openapi_client/model_utils.py index dd38d5b2..f362705b 100644 --- a/generated/openapi_client/model_utils.py +++ b/generated/groundlight_openapi_client/model_utils.py @@ -20,7 +20,7 @@ from dateutil.parser import parse -from openapi_client.exceptions import ( +from groundlight_openapi_client.exceptions import ( ApiKeyError, ApiAttributeError, ApiTypeError, diff --git a/generated/groundlight_openapi_client/models/__init__.py b/generated/groundlight_openapi_client/models/__init__.py new file mode 100644 index 00000000..d8c8de05 --- /dev/null +++ b/generated/groundlight_openapi_client/models/__init__.py @@ -0,0 +1,30 @@ +# flake8: noqa + +# import all models into this package +# if you have many models here with many references from one model to another this may +# raise a RecursionError +# to avoid this, import only the models that you directly need like: +# from from groundlight_openapi_client.model.pet import Pet +# or import this package, but before doing it, use: +# import sys +# sys.setrecursionlimit(n) + +from groundlight_openapi_client.model.action import Action +from groundlight_openapi_client.model.classification_result import ClassificationResult +from groundlight_openapi_client.model.condition import Condition +from groundlight_openapi_client.model.detector import Detector +from groundlight_openapi_client.model.detector_creation_input import DetectorCreationInput +from groundlight_openapi_client.model.detector_type_enum import DetectorTypeEnum +from groundlight_openapi_client.model.image_query import ImageQuery +from groundlight_openapi_client.model.image_query_type_enum import ImageQueryTypeEnum +from groundlight_openapi_client.model.inline_response200 import InlineResponse200 +from groundlight_openapi_client.model.note import Note +from groundlight_openapi_client.model.note_creation_input import NoteCreationInput +from groundlight_openapi_client.model.paginated_detector_list import PaginatedDetectorList +from groundlight_openapi_client.model.paginated_image_query_list import PaginatedImageQueryList +from groundlight_openapi_client.model.paginated_rule_list import PaginatedRuleList +from groundlight_openapi_client.model.result_type_enum import ResultTypeEnum +from groundlight_openapi_client.model.rule import Rule +from groundlight_openapi_client.model.rule_base import RuleBase +from groundlight_openapi_client.model.rule_creation_input import RuleCreationInput +from groundlight_openapi_client.model.user import User diff --git a/generated/openapi_client/rest.py b/generated/groundlight_openapi_client/rest.py similarity index 99% rename from generated/openapi_client/rest.py rename to generated/groundlight_openapi_client/rest.py index e53fef27..802db132 100644 --- a/generated/openapi_client/rest.py +++ b/generated/groundlight_openapi_client/rest.py @@ -20,7 +20,7 @@ import urllib3 import ipaddress -from openapi_client.exceptions import ( +from groundlight_openapi_client.exceptions import ( ApiException, UnauthorizedException, ForbiddenException, diff --git a/generated/model.py b/generated/model.py index 4c7131dd..b6d66807 100644 --- a/generated/model.py +++ b/generated/model.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: # filename: public-api.yaml -# timestamp: 2024-03-27T22:49:41+00:00 +# timestamp: 2024-04-04T00:11:29+00:00 from __future__ import annotations diff --git a/generated/openapi_client/__init__.py b/generated/openapi_client/__init__.py deleted file mode 100644 index 450ed1c3..00000000 --- a/generated/openapi_client/__init__.py +++ /dev/null @@ -1,28 +0,0 @@ -# flake8: noqa - -""" - Groundlight API - - Easy Computer Vision powered by Natural Language # noqa: E501 - - The version of the OpenAPI document: 0.6.0 - Contact: support@groundlight.ai - Generated by: https://openapi-generator.tech -""" - - -__version__ = "1.0.0" - -# import ApiClient -from openapi_client.api_client import ApiClient - -# import Configuration -from openapi_client.configuration import Configuration - -# import exceptions -from openapi_client.exceptions import OpenApiException -from openapi_client.exceptions import ApiAttributeError -from openapi_client.exceptions import ApiTypeError -from openapi_client.exceptions import ApiValueError -from openapi_client.exceptions import ApiKeyError -from openapi_client.exceptions import ApiException diff --git a/generated/openapi_client/models/__init__.py b/generated/openapi_client/models/__init__.py deleted file mode 100644 index b9f782d7..00000000 --- a/generated/openapi_client/models/__init__.py +++ /dev/null @@ -1,30 +0,0 @@ -# flake8: noqa - -# import all models into this package -# if you have many models here with many references from one model to another this may -# raise a RecursionError -# to avoid this, import only the models that you directly need like: -# from from openapi_client.model.pet import Pet -# or import this package, but before doing it, use: -# import sys -# sys.setrecursionlimit(n) - -from openapi_client.model.action import Action -from openapi_client.model.classification_result import ClassificationResult -from openapi_client.model.condition import Condition -from openapi_client.model.detector import Detector -from openapi_client.model.detector_creation_input import DetectorCreationInput -from openapi_client.model.detector_type_enum import DetectorTypeEnum -from openapi_client.model.image_query import ImageQuery -from openapi_client.model.image_query_type_enum import ImageQueryTypeEnum -from openapi_client.model.inline_response200 import InlineResponse200 -from openapi_client.model.note import Note -from openapi_client.model.note_creation_input import NoteCreationInput -from openapi_client.model.paginated_detector_list import PaginatedDetectorList -from openapi_client.model.paginated_image_query_list import PaginatedImageQueryList -from openapi_client.model.paginated_rule_list import PaginatedRuleList -from openapi_client.model.result_type_enum import ResultTypeEnum -from openapi_client.model.rule import Rule -from openapi_client.model.rule_base import RuleBase -from openapi_client.model.rule_creation_input import RuleCreationInput -from openapi_client.model.user import User diff --git a/generated/setup.py b/generated/setup.py index d366a82a..779cfb15 100644 --- a/generated/setup.py +++ b/generated/setup.py @@ -11,7 +11,7 @@ from setuptools import setup, find_packages # noqa: H301 -NAME = "openapi-client" +NAME = "groundlight-openapi-client" VERSION = "1.0.0" # To install the library, run the following # diff --git a/generated/test/test_action.py b/generated/test/test_action.py index c17c2d58..d8750a94 100644 --- a/generated/test/test_action.py +++ b/generated/test/test_action.py @@ -12,8 +12,8 @@ import sys import unittest -import openapi_client -from openapi_client.model.action import Action +import groundlight_openapi_client +from groundlight_openapi_client.model.action import Action class TestAction(unittest.TestCase): diff --git a/generated/test/test_classification_result.py b/generated/test/test_classification_result.py index 6dd6b90f..b5c999be 100644 --- a/generated/test/test_classification_result.py +++ b/generated/test/test_classification_result.py @@ -12,8 +12,8 @@ import sys import unittest -import openapi_client -from openapi_client.model.classification_result import ClassificationResult +import groundlight_openapi_client +from groundlight_openapi_client.model.classification_result import ClassificationResult class TestClassificationResult(unittest.TestCase): diff --git a/generated/test/test_condition.py b/generated/test/test_condition.py index 7c293ae3..31591291 100644 --- a/generated/test/test_condition.py +++ b/generated/test/test_condition.py @@ -12,8 +12,8 @@ import sys import unittest -import openapi_client -from openapi_client.model.condition import Condition +import groundlight_openapi_client +from groundlight_openapi_client.model.condition import Condition class TestCondition(unittest.TestCase): diff --git a/generated/test/test_detector.py b/generated/test/test_detector.py index 29d74084..c85df7b6 100644 --- a/generated/test/test_detector.py +++ b/generated/test/test_detector.py @@ -12,11 +12,11 @@ import sys import unittest -import openapi_client -from openapi_client.model.detector_type_enum import DetectorTypeEnum +import groundlight_openapi_client +from groundlight_openapi_client.model.detector_type_enum import DetectorTypeEnum globals()["DetectorTypeEnum"] = DetectorTypeEnum -from openapi_client.model.detector import Detector +from groundlight_openapi_client.model.detector import Detector class TestDetector(unittest.TestCase): diff --git a/generated/test/test_detector_creation_input.py b/generated/test/test_detector_creation_input.py index a0962314..4f32350c 100644 --- a/generated/test/test_detector_creation_input.py +++ b/generated/test/test_detector_creation_input.py @@ -12,8 +12,8 @@ import sys import unittest -import openapi_client -from openapi_client.model.detector_creation_input import DetectorCreationInput +import groundlight_openapi_client +from groundlight_openapi_client.model.detector_creation_input import DetectorCreationInput class TestDetectorCreationInput(unittest.TestCase): diff --git a/generated/test/test_detector_type_enum.py b/generated/test/test_detector_type_enum.py index cc98c8a2..007306e8 100644 --- a/generated/test/test_detector_type_enum.py +++ b/generated/test/test_detector_type_enum.py @@ -12,8 +12,8 @@ import sys import unittest -import openapi_client -from openapi_client.model.detector_type_enum import DetectorTypeEnum +import groundlight_openapi_client +from groundlight_openapi_client.model.detector_type_enum import DetectorTypeEnum class TestDetectorTypeEnum(unittest.TestCase): diff --git a/generated/test/test_detectors_api.py b/generated/test/test_detectors_api.py index 9b2151b2..7f0fb5e3 100644 --- a/generated/test/test_detectors_api.py +++ b/generated/test/test_detectors_api.py @@ -11,8 +11,8 @@ import unittest -import openapi_client -from openapi_client.api.detectors_api import DetectorsApi # noqa: E501 +import groundlight_openapi_client +from groundlight_openapi_client.api.detectors_api import DetectorsApi # noqa: E501 class TestDetectorsApi(unittest.TestCase): diff --git a/generated/test/test_image_queries_api.py b/generated/test/test_image_queries_api.py index 2891c08b..762cf4d0 100644 --- a/generated/test/test_image_queries_api.py +++ b/generated/test/test_image_queries_api.py @@ -11,8 +11,8 @@ import unittest -import openapi_client -from openapi_client.api.image_queries_api import ImageQueriesApi # noqa: E501 +import groundlight_openapi_client +from groundlight_openapi_client.api.image_queries_api import ImageQueriesApi # noqa: E501 class TestImageQueriesApi(unittest.TestCase): diff --git a/generated/test/test_image_query.py b/generated/test/test_image_query.py index 247deeff..e4a9cdbc 100644 --- a/generated/test/test_image_query.py +++ b/generated/test/test_image_query.py @@ -12,15 +12,15 @@ import sys import unittest -import openapi_client -from openapi_client.model.classification_result import ClassificationResult -from openapi_client.model.image_query_type_enum import ImageQueryTypeEnum -from openapi_client.model.result_type_enum import ResultTypeEnum +import groundlight_openapi_client +from groundlight_openapi_client.model.classification_result import ClassificationResult +from groundlight_openapi_client.model.image_query_type_enum import ImageQueryTypeEnum +from groundlight_openapi_client.model.result_type_enum import ResultTypeEnum globals()["ClassificationResult"] = ClassificationResult globals()["ImageQueryTypeEnum"] = ImageQueryTypeEnum globals()["ResultTypeEnum"] = ResultTypeEnum -from openapi_client.model.image_query import ImageQuery +from groundlight_openapi_client.model.image_query import ImageQuery class TestImageQuery(unittest.TestCase): diff --git a/generated/test/test_image_query_type_enum.py b/generated/test/test_image_query_type_enum.py index 203e49b9..41722b35 100644 --- a/generated/test/test_image_query_type_enum.py +++ b/generated/test/test_image_query_type_enum.py @@ -12,8 +12,8 @@ import sys import unittest -import openapi_client -from openapi_client.model.image_query_type_enum import ImageQueryTypeEnum +import groundlight_openapi_client +from groundlight_openapi_client.model.image_query_type_enum import ImageQueryTypeEnum class TestImageQueryTypeEnum(unittest.TestCase): diff --git a/generated/test/test_images_api.py b/generated/test/test_images_api.py index cf28ec51..4185ec7f 100644 --- a/generated/test/test_images_api.py +++ b/generated/test/test_images_api.py @@ -11,8 +11,8 @@ import unittest -import openapi_client -from openapi_client.api.images_api import ImagesApi # noqa: E501 +import groundlight_openapi_client +from groundlight_openapi_client.api.images_api import ImagesApi # noqa: E501 class TestImagesApi(unittest.TestCase): diff --git a/generated/test/test_inline_response200.py b/generated/test/test_inline_response200.py index d1322414..ebc03cfa 100644 --- a/generated/test/test_inline_response200.py +++ b/generated/test/test_inline_response200.py @@ -12,11 +12,11 @@ import sys import unittest -import openapi_client -from openapi_client.model.note import Note +import groundlight_openapi_client +from groundlight_openapi_client.model.note import Note globals()["Note"] = Note -from openapi_client.model.inline_response200 import InlineResponse200 +from groundlight_openapi_client.model.inline_response200 import InlineResponse200 class TestInlineResponse200(unittest.TestCase): diff --git a/generated/test/test_note.py b/generated/test/test_note.py index 084cc918..b8e2fe99 100644 --- a/generated/test/test_note.py +++ b/generated/test/test_note.py @@ -12,8 +12,8 @@ import sys import unittest -import openapi_client -from openapi_client.model.note import Note +import groundlight_openapi_client +from groundlight_openapi_client.model.note import Note class TestNote(unittest.TestCase): diff --git a/generated/test/test_note_creation_input.py b/generated/test/test_note_creation_input.py index 7e90332f..641ac12d 100644 --- a/generated/test/test_note_creation_input.py +++ b/generated/test/test_note_creation_input.py @@ -12,8 +12,8 @@ import sys import unittest -import openapi_client -from openapi_client.model.note_creation_input import NoteCreationInput +import groundlight_openapi_client +from groundlight_openapi_client.model.note_creation_input import NoteCreationInput class TestNoteCreationInput(unittest.TestCase): diff --git a/generated/test/test_notes_api.py b/generated/test/test_notes_api.py index 5d9dd849..b6a27551 100644 --- a/generated/test/test_notes_api.py +++ b/generated/test/test_notes_api.py @@ -11,8 +11,8 @@ import unittest -import openapi_client -from openapi_client.api.notes_api import NotesApi # noqa: E501 +import groundlight_openapi_client +from groundlight_openapi_client.api.notes_api import NotesApi # noqa: E501 class TestNotesApi(unittest.TestCase): diff --git a/generated/test/test_paginated_detector_list.py b/generated/test/test_paginated_detector_list.py index b609f47c..49ff7025 100644 --- a/generated/test/test_paginated_detector_list.py +++ b/generated/test/test_paginated_detector_list.py @@ -12,11 +12,11 @@ import sys import unittest -import openapi_client -from openapi_client.model.detector import Detector +import groundlight_openapi_client +from groundlight_openapi_client.model.detector import Detector globals()["Detector"] = Detector -from openapi_client.model.paginated_detector_list import PaginatedDetectorList +from groundlight_openapi_client.model.paginated_detector_list import PaginatedDetectorList class TestPaginatedDetectorList(unittest.TestCase): diff --git a/generated/test/test_paginated_image_query_list.py b/generated/test/test_paginated_image_query_list.py index 089c8620..a1303760 100644 --- a/generated/test/test_paginated_image_query_list.py +++ b/generated/test/test_paginated_image_query_list.py @@ -12,11 +12,11 @@ import sys import unittest -import openapi_client -from openapi_client.model.image_query import ImageQuery +import groundlight_openapi_client +from groundlight_openapi_client.model.image_query import ImageQuery globals()["ImageQuery"] = ImageQuery -from openapi_client.model.paginated_image_query_list import PaginatedImageQueryList +from groundlight_openapi_client.model.paginated_image_query_list import PaginatedImageQueryList class TestPaginatedImageQueryList(unittest.TestCase): diff --git a/generated/test/test_paginated_rule_list.py b/generated/test/test_paginated_rule_list.py index 69eede1f..7681cd3c 100644 --- a/generated/test/test_paginated_rule_list.py +++ b/generated/test/test_paginated_rule_list.py @@ -12,11 +12,11 @@ import sys import unittest -import openapi_client -from openapi_client.model.rule import Rule +import groundlight_openapi_client +from groundlight_openapi_client.model.rule import Rule globals()["Rule"] = Rule -from openapi_client.model.paginated_rule_list import PaginatedRuleList +from groundlight_openapi_client.model.paginated_rule_list import PaginatedRuleList class TestPaginatedRuleList(unittest.TestCase): diff --git a/generated/test/test_result_type_enum.py b/generated/test/test_result_type_enum.py index b89b0e7b..5ae61ea9 100644 --- a/generated/test/test_result_type_enum.py +++ b/generated/test/test_result_type_enum.py @@ -12,8 +12,8 @@ import sys import unittest -import openapi_client -from openapi_client.model.result_type_enum import ResultTypeEnum +import groundlight_openapi_client +from groundlight_openapi_client.model.result_type_enum import ResultTypeEnum class TestResultTypeEnum(unittest.TestCase): diff --git a/generated/test/test_rule.py b/generated/test/test_rule.py index 499c5156..bfd2af6b 100644 --- a/generated/test/test_rule.py +++ b/generated/test/test_rule.py @@ -12,15 +12,15 @@ import sys import unittest -import openapi_client -from openapi_client.model.action import Action -from openapi_client.model.condition import Condition -from openapi_client.model.rule_base import RuleBase +import groundlight_openapi_client +from groundlight_openapi_client.model.action import Action +from groundlight_openapi_client.model.condition import Condition +from groundlight_openapi_client.model.rule_base import RuleBase globals()["Action"] = Action globals()["Condition"] = Condition globals()["RuleBase"] = RuleBase -from openapi_client.model.rule import Rule +from groundlight_openapi_client.model.rule import Rule class TestRule(unittest.TestCase): diff --git a/generated/test/test_rule_base.py b/generated/test/test_rule_base.py index 9659986b..b71d9cf6 100644 --- a/generated/test/test_rule_base.py +++ b/generated/test/test_rule_base.py @@ -12,13 +12,13 @@ import sys import unittest -import openapi_client -from openapi_client.model.action import Action -from openapi_client.model.condition import Condition +import groundlight_openapi_client +from groundlight_openapi_client.model.action import Action +from groundlight_openapi_client.model.condition import Condition globals()["Action"] = Action globals()["Condition"] = Condition -from openapi_client.model.rule_base import RuleBase +from groundlight_openapi_client.model.rule_base import RuleBase class TestRuleBase(unittest.TestCase): diff --git a/generated/test/test_rule_creation_input.py b/generated/test/test_rule_creation_input.py index e6bc0b9f..bc399ffd 100644 --- a/generated/test/test_rule_creation_input.py +++ b/generated/test/test_rule_creation_input.py @@ -12,15 +12,15 @@ import sys import unittest -import openapi_client -from openapi_client.model.action import Action -from openapi_client.model.condition import Condition -from openapi_client.model.rule_base import RuleBase +import groundlight_openapi_client +from groundlight_openapi_client.model.action import Action +from groundlight_openapi_client.model.condition import Condition +from groundlight_openapi_client.model.rule_base import RuleBase globals()["Action"] = Action globals()["Condition"] = Condition globals()["RuleBase"] = RuleBase -from openapi_client.model.rule_creation_input import RuleCreationInput +from groundlight_openapi_client.model.rule_creation_input import RuleCreationInput class TestRuleCreationInput(unittest.TestCase): diff --git a/generated/test/test_rules_api.py b/generated/test/test_rules_api.py index b46fc9a5..2049ca60 100644 --- a/generated/test/test_rules_api.py +++ b/generated/test/test_rules_api.py @@ -11,8 +11,8 @@ import unittest -import openapi_client -from openapi_client.api.rules_api import RulesApi # noqa: E501 +import groundlight_openapi_client +from groundlight_openapi_client.api.rules_api import RulesApi # noqa: E501 class TestRulesApi(unittest.TestCase): diff --git a/generated/test/test_user.py b/generated/test/test_user.py index 8ec0f8ae..c50c69d9 100644 --- a/generated/test/test_user.py +++ b/generated/test/test_user.py @@ -12,8 +12,8 @@ import sys import unittest -import openapi_client -from openapi_client.model.user import User +import groundlight_openapi_client +from groundlight_openapi_client.model.user import User class TestUser(unittest.TestCase): diff --git a/generated/test/test_user_api.py b/generated/test/test_user_api.py index 6db083b1..6b3341bf 100644 --- a/generated/test/test_user_api.py +++ b/generated/test/test_user_api.py @@ -11,8 +11,8 @@ import unittest -import openapi_client -from openapi_client.api.user_api import UserApi # noqa: E501 +import groundlight_openapi_client +from groundlight_openapi_client.api.user_api import UserApi # noqa: E501 class TestUserApi(unittest.TestCase): diff --git a/generated/tox.ini b/generated/tox.ini index 1a9028b7..b91d1c60 100644 --- a/generated/tox.ini +++ b/generated/tox.ini @@ -6,4 +6,4 @@ deps=-r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands= - pytest --cov=openapi_client + pytest --cov=groundlight_openapi_client diff --git a/pyproject.toml b/pyproject.toml index ccad8c22..ce86762f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ packages = [ {include = "**/*.py", from = "src"}, ] readme = "README.md" -version = "0.15.0" +version = "0.15.1" [tool.poetry.dependencies] # For certifi, use ">=" instead of "^" since it upgrades its "major version" every year, not really following semver @@ -20,8 +20,8 @@ pydantic = ">=1.7.4,<3.0.0" python = ">=3.7,<4.0" python-dateutil = "^2.8.2" requests = "^2.28.2" -urllib3 = "^1.26.9" typer = "^0.9.0" +urllib3 = "^1.26.9" [tool.poetry.group.dev.dependencies] datamodel-code-generator = "^0.22.1" @@ -41,14 +41,14 @@ types-requests = "^2.28.11.17" [tool.poetry.group.sphinx-deps.dependencies] # These are extra / stricter dependencies required to build the API reference docs -python = ">=3.9.0,<4.0" -python-dateutil = "^2.8.2" Sphinx = {version = "7.2.6", python = ">=3.9.0,<4.0"} -sphinx-rtd-theme = {version = "1.3.0", python = ">=3.9.0,<4.0"} autodoc-pydantic = {version = "2.0.1", python = ">=3.9.0,<4.0"} +pillow = "^9.0.0" pydantic = "^2.0" +python = ">=3.9.0,<4.0" +python-dateutil = "^2.8.2" +sphinx-rtd-theme = {version = "1.3.0", python = ">=3.9.0,<4.0"} toml = "0.10.2" -pillow = "^9.0.0" [tool.poetry.scripts] groundlight = "groundlight.cli:groundlight" diff --git a/src/groundlight/__init__.py b/src/groundlight/__init__.py index c89b8128..6a801ff2 100644 --- a/src/groundlight/__init__.py +++ b/src/groundlight/__init__.py @@ -1,6 +1,6 @@ # ruff: noqa # Add useful imports from the generated code here at the top level, as a convenience. -from openapi_client import ApiException +from groundlight_openapi_client import ApiException # Incorporate models for the open_api spec from model import * diff --git a/src/groundlight/client.py b/src/groundlight/client.py index bf5070e2..ed13ce27 100644 --- a/src/groundlight/client.py +++ b/src/groundlight/client.py @@ -6,18 +6,18 @@ from io import BufferedReader, BytesIO from typing import Callable, Optional, Union +from groundlight_openapi_client import Configuration +from groundlight_openapi_client.api.detectors_api import DetectorsApi +from groundlight_openapi_client.api.image_queries_api import ImageQueriesApi +from groundlight_openapi_client.api.user_api import UserApi +from groundlight_openapi_client.exceptions import NotFoundException, UnauthorizedException +from groundlight_openapi_client.model.detector_creation_input import DetectorCreationInput from model import ( Detector, ImageQuery, PaginatedDetectorList, PaginatedImageQueryList, ) -from openapi_client import Configuration -from openapi_client.api.detectors_api import DetectorsApi -from openapi_client.api.image_queries_api import ImageQueriesApi -from openapi_client.api.user_api import UserApi -from openapi_client.exceptions import NotFoundException, UnauthorizedException -from openapi_client.model.detector_creation_input import DetectorCreationInput from urllib3.exceptions import InsecureRequestWarning from groundlight.binary_labels import Label, convert_display_label_to_internal, convert_internal_label_to_display diff --git a/src/groundlight/experimental_api.py b/src/groundlight/experimental_api.py index 8b7cceb1..2770907d 100644 --- a/src/groundlight/experimental_api.py +++ b/src/groundlight/experimental_api.py @@ -8,14 +8,14 @@ import json from typing import Any, Dict, Union +from groundlight_openapi_client.api.images_api import ImagesApi +from groundlight_openapi_client.api.notes_api import NotesApi +from groundlight_openapi_client.api.rules_api import RulesApi +from groundlight_openapi_client.model.action import Action +from groundlight_openapi_client.model.condition import Condition +from groundlight_openapi_client.model.note_creation_input import NoteCreationInput +from groundlight_openapi_client.model.rule_creation_input import RuleCreationInput from model import Channel, Detector, PaginatedRuleList, Rule, Verb -from openapi_client.api.images_api import ImagesApi -from openapi_client.api.notes_api import NotesApi -from openapi_client.api.rules_api import RulesApi -from openapi_client.model.action import Action -from openapi_client.model.condition import Condition -from openapi_client.model.note_creation_input import NoteCreationInput -from openapi_client.model.rule_creation_input import RuleCreationInput from .client import Groundlight diff --git a/src/groundlight/internalapi.py b/src/groundlight/internalapi.py index 67b3acca..18caf608 100644 --- a/src/groundlight/internalapi.py +++ b/src/groundlight/internalapi.py @@ -10,8 +10,8 @@ from urllib.parse import urlsplit, urlunsplit import requests +from groundlight_openapi_client.api_client import ApiClient, ApiException from model import Detector, ImageQuery -from openapi_client.api_client import ApiClient, ApiException from groundlight.status_codes import is_ok from groundlight.version import get_version diff --git a/test/integration/test_groundlight.py b/test/integration/test_groundlight.py index 2f7dd0ed..15efab4c 100644 --- a/test/integration/test_groundlight.py +++ b/test/integration/test_groundlight.py @@ -8,7 +8,7 @@ from datetime import datetime from typing import Any, Dict, Optional, Union -import openapi_client +import groundlight_openapi_client import pytest from groundlight import Groundlight from groundlight.binary_labels import VALID_DISPLAY_LABELS, DeprecatedLabel, Label, convert_internal_label_to_display @@ -369,7 +369,7 @@ def test_submit_image_query_with_metadata_too_large(gl: Groundlight, detector: D @pytest.mark.run_only_for_edge_endpoint def test_submit_image_query_with_metadata_returns_user_error(gl: Groundlight, detector: Detector, image: str): """On the edge-endpoint, we raise an exception if the user passes metadata.""" - with pytest.raises(openapi_client.exceptions.ApiException) as exc_info: + with pytest.raises(groundlight_openapi_client.exceptions.ApiException) as exc_info: gl.submit_image_query(detector=detector.id, image=image, human_review="NEVER", metadata={"a": 1}) assert is_user_error(exc_info.value.status) @@ -387,7 +387,7 @@ def test_submit_image_query_jpeg_truncated(gl: Groundlight, detector: Detector): jpeg_truncated = jpeg[:-500] # Cut off the last 500 bytes # This is an extra difficult test because the header is valid. # So a casual check of the image will appear valid. - with pytest.raises(openapi_client.exceptions.ApiException) as exc_info: + with pytest.raises(groundlight_openapi_client.exceptions.ApiException) as exc_info: _image_query = gl.submit_image_query(detector=detector.id, image=jpeg_truncated, human_review="NEVER") exc_value = exc_info.value assert is_user_error(exc_value.status) diff --git a/test/unit/test_actions.py b/test/unit/test_actions.py index bb84b047..41f87476 100644 --- a/test/unit/test_actions.py +++ b/test/unit/test_actions.py @@ -2,7 +2,7 @@ import pytest from groundlight import ExperimentalApi -from openapi_client.exceptions import NotFoundException +from groundlight_openapi_client.exceptions import NotFoundException def test_create_action(gl: ExperimentalApi): diff --git a/test/unit/test_timing.py b/test/unit/test_timing.py index c3a65a5b..67ebf3ae 100644 --- a/test/unit/test_timing.py +++ b/test/unit/test_timing.py @@ -3,7 +3,7 @@ def test_mocked_image_query(mocker): # mocker is a fixture defined by pytest-mock - mocker.patch("openapi_client.api.image_queries_api.ImageQueriesApi.submit_image_query") + mocker.patch("groundlight_openapi_client.api.image_queries_api.ImageQueriesApi.submit_image_query") Groundlight() # TODO: submit an image query and check that it gets called