haplohub 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. haplohub-1.0.0/PKG-INFO +16 -0
  2. haplohub-1.0.0/README.md +134 -0
  3. haplohub-1.0.0/haplohub/__init__.py +50 -0
  4. haplohub-1.0.0/haplohub/api/__init__.py +6 -0
  5. haplohub-1.0.0/haplohub/api/default_api.py +171 -0
  6. haplohub-1.0.0/haplohub/api/predictions_api.py +606 -0
  7. haplohub-1.0.0/haplohub/api_client.py +766 -0
  8. haplohub-1.0.0/haplohub/api_response.py +25 -0
  9. haplohub-1.0.0/haplohub/configuration.py +442 -0
  10. haplohub-1.0.0/haplohub/exceptions.py +166 -0
  11. haplohub-1.0.0/haplohub/models/__init__.py +32 -0
  12. haplohub-1.0.0/haplohub/models/error_response.py +78 -0
  13. haplohub-1.0.0/haplohub/models/error_schema.py +73 -0
  14. haplohub-1.0.0/haplohub/models/get_prediction_response.py +78 -0
  15. haplohub-1.0.0/haplohub/models/get_prediction_results_response.py +78 -0
  16. haplohub-1.0.0/haplohub/models/paginated_response_prediction_schema.py +84 -0
  17. haplohub-1.0.0/haplohub/models/prediction_results_schema.py +73 -0
  18. haplohub-1.0.0/haplohub/models/prediction_schema.py +83 -0
  19. haplohub-1.0.0/haplohub/models/prediction_status.py +42 -0
  20. haplohub-1.0.0/haplohub/models/response.py +135 -0
  21. haplohub-1.0.0/haplohub/models/response1.py +135 -0
  22. haplohub-1.0.0/haplohub/models/response2.py +135 -0
  23. haplohub-1.0.0/haplohub/models/response3.py +135 -0
  24. haplohub-1.0.0/haplohub/models/response_status.py +40 -0
  25. haplohub-1.0.0/haplohub/models/run_prediction_request.py +73 -0
  26. haplohub-1.0.0/haplohub/models/run_prediction_response.py +78 -0
  27. haplohub-1.0.0/haplohub/models/success_response.py +72 -0
  28. haplohub-1.0.0/haplohub/py.typed +0 -0
  29. haplohub-1.0.0/haplohub/rest.py +329 -0
  30. haplohub-1.0.0/haplohub.egg-info/PKG-INFO +16 -0
  31. haplohub-1.0.0/haplohub.egg-info/SOURCES.txt +54 -0
  32. haplohub-1.0.0/haplohub.egg-info/dependency_links.txt +1 -0
  33. haplohub-1.0.0/haplohub.egg-info/requires.txt +4 -0
  34. haplohub-1.0.0/haplohub.egg-info/top_level.txt +1 -0
  35. haplohub-1.0.0/pyproject.toml +30 -0
  36. haplohub-1.0.0/setup.cfg +7 -0
  37. haplohub-1.0.0/setup.py +49 -0
  38. haplohub-1.0.0/test/test_default_api.py +45 -0
  39. haplohub-1.0.0/test/test_error_response.py +58 -0
  40. haplohub-1.0.0/test/test_error_schema.py +55 -0
  41. haplohub-1.0.0/test/test_get_prediction_response.py +62 -0
  42. haplohub-1.0.0/test/test_get_prediction_results_response.py +58 -0
  43. haplohub-1.0.0/test/test_paginated_response_prediction_schema.py +68 -0
  44. haplohub-1.0.0/test/test_prediction_results_schema.py +55 -0
  45. haplohub-1.0.0/test/test_prediction_schema.py +59 -0
  46. haplohub-1.0.0/test/test_prediction_status.py +34 -0
  47. haplohub-1.0.0/test/test_predictions_api.py +59 -0
  48. haplohub-1.0.0/test/test_response.py +58 -0
  49. haplohub-1.0.0/test/test_response1.py +68 -0
  50. haplohub-1.0.0/test/test_response2.py +68 -0
  51. haplohub-1.0.0/test/test_response3.py +64 -0
  52. haplohub-1.0.0/test/test_response_status.py +34 -0
  53. haplohub-1.0.0/test/test_run_prediction_request.py +55 -0
  54. haplohub-1.0.0/test/test_run_prediction_response.py +62 -0
  55. haplohub-1.0.0/test/test_success_response.py +52 -0
