hotdata 0.0.1__py3-none-any.whl
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.
- hotdata/__init__.py +300 -0
- hotdata/api/__init__.py +20 -0
- hotdata/api/connection_types_api.py +549 -0
- hotdata/api/connections_api.py +2213 -0
- hotdata/api/datasets_api.py +1711 -0
- hotdata/api/embedding_providers_api.py +1380 -0
- hotdata/api/indexes_api.py +977 -0
- hotdata/api/information_schema_api.py +390 -0
- hotdata/api/jobs_api.py +619 -0
- hotdata/api/query_api.py +320 -0
- hotdata/api/query_runs_api.py +615 -0
- hotdata/api/refresh_api.py +317 -0
- hotdata/api/results_api.py +581 -0
- hotdata/api/saved_queries_api.py +2003 -0
- hotdata/api/secrets_api.py +1380 -0
- hotdata/api/uploads_api.py +595 -0
- hotdata/api/workspace_context_api.py +828 -0
- hotdata/api/workspaces_api.py +602 -0
- hotdata/api_client.py +806 -0
- hotdata/api_response.py +21 -0
- hotdata/configuration.py +620 -0
- hotdata/exceptions.py +219 -0
- hotdata/models/__init__.py +125 -0
- hotdata/models/api_error_detail.py +90 -0
- hotdata/models/api_error_response.py +92 -0
- hotdata/models/async_query_response.py +99 -0
- hotdata/models/boolean_profile_detail.py +91 -0
- hotdata/models/categorical_profile_detail.py +96 -0
- hotdata/models/category_value_info.py +96 -0
- hotdata/models/column_definition.py +140 -0
- hotdata/models/column_info.py +92 -0
- hotdata/models/column_profile_detail.py +180 -0
- hotdata/models/column_profile_detail_one_of.py +105 -0
- hotdata/models/column_profile_detail_one_of1.py +102 -0
- hotdata/models/column_profile_detail_one_of2.py +101 -0
- hotdata/models/column_profile_detail_one_of3.py +99 -0
- hotdata/models/column_profile_detail_one_of4.py +100 -0
- hotdata/models/column_profile_info.py +108 -0
- hotdata/models/column_type_spec.py +117 -0
- hotdata/models/connection_health_response.py +100 -0
- hotdata/models/connection_info.py +92 -0
- hotdata/models/connection_refresh_result.py +117 -0
- hotdata/models/connection_schema_error.py +90 -0
- hotdata/models/connection_type_detail.py +104 -0
- hotdata/models/connection_type_summary.py +90 -0
- hotdata/models/create_connection_request.py +108 -0
- hotdata/models/create_connection_response.py +105 -0
- hotdata/models/create_dataset_request.py +101 -0
- hotdata/models/create_dataset_response.py +99 -0
- hotdata/models/create_embedding_provider_request.py +111 -0
- hotdata/models/create_embedding_provider_response.py +102 -0
- hotdata/models/create_index_request.py +130 -0
- hotdata/models/create_saved_query_request.py +104 -0
- hotdata/models/create_secret_request.py +90 -0
- hotdata/models/create_secret_response.py +93 -0
- hotdata/models/create_workspace201_response.py +93 -0
- hotdata/models/create_workspace_request.py +90 -0
- hotdata/models/create_workspace_response.py +94 -0
- hotdata/models/dataset_source.py +180 -0
- hotdata/models/dataset_source_one_of.py +109 -0
- hotdata/models/dataset_source_one_of1.py +91 -0
- hotdata/models/dataset_summary.py +108 -0
- hotdata/models/dataset_version_summary.py +95 -0
- hotdata/models/discovery_status.py +39 -0
- hotdata/models/embedding_provider_response.py +108 -0
- hotdata/models/error.py +88 -0
- hotdata/models/execute_saved_query_request.py +93 -0
- hotdata/models/get_connection_response.py +97 -0
- hotdata/models/get_dataset_response.py +120 -0
- hotdata/models/get_result_response.py +126 -0
- hotdata/models/get_secret_response.py +93 -0
- hotdata/models/get_workspace_context_response.py +92 -0
- hotdata/models/index_info_response.py +107 -0
- hotdata/models/index_status.py +38 -0
- hotdata/models/information_schema_response.py +110 -0
- hotdata/models/inline_data.py +92 -0
- hotdata/models/inline_dataset_source.py +92 -0
- hotdata/models/job_result.py +152 -0
- hotdata/models/job_status.py +41 -0
- hotdata/models/job_status_response.py +124 -0
- hotdata/models/job_type.py +40 -0
- hotdata/models/list_connection_types_response.py +96 -0
- hotdata/models/list_connections_response.py +96 -0
- hotdata/models/list_dataset_versions_response.py +107 -0
- hotdata/models/list_datasets_response.py +105 -0
- hotdata/models/list_embedding_providers_response.py +96 -0
- hotdata/models/list_indexes_response.py +96 -0
- hotdata/models/list_jobs_response.py +96 -0
- hotdata/models/list_query_runs_response.py +110 -0
- hotdata/models/list_results_response.py +105 -0
- hotdata/models/list_saved_queries_response.py +105 -0
- hotdata/models/list_saved_query_versions_response.py +107 -0
- hotdata/models/list_secrets_response.py +96 -0
- hotdata/models/list_uploads_response.py +96 -0
- hotdata/models/list_workspace_contexts_response.py +96 -0
- hotdata/models/list_workspaces200_response.py +97 -0
- hotdata/models/list_workspaces_response.py +98 -0
- hotdata/models/numeric_profile_detail.py +92 -0
- hotdata/models/query_request.py +98 -0
- hotdata/models/query_response.py +113 -0
- hotdata/models/query_run_info.py +176 -0
- hotdata/models/refresh_dataset_response.py +95 -0
- hotdata/models/refresh_request.py +120 -0
- hotdata/models/refresh_response.py +180 -0
- hotdata/models/refresh_warning.py +102 -0
- hotdata/models/result_info.py +100 -0
- hotdata/models/saved_query_dataset_source.py +95 -0
- hotdata/models/saved_query_detail.py +168 -0
- hotdata/models/saved_query_summary.py +101 -0
- hotdata/models/saved_query_version_info.py +158 -0
- hotdata/models/schema_refresh_result.py +107 -0
- hotdata/models/secret_metadata_response.py +93 -0
- hotdata/models/sql_query_dataset_source.py +102 -0
- hotdata/models/submit_job_response.py +93 -0
- hotdata/models/table_info.py +116 -0
- hotdata/models/table_profile_response.py +112 -0
- hotdata/models/table_refresh_error.py +92 -0
- hotdata/models/table_refresh_result.py +107 -0
- hotdata/models/temporal_profile_detail.py +90 -0
- hotdata/models/text_profile_detail.py +93 -0
- hotdata/models/update_dataset_request.py +107 -0
- hotdata/models/update_dataset_response.py +104 -0
- hotdata/models/update_embedding_provider_request.py +114 -0
- hotdata/models/update_embedding_provider_response.py +93 -0
- hotdata/models/update_saved_query_request.py +128 -0
- hotdata/models/update_secret_request.py +88 -0
- hotdata/models/update_secret_response.py +91 -0
- hotdata/models/upload_dataset_source.py +97 -0
- hotdata/models/upload_info.py +102 -0
- hotdata/models/upload_response.py +102 -0
- hotdata/models/upsert_workspace_context_request.py +90 -0
- hotdata/models/upsert_workspace_context_response.py +92 -0
- hotdata/models/url_dataset_source.py +97 -0
- hotdata/models/workspace_context_entry.py +93 -0
- hotdata/models/workspace_detail.py +94 -0
- hotdata/models/workspace_list_item.py +98 -0
- hotdata/py.typed +0 -0
- hotdata/rest.py +264 -0
- hotdata-0.0.1.dist-info/METADATA +93 -0
- hotdata-0.0.1.dist-info/RECORD +142 -0
- hotdata-0.0.1.dist-info/WHEEL +5 -0
- hotdata-0.0.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Hotdata API
|
|
5
|
+
|
|
6
|
+
Powerful data platform API for datasets, queries, and analytics.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Contact: developers@hotdata.dev
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from datetime import datetime
|
|
22
|
+
from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
|
|
23
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class DatasetSummary(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
Dataset summary for listing
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
created_at: datetime
|
|
32
|
+
id: StrictStr
|
|
33
|
+
label: StrictStr
|
|
34
|
+
latest_version: StrictInt
|
|
35
|
+
pinned_version: Optional[StrictInt] = None
|
|
36
|
+
schema_name: StrictStr
|
|
37
|
+
table_name: StrictStr
|
|
38
|
+
updated_at: datetime
|
|
39
|
+
__properties: ClassVar[List[str]] = ["created_at", "id", "label", "latest_version", "pinned_version", "schema_name", "table_name", "updated_at"]
|
|
40
|
+
|
|
41
|
+
model_config = ConfigDict(
|
|
42
|
+
populate_by_name=True,
|
|
43
|
+
validate_assignment=True,
|
|
44
|
+
protected_namespaces=(),
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def to_str(self) -> str:
|
|
49
|
+
"""Returns the string representation of the model using alias"""
|
|
50
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
51
|
+
|
|
52
|
+
def to_json(self) -> str:
|
|
53
|
+
"""Returns the JSON representation of the model using alias"""
|
|
54
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
55
|
+
return json.dumps(self.to_dict())
|
|
56
|
+
|
|
57
|
+
@classmethod
|
|
58
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
59
|
+
"""Create an instance of DatasetSummary from a JSON string"""
|
|
60
|
+
return cls.from_dict(json.loads(json_str))
|
|
61
|
+
|
|
62
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
63
|
+
"""Return the dictionary representation of the model using alias.
|
|
64
|
+
|
|
65
|
+
This has the following differences from calling pydantic's
|
|
66
|
+
`self.model_dump(by_alias=True)`:
|
|
67
|
+
|
|
68
|
+
* `None` is only added to the output dict for nullable fields that
|
|
69
|
+
were set at model initialization. Other fields with value `None`
|
|
70
|
+
are ignored.
|
|
71
|
+
"""
|
|
72
|
+
excluded_fields: Set[str] = set([
|
|
73
|
+
])
|
|
74
|
+
|
|
75
|
+
_dict = self.model_dump(
|
|
76
|
+
by_alias=True,
|
|
77
|
+
exclude=excluded_fields,
|
|
78
|
+
exclude_none=True,
|
|
79
|
+
)
|
|
80
|
+
# set to None if pinned_version (nullable) is None
|
|
81
|
+
# and model_fields_set contains the field
|
|
82
|
+
if self.pinned_version is None and "pinned_version" in self.model_fields_set:
|
|
83
|
+
_dict['pinned_version'] = None
|
|
84
|
+
|
|
85
|
+
return _dict
|
|
86
|
+
|
|
87
|
+
@classmethod
|
|
88
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
89
|
+
"""Create an instance of DatasetSummary from a dict"""
|
|
90
|
+
if obj is None:
|
|
91
|
+
return None
|
|
92
|
+
|
|
93
|
+
if not isinstance(obj, dict):
|
|
94
|
+
return cls.model_validate(obj)
|
|
95
|
+
|
|
96
|
+
_obj = cls.model_validate({
|
|
97
|
+
"created_at": obj.get("created_at"),
|
|
98
|
+
"id": obj.get("id"),
|
|
99
|
+
"label": obj.get("label"),
|
|
100
|
+
"latest_version": obj.get("latest_version"),
|
|
101
|
+
"pinned_version": obj.get("pinned_version"),
|
|
102
|
+
"schema_name": obj.get("schema_name"),
|
|
103
|
+
"table_name": obj.get("table_name"),
|
|
104
|
+
"updated_at": obj.get("updated_at")
|
|
105
|
+
})
|
|
106
|
+
return _obj
|
|
107
|
+
|
|
108
|
+
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Hotdata API
|
|
5
|
+
|
|
6
|
+
Powerful data platform API for datasets, queries, and analytics.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Contact: developers@hotdata.dev
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from datetime import datetime
|
|
22
|
+
from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
|
|
23
|
+
from typing import Any, ClassVar, Dict, List
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class DatasetVersionSummary(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
Dataset version summary
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
created_at: datetime
|
|
32
|
+
id: StrictStr
|
|
33
|
+
source_type: StrictStr
|
|
34
|
+
version: StrictInt
|
|
35
|
+
__properties: ClassVar[List[str]] = ["created_at", "id", "source_type", "version"]
|
|
36
|
+
|
|
37
|
+
model_config = ConfigDict(
|
|
38
|
+
populate_by_name=True,
|
|
39
|
+
validate_assignment=True,
|
|
40
|
+
protected_namespaces=(),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def to_str(self) -> str:
|
|
45
|
+
"""Returns the string representation of the model using alias"""
|
|
46
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
47
|
+
|
|
48
|
+
def to_json(self) -> str:
|
|
49
|
+
"""Returns the JSON representation of the model using alias"""
|
|
50
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
51
|
+
return json.dumps(self.to_dict())
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
55
|
+
"""Create an instance of DatasetVersionSummary from a JSON string"""
|
|
56
|
+
return cls.from_dict(json.loads(json_str))
|
|
57
|
+
|
|
58
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
59
|
+
"""Return the dictionary representation of the model using alias.
|
|
60
|
+
|
|
61
|
+
This has the following differences from calling pydantic's
|
|
62
|
+
`self.model_dump(by_alias=True)`:
|
|
63
|
+
|
|
64
|
+
* `None` is only added to the output dict for nullable fields that
|
|
65
|
+
were set at model initialization. Other fields with value `None`
|
|
66
|
+
are ignored.
|
|
67
|
+
"""
|
|
68
|
+
excluded_fields: Set[str] = set([
|
|
69
|
+
])
|
|
70
|
+
|
|
71
|
+
_dict = self.model_dump(
|
|
72
|
+
by_alias=True,
|
|
73
|
+
exclude=excluded_fields,
|
|
74
|
+
exclude_none=True,
|
|
75
|
+
)
|
|
76
|
+
return _dict
|
|
77
|
+
|
|
78
|
+
@classmethod
|
|
79
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
80
|
+
"""Create an instance of DatasetVersionSummary from a dict"""
|
|
81
|
+
if obj is None:
|
|
82
|
+
return None
|
|
83
|
+
|
|
84
|
+
if not isinstance(obj, dict):
|
|
85
|
+
return cls.model_validate(obj)
|
|
86
|
+
|
|
87
|
+
_obj = cls.model_validate({
|
|
88
|
+
"created_at": obj.get("created_at"),
|
|
89
|
+
"id": obj.get("id"),
|
|
90
|
+
"source_type": obj.get("source_type"),
|
|
91
|
+
"version": obj.get("version")
|
|
92
|
+
})
|
|
93
|
+
return _obj
|
|
94
|
+
|
|
95
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Hotdata API
|
|
5
|
+
|
|
6
|
+
Powerful data platform API for datasets, queries, and analytics.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Contact: developers@hotdata.dev
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import json
|
|
18
|
+
from enum import Enum
|
|
19
|
+
from typing_extensions import Self
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class DiscoveryStatus(str, Enum):
|
|
23
|
+
"""
|
|
24
|
+
Discovery status for connection creation
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
"""
|
|
28
|
+
allowed enum values
|
|
29
|
+
"""
|
|
30
|
+
SUCCESS = 'success'
|
|
31
|
+
SKIPPED = 'skipped'
|
|
32
|
+
FAILED = 'failed'
|
|
33
|
+
|
|
34
|
+
@classmethod
|
|
35
|
+
def from_json(cls, json_str: str) -> Self:
|
|
36
|
+
"""Create an instance of DiscoveryStatus from a JSON string"""
|
|
37
|
+
return cls(json.loads(json_str))
|
|
38
|
+
|
|
39
|
+
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Hotdata API
|
|
5
|
+
|
|
6
|
+
Powerful data platform API for datasets, queries, and analytics.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Contact: developers@hotdata.dev
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from datetime import datetime
|
|
22
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
|
23
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class EmbeddingProviderResponse(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
Single embedding provider for API responses
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
config: Optional[Any]
|
|
32
|
+
created_at: datetime
|
|
33
|
+
has_secret: StrictBool
|
|
34
|
+
id: StrictStr
|
|
35
|
+
name: StrictStr
|
|
36
|
+
provider_type: StrictStr
|
|
37
|
+
source: StrictStr = Field(description="Provider source: \"system\" (from config) or \"user\" (created via API).")
|
|
38
|
+
updated_at: datetime
|
|
39
|
+
__properties: ClassVar[List[str]] = ["config", "created_at", "has_secret", "id", "name", "provider_type", "source", "updated_at"]
|
|
40
|
+
|
|
41
|
+
model_config = ConfigDict(
|
|
42
|
+
populate_by_name=True,
|
|
43
|
+
validate_assignment=True,
|
|
44
|
+
protected_namespaces=(),
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def to_str(self) -> str:
|
|
49
|
+
"""Returns the string representation of the model using alias"""
|
|
50
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
51
|
+
|
|
52
|
+
def to_json(self) -> str:
|
|
53
|
+
"""Returns the JSON representation of the model using alias"""
|
|
54
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
55
|
+
return json.dumps(self.to_dict())
|
|
56
|
+
|
|
57
|
+
@classmethod
|
|
58
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
59
|
+
"""Create an instance of EmbeddingProviderResponse from a JSON string"""
|
|
60
|
+
return cls.from_dict(json.loads(json_str))
|
|
61
|
+
|
|
62
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
63
|
+
"""Return the dictionary representation of the model using alias.
|
|
64
|
+
|
|
65
|
+
This has the following differences from calling pydantic's
|
|
66
|
+
`self.model_dump(by_alias=True)`:
|
|
67
|
+
|
|
68
|
+
* `None` is only added to the output dict for nullable fields that
|
|
69
|
+
were set at model initialization. Other fields with value `None`
|
|
70
|
+
are ignored.
|
|
71
|
+
"""
|
|
72
|
+
excluded_fields: Set[str] = set([
|
|
73
|
+
])
|
|
74
|
+
|
|
75
|
+
_dict = self.model_dump(
|
|
76
|
+
by_alias=True,
|
|
77
|
+
exclude=excluded_fields,
|
|
78
|
+
exclude_none=True,
|
|
79
|
+
)
|
|
80
|
+
# set to None if config (nullable) is None
|
|
81
|
+
# and model_fields_set contains the field
|
|
82
|
+
if self.config is None and "config" in self.model_fields_set:
|
|
83
|
+
_dict['config'] = None
|
|
84
|
+
|
|
85
|
+
return _dict
|
|
86
|
+
|
|
87
|
+
@classmethod
|
|
88
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
89
|
+
"""Create an instance of EmbeddingProviderResponse from a dict"""
|
|
90
|
+
if obj is None:
|
|
91
|
+
return None
|
|
92
|
+
|
|
93
|
+
if not isinstance(obj, dict):
|
|
94
|
+
return cls.model_validate(obj)
|
|
95
|
+
|
|
96
|
+
_obj = cls.model_validate({
|
|
97
|
+
"config": obj.get("config"),
|
|
98
|
+
"created_at": obj.get("created_at"),
|
|
99
|
+
"has_secret": obj.get("has_secret"),
|
|
100
|
+
"id": obj.get("id"),
|
|
101
|
+
"name": obj.get("name"),
|
|
102
|
+
"provider_type": obj.get("provider_type"),
|
|
103
|
+
"source": obj.get("source"),
|
|
104
|
+
"updated_at": obj.get("updated_at")
|
|
105
|
+
})
|
|
106
|
+
return _obj
|
|
107
|
+
|
|
108
|
+
|
hotdata/models/error.py
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Hotdata API
|
|
5
|
+
|
|
6
|
+
Powerful data platform API for datasets, queries, and analytics.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Contact: developers@hotdata.dev
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class Error(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
Error
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
error: StrictStr = Field(description="Machine-readable error code.")
|
|
31
|
+
__properties: ClassVar[List[str]] = ["error"]
|
|
32
|
+
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
populate_by_name=True,
|
|
35
|
+
validate_assignment=True,
|
|
36
|
+
protected_namespaces=(),
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def to_str(self) -> str:
|
|
41
|
+
"""Returns the string representation of the model using alias"""
|
|
42
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
43
|
+
|
|
44
|
+
def to_json(self) -> str:
|
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
|
46
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
47
|
+
return json.dumps(self.to_dict())
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
+
"""Create an instance of Error from a JSON string"""
|
|
52
|
+
return cls.from_dict(json.loads(json_str))
|
|
53
|
+
|
|
54
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
+
"""Return the dictionary representation of the model using alias.
|
|
56
|
+
|
|
57
|
+
This has the following differences from calling pydantic's
|
|
58
|
+
`self.model_dump(by_alias=True)`:
|
|
59
|
+
|
|
60
|
+
* `None` is only added to the output dict for nullable fields that
|
|
61
|
+
were set at model initialization. Other fields with value `None`
|
|
62
|
+
are ignored.
|
|
63
|
+
"""
|
|
64
|
+
excluded_fields: Set[str] = set([
|
|
65
|
+
])
|
|
66
|
+
|
|
67
|
+
_dict = self.model_dump(
|
|
68
|
+
by_alias=True,
|
|
69
|
+
exclude=excluded_fields,
|
|
70
|
+
exclude_none=True,
|
|
71
|
+
)
|
|
72
|
+
return _dict
|
|
73
|
+
|
|
74
|
+
@classmethod
|
|
75
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
76
|
+
"""Create an instance of Error from a dict"""
|
|
77
|
+
if obj is None:
|
|
78
|
+
return None
|
|
79
|
+
|
|
80
|
+
if not isinstance(obj, dict):
|
|
81
|
+
return cls.model_validate(obj)
|
|
82
|
+
|
|
83
|
+
_obj = cls.model_validate({
|
|
84
|
+
"error": obj.get("error")
|
|
85
|
+
})
|
|
86
|
+
return _obj
|
|
87
|
+
|
|
88
|
+
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Hotdata API
|
|
5
|
+
|
|
6
|
+
Powerful data platform API for datasets, queries, and analytics.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Contact: developers@hotdata.dev
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, StrictInt
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class ExecuteSavedQueryRequest(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
Request body for POST /v1/queries/{id}/execute
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
version: Optional[StrictInt] = None
|
|
31
|
+
__properties: ClassVar[List[str]] = ["version"]
|
|
32
|
+
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
populate_by_name=True,
|
|
35
|
+
validate_assignment=True,
|
|
36
|
+
protected_namespaces=(),
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def to_str(self) -> str:
|
|
41
|
+
"""Returns the string representation of the model using alias"""
|
|
42
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
43
|
+
|
|
44
|
+
def to_json(self) -> str:
|
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
|
46
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
47
|
+
return json.dumps(self.to_dict())
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
+
"""Create an instance of ExecuteSavedQueryRequest from a JSON string"""
|
|
52
|
+
return cls.from_dict(json.loads(json_str))
|
|
53
|
+
|
|
54
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
+
"""Return the dictionary representation of the model using alias.
|
|
56
|
+
|
|
57
|
+
This has the following differences from calling pydantic's
|
|
58
|
+
`self.model_dump(by_alias=True)`:
|
|
59
|
+
|
|
60
|
+
* `None` is only added to the output dict for nullable fields that
|
|
61
|
+
were set at model initialization. Other fields with value `None`
|
|
62
|
+
are ignored.
|
|
63
|
+
"""
|
|
64
|
+
excluded_fields: Set[str] = set([
|
|
65
|
+
])
|
|
66
|
+
|
|
67
|
+
_dict = self.model_dump(
|
|
68
|
+
by_alias=True,
|
|
69
|
+
exclude=excluded_fields,
|
|
70
|
+
exclude_none=True,
|
|
71
|
+
)
|
|
72
|
+
# set to None if version (nullable) is None
|
|
73
|
+
# and model_fields_set contains the field
|
|
74
|
+
if self.version is None and "version" in self.model_fields_set:
|
|
75
|
+
_dict['version'] = None
|
|
76
|
+
|
|
77
|
+
return _dict
|
|
78
|
+
|
|
79
|
+
@classmethod
|
|
80
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
81
|
+
"""Create an instance of ExecuteSavedQueryRequest from a dict"""
|
|
82
|
+
if obj is None:
|
|
83
|
+
return None
|
|
84
|
+
|
|
85
|
+
if not isinstance(obj, dict):
|
|
86
|
+
return cls.model_validate(obj)
|
|
87
|
+
|
|
88
|
+
_obj = cls.model_validate({
|
|
89
|
+
"version": obj.get("version")
|
|
90
|
+
})
|
|
91
|
+
return _obj
|
|
92
|
+
|
|
93
|
+
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Hotdata API
|
|
5
|
+
|
|
6
|
+
Powerful data platform API for datasets, queries, and analytics.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Contact: developers@hotdata.dev
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List
|
|
23
|
+
from typing_extensions import Annotated
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class GetConnectionResponse(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
Response body for GET /connections/{connection_id}
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
id: StrictStr
|
|
32
|
+
name: StrictStr
|
|
33
|
+
source_type: StrictStr
|
|
34
|
+
synced_table_count: Annotated[int, Field(strict=True, ge=0)]
|
|
35
|
+
table_count: Annotated[int, Field(strict=True, ge=0)]
|
|
36
|
+
__properties: ClassVar[List[str]] = ["id", "name", "source_type", "synced_table_count", "table_count"]
|
|
37
|
+
|
|
38
|
+
model_config = ConfigDict(
|
|
39
|
+
populate_by_name=True,
|
|
40
|
+
validate_assignment=True,
|
|
41
|
+
protected_namespaces=(),
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def to_str(self) -> str:
|
|
46
|
+
"""Returns the string representation of the model using alias"""
|
|
47
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
48
|
+
|
|
49
|
+
def to_json(self) -> str:
|
|
50
|
+
"""Returns the JSON representation of the model using alias"""
|
|
51
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
52
|
+
return json.dumps(self.to_dict())
|
|
53
|
+
|
|
54
|
+
@classmethod
|
|
55
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
56
|
+
"""Create an instance of GetConnectionResponse from a JSON string"""
|
|
57
|
+
return cls.from_dict(json.loads(json_str))
|
|
58
|
+
|
|
59
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
60
|
+
"""Return the dictionary representation of the model using alias.
|
|
61
|
+
|
|
62
|
+
This has the following differences from calling pydantic's
|
|
63
|
+
`self.model_dump(by_alias=True)`:
|
|
64
|
+
|
|
65
|
+
* `None` is only added to the output dict for nullable fields that
|
|
66
|
+
were set at model initialization. Other fields with value `None`
|
|
67
|
+
are ignored.
|
|
68
|
+
"""
|
|
69
|
+
excluded_fields: Set[str] = set([
|
|
70
|
+
])
|
|
71
|
+
|
|
72
|
+
_dict = self.model_dump(
|
|
73
|
+
by_alias=True,
|
|
74
|
+
exclude=excluded_fields,
|
|
75
|
+
exclude_none=True,
|
|
76
|
+
)
|
|
77
|
+
return _dict
|
|
78
|
+
|
|
79
|
+
@classmethod
|
|
80
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
81
|
+
"""Create an instance of GetConnectionResponse from a dict"""
|
|
82
|
+
if obj is None:
|
|
83
|
+
return None
|
|
84
|
+
|
|
85
|
+
if not isinstance(obj, dict):
|
|
86
|
+
return cls.model_validate(obj)
|
|
87
|
+
|
|
88
|
+
_obj = cls.model_validate({
|
|
89
|
+
"id": obj.get("id"),
|
|
90
|
+
"name": obj.get("name"),
|
|
91
|
+
"source_type": obj.get("source_type"),
|
|
92
|
+
"synced_table_count": obj.get("synced_table_count"),
|
|
93
|
+
"table_count": obj.get("table_count")
|
|
94
|
+
})
|
|
95
|
+
return _obj
|
|
96
|
+
|
|
97
|
+
|