-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename groundlight_openapi_client (#201)
* Rename groundlight_openapi_client * Fix test * Bump 0.15.1
- Loading branch information
1 parent
ac1c114
commit 370edf5
Showing
84 changed files
with
395 additions
and
394 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 @@ [email protected] | |
|
||
|
||
## 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 * | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.