@@ -0,0 +1,16 @@
1
+ Metadata-Version: 2.1
2
+ Name: haplohub
3
+ Version: 1.0.0
4
+ Summary: HaploHub API
5
+ Home-page:
6
+ Author: OpenAPI Generator community
7
+ Author-email: team@openapitools.org
8
+ Keywords: OpenAPI,OpenAPI-Generator,HaploHub API
9
+ Description-Content-Type: text/markdown
10
+ Requires-Dist: urllib3<3.0.0,>=1.25.3
11
+ Requires-Dist: python-dateutil
12
+ Requires-Dist: pydantic<2,>=1.10.5
13
+ Requires-Dist: aenum
14
+
15
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
16
+
@@ -0,0 +1,134 @@
1
+ # haplohub
2
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
3
+
4
+ This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
5
+
6
+ - API version: 1.0
7
+ - Package version: 1.0.0
8
+ - Generator version: 7.11.0-SNAPSHOT
9
+ - Build package: org.openapitools.codegen.languages.PythonPydanticV1ClientCodegen
10
+
11
+ ## Requirements.
12
+
13
+ Python 3.7+
14
+
15
+ ## Installation & Usage
16
+ ### pip install
17
+
18
+ If the python package is hosted on a repository, you can install directly using:
19
+
20
+ ```sh
21
+ pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
22
+ ```
23
+ (you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)
24
+
25
+ Then import the package:
26
+ ```python
27
+ import haplohub
28
+ ```
29
+
30
+ ### Setuptools
31
+
32
+ Install via [Setuptools](http://pypi.python.org/pypi/setuptools).
33
+
34
+ ```sh
35
+ python setup.py install --user
36
+ ```
37
+ (or `sudo python setup.py install` to install the package for all users)
38
+
39
+ Then import the package:
40
+ ```python
41
+ import haplohub
42
+ ```
43
+
44
+ ### Tests
45
+
46
+ Execute `pytest` to run the tests.
47
+
48
+ ## Getting Started
49
+
50
+ Please follow the [installation procedure](#installation--usage) and then run the following:
51
+
52
+ ```python
53
+
54
+ import time
55
+ import haplohub
56
+ from haplohub.rest import ApiException
57
+ from pprint import pprint
58
+
59
+ # The client must configure the authentication and authorization parameters
60
+ # in accordance with the API server security policy.
61
+ # Examples for each auth method are provided below, use the example that
62
+ # satisfies your auth use case.
63
+
64
+ # Configure Bearer authorization:
65
+ configuration = haplohub.Configuration(
66
+ access_token=os.environ["API_KEY"]
67
+ )
68
+
69
+
70
+ # Enter a context with an instance of the API client
71
+ with haplohub.ApiClient(configuration) as api_client:
72
+ # Create an instance of the API class
73
+ api_instance = haplohub.PredictionsApi(api_client)
74
+ prediction_id = 'prediction_id_example' # str |
75
+
76
+ try:
77
+ # Get prediction
78
+ api_response = api_instance.get_prediction(prediction_id)
79
+ print("The response of PredictionsApi->get_prediction:\n")
80
+ pprint(api_response)
81
+ except ApiException as e:
82
+ print("Exception when calling PredictionsApi->get_prediction: %s\n" % e)
83
+
84
+ ```
85
+
86
+ ## Documentation for API Endpoints
87
+
88
+ All URIs are relative to *http://localhost*
89
+
90
+ Class | Method | HTTP request | Description
91
+ ------------ | ------------- | ------------- | -------------
92
+ *PredictionsApi* | [**get_prediction**](docs/PredictionsApi.md#get_prediction) | **GET** /api/v1/predictions/{prediction_id}/ | Get prediction
93
+ *PredictionsApi* | [**get_prediction_results**](docs/PredictionsApi.md#get_prediction_results) | **GET** /api/v1/predictions/{prediction_id}/results/ | Get prediction results
94
+ *PredictionsApi* | [**list_predictions**](docs/PredictionsApi.md#list_predictions) | **GET** /api/v1/predictions/ | List predictions
95
+ *PredictionsApi* | [**run_prediction**](docs/PredictionsApi.md#run_prediction) | **POST** /api/v1/predictions/ | Run prediction
96
+ *DefaultApi* | [**status**](docs/DefaultApi.md#status) | **GET** /api/v1/status/ | Status
97
+
98
+
99
+ ## Documentation For Models
100
+
101
+ - [ErrorResponse](docs/ErrorResponse.md)
102
+ - [ErrorSchema](docs/ErrorSchema.md)
103
+ - [GetPredictionResponse](docs/GetPredictionResponse.md)
104
+ - [GetPredictionResultsResponse](docs/GetPredictionResultsResponse.md)
105
+ - [PaginatedResponsePredictionSchema](docs/PaginatedResponsePredictionSchema.md)
106
+ - [PredictionResultsSchema](docs/PredictionResultsSchema.md)
107
+ - [PredictionSchema](docs/PredictionSchema.md)
108
+ - [PredictionStatus](docs/PredictionStatus.md)
109
+ - [Response](docs/Response.md)
110
+ - [Response1](docs/Response1.md)
111
+ - [Response2](docs/Response2.md)
112
+ - [Response3](docs/Response3.md)
113
+ - [ResponseStatus](docs/ResponseStatus.md)
114
+ - [RunPredictionRequest](docs/RunPredictionRequest.md)
115
+ - [RunPredictionResponse](docs/RunPredictionResponse.md)
116
+ - [SuccessResponse](docs/SuccessResponse.md)
117
+
118
+
119
+ <a id="documentation-for-authorization"></a>
120
+ ## Documentation For Authorization
121
+
122
+
123
+ Authentication schemes defined for the API:
124
+ <a id="ApiAuthBearer"></a>
125
+ ### ApiAuthBearer
126
+
127
+ - **Type**: Bearer authentication
128
+
129
+
130
+ ## Author
131
+
132
+
133
+
134
+
@@ -0,0 +1,50 @@
1
+ # coding: utf-8
2
+
3
+ # flake8: noqa
4
+
5
+ """
6
+ HaploHub API
7
+
8
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
9
+
10
+ The version of the OpenAPI document: 1.0
11
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
12
+
13
+ Do not edit the class manually.
14
+ """ # noqa: E501
15
+
16
+
17
+ __version__ = "1.0.0"
18
+
19
+ # import apis into sdk package
20
+ from haplohub.api.predictions_api import PredictionsApi
21
+ from haplohub.api.default_api import DefaultApi
22
+
23
+ # import ApiClient
24
+ from haplohub.api_response import ApiResponse
25
+ from haplohub.api_client import ApiClient
26
+ from haplohub.configuration import Configuration
27
+ from haplohub.exceptions import OpenApiException
28
+ from haplohub.exceptions import ApiTypeError
29
+ from haplohub.exceptions import ApiValueError
30
+ from haplohub.exceptions import ApiKeyError
31
+ from haplohub.exceptions import ApiAttributeError
32
+ from haplohub.exceptions import ApiException
33
+
34
+ # import models into sdk package
35
+ from haplohub.models.error_response import ErrorResponse
36
+ from haplohub.models.error_schema import ErrorSchema
37
+ from haplohub.models.get_prediction_response import GetPredictionResponse
38
+ from haplohub.models.get_prediction_results_response import GetPredictionResultsResponse
39
+ from haplohub.models.paginated_response_prediction_schema import PaginatedResponsePredictionSchema
40
+ from haplohub.models.prediction_results_schema import PredictionResultsSchema
41
+ from haplohub.models.prediction_schema import PredictionSchema
42
+ from haplohub.models.prediction_status import PredictionStatus
43
+ from haplohub.models.response import Response
44
+ from haplohub.models.response1 import Response1
45
+ from haplohub.models.response2 import Response2
46
+ from haplohub.models.response3 import Response3
47
+ from haplohub.models.response_status import ResponseStatus
48
+ from haplohub.models.run_prediction_request import RunPredictionRequest
49
+ from haplohub.models.run_prediction_response import RunPredictionResponse
50
+ from haplohub.models.success_response import SuccessResponse
@@ -0,0 +1,6 @@
1
+ # flake8: noqa
2
+
3
+ # import apis into api package
4
+ from haplohub.api.predictions_api import PredictionsApi
5
+ from haplohub.api.default_api import DefaultApi
6
+
@@ -0,0 +1,171 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ HaploHub API
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ import re # noqa: F401
16
+ import io
17
+ import warnings
18
+
19
+ from pydantic import validate_arguments, ValidationError
20
+
21
+ from haplohub.models.response import Response
22
+
23
+ from haplohub.api_client import ApiClient
24
+ from haplohub.api_response import ApiResponse
25
+ from haplohub.exceptions import ( # noqa: F401
26
+ ApiTypeError,
27
+ ApiValueError
28
+ )
29
+
30
+
31
+ class DefaultApi:
32
+ """NOTE: This class is auto generated by OpenAPI Generator
33
+ Ref: https://openapi-generator.tech
34
+
35
+ Do not edit the class manually.
36
+ """
37
+
38
+ def __init__(self, api_client=None) -> None:
39
+ if api_client is None:
40
+ api_client = ApiClient.get_default()
41
+ self.api_client = api_client
42
+
43
+ @validate_arguments
44
+ def status(self, **kwargs) -> Response: # noqa: E501
45
+ """Status # noqa: E501
46
+
47
+ This method makes a synchronous HTTP request by default. To make an
48
+ asynchronous HTTP request, please pass async_req=True
49
+
50
+ >>> thread = api.status(async_req=True)
51
+ >>> result = thread.get()
52
+
53
+ :param async_req: Whether to execute the request asynchronously.
54
+ :type async_req: bool, optional
55
+ :param _request_timeout: timeout setting for this request.
56
+ If one number provided, it will be total request
57
+ timeout. It can also be a pair (tuple) of
58
+ (connection, read) timeouts.
59
+ :return: Returns the result object.
60
+ If the method is called asynchronously,
61
+ returns the request thread.
62
+ :rtype: Response
63
+ """
64
+ kwargs['_return_http_data_only'] = True
65
+ if '_preload_content' in kwargs:
66
+ message = "Error! Please call the status_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
67
+ raise ValueError(message)
68
+ return self.status_with_http_info(**kwargs) # noqa: E501
69
+
70
+ @validate_arguments
71
+ def status_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501
72
+ """Status # noqa: E501
73
+
74
+ This method makes a synchronous HTTP request by default. To make an
75
+ asynchronous HTTP request, please pass async_req=True
76
+
77
+ >>> thread = api.status_with_http_info(async_req=True)
78
+ >>> result = thread.get()
79
+
80
+ :param async_req: Whether to execute the request asynchronously.
81
+ :type async_req: bool, optional
82
+ :param _preload_content: if False, the ApiResponse.data will
83
+ be set to none and raw_data will store the
84
+ HTTP response body without reading/decoding.
85
+ Default is True.
86
+ :type _preload_content: bool, optional
87
+ :param _return_http_data_only: response data instead of ApiResponse
88
+ object with status code, headers, etc
89
+ :type _return_http_data_only: bool, optional
90
+ :param _request_timeout: timeout setting for this request. If one
91
+ number provided, it will be total request
92
+ timeout. It can also be a pair (tuple) of
93
+ (connection, read) timeouts.
94
+ :param _request_auth: set to override the auth_settings for an a single
95
+ request; this effectively ignores the authentication
96
+ in the spec for a single request.
97
+ :type _request_auth: dict, optional
98
+ :type _content_type: string, optional: force content-type for the request
99
+ :return: Returns the result object.
100
+ If the method is called asynchronously,
101
+ returns the request thread.
102
+ :rtype: tuple(Response, status_code(int), headers(HTTPHeaderDict))
103
+ """
104
+
105
+ _params = locals()
106
+
107
+ _all_params = [
108
+ ]
109
+ _all_params.extend(
110
+ [
111
+ 'async_req',
112
+ '_return_http_data_only',
113
+ '_preload_content',
114
+ '_request_timeout',
115
+ '_request_auth',
116
+ '_content_type',
117
+ '_headers'
118
+ ]
119
+ )
120
+
121
+ # validate the arguments
122
+ for _key, _val in _params['kwargs'].items():
123
+ if _key not in _all_params:
124
+ raise ApiTypeError(
125
+ "Got an unexpected keyword argument '%s'"
126
+ " to method status" % _key
127
+ )
128
+ _params[_key] = _val
129
+ del _params['kwargs']
130
+
131
+ _collection_formats = {}
132
+
133
+ # process the path parameters
134
+ _path_params = {}
135
+
136
+ # process the query parameters
137
+ _query_params = []
138
+ # process the header parameters
139
+ _header_params = dict(_params.get('_headers', {}))
140
+ # process the form parameters
141
+ _form_params = []
142
+ _files = {}
143
+ # process the body parameter
144
+ _body_params = None
145
+ # set the HTTP header `Accept`
146
+ _header_params['Accept'] = self.api_client.select_header_accept(
147
+ ['application/json']) # noqa: E501
148
+
149
+ # authentication setting
150
+ _auth_settings = [] # noqa: E501
151
+
152
+ _response_types_map = {
153
+ '200': "Response",
154
+ }
155
+
156
+ return self.api_client.call_api(
157
+ '/api/v1/status/', 'GET',
158
+ _path_params,
159
+ _query_params,
160
+ _header_params,
161
+ body=_body_params,
162
+ post_params=_form_params,
163
+ files=_files,
164
+ response_types_map=_response_types_map,
165
+ auth_settings=_auth_settings,
166
+ async_req=_params.get('async_req'),
167
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
168
+ _preload_content=_params.get('_preload_content', True),
169
+ _request_timeout=_params.get('_request_timeout'),
170
+ collection_formats=_collection_formats,
171
+ _request_auth=_params.get('_request_auth'))