wordlift-client 1.114.0__py3-none-any.whl → 1.115.0__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.
@@ -15,7 +15,7 @@
15
15
  """ # noqa: E501
16
16
 
17
17
 
18
- __version__ = "1.114.0"
18
+ __version__ = "1.115.0"
19
19
 
20
20
  # import apis into sdk package
21
21
  from wordlift_client.api.account_api import AccountApi
@@ -179,6 +179,7 @@ from wordlift_client.models.internal_link_request import InternalLinkRequest
179
179
  from wordlift_client.models.internal_link_source import InternalLinkSource
180
180
  from wordlift_client.models.item import Item
181
181
  from wordlift_client.models.kg_embedding_request import KgEmbeddingRequest
182
+ from wordlift_client.models.kg_embedding_response import KgEmbeddingResponse
182
183
  from wordlift_client.models.level_enum import LevelEnum
183
184
  from wordlift_client.models.location_inner import LocationInner
184
185
  from wordlift_client.models.longtail_response import LongtailResponse
@@ -17,9 +17,9 @@ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
17
17
  from typing import Any, Dict, List, Optional, Tuple, Union
18
18
  from typing_extensions import Annotated
19
19
 
20
- from pydantic import StrictStr
21
- from typing import Dict, List
20
+ from typing import List
22
21
  from wordlift_client.models.kg_embedding_request import KgEmbeddingRequest
22
+ from wordlift_client.models.kg_embedding_response import KgEmbeddingResponse
23
23
 
24
24
  from wordlift_client.api_client import ApiClient, RequestSerialized
25
25
  from wordlift_client.api_response import ApiResponse
@@ -55,7 +55,7 @@ class EmbeddingApi:
55
55
  _content_type: Optional[StrictStr] = None,
56
56
  _headers: Optional[Dict[StrictStr, Any]] = None,
57
57
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
58
- ) -> List[Dict[str, str]]:
58
+ ) -> List[KgEmbeddingResponse]:
59
59
  """Create
60
60
 
61
61
  Create the embedding for the IRIs for the provided query.
@@ -93,7 +93,7 @@ class EmbeddingApi:
93
93
  )
94
94
 
95
95
  _response_types_map: Dict[str, Optional[str]] = {
96
- '201': "List[Dict[str, str]]",
96
+ '201': "List[KgEmbeddingResponse]",
97
97
  '401': None,
98
98
  }
99
99
  response_data = await self.api_client.call_api(
@@ -123,7 +123,7 @@ class EmbeddingApi:
123
123
  _content_type: Optional[StrictStr] = None,
124
124
  _headers: Optional[Dict[StrictStr, Any]] = None,
125
125
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
126
- ) -> ApiResponse[List[Dict[str, str]]]:
126
+ ) -> ApiResponse[List[KgEmbeddingResponse]]:
127
127
  """Create
128
128
 
129
129
  Create the embedding for the IRIs for the provided query.
@@ -161,7 +161,7 @@ class EmbeddingApi:
161
161
  )
162
162
 
163
163
  _response_types_map: Dict[str, Optional[str]] = {
164
- '201': "List[Dict[str, str]]",
164
+ '201': "List[KgEmbeddingResponse]",
165
165
  '401': None,
166
166
  }
167
167
  response_data = await self.api_client.call_api(
@@ -229,7 +229,7 @@ class EmbeddingApi:
229
229
  )
230
230
 
231
231
  _response_types_map: Dict[str, Optional[str]] = {
232
- '201': "List[Dict[str, str]]",
232
+ '201': "List[KgEmbeddingResponse]",
233
233
  '401': None,
234
234
  }
235
235
  response_data = await self.api_client.call_api(
@@ -89,7 +89,7 @@ class ApiClient:
89
89
  self.default_headers[header_name] = header_value
90
90
  self.cookie = cookie
91
91
  # Set default User-Agent.
92
- self.user_agent = 'OpenAPI-Generator/1.114.0/python'
92
+ self.user_agent = 'OpenAPI-Generator/1.115.0/python'
93
93
  self.client_side_validation = configuration.client_side_validation
94
94
 
95
95
  async def __aenter__(self):
@@ -426,7 +426,7 @@ conf = wordlift_client.Configuration(
426
426
  "OS: {env}\n"\
427
427
  "Python Version: {pyversion}\n"\
428
428
  "Version of the API: 1.0\n"\
429
- "SDK Package Version: 1.114.0".\
429
+ "SDK Package Version: 1.115.0".\
430
430
  format(env=sys.platform, pyversion=sys.version)
431
431
 
432
432
  def get_host_settings(self):
@@ -95,6 +95,7 @@ from wordlift_client.models.internal_link_request import InternalLinkRequest
95
95
  from wordlift_client.models.internal_link_source import InternalLinkSource
96
96
  from wordlift_client.models.item import Item
97
97
  from wordlift_client.models.kg_embedding_request import KgEmbeddingRequest
98
+ from wordlift_client.models.kg_embedding_response import KgEmbeddingResponse
98
99
  from wordlift_client.models.level_enum import LevelEnum
99
100
  from wordlift_client.models.location_inner import LocationInner
100
101
  from wordlift_client.models.longtail_response import LongtailResponse
@@ -18,8 +18,9 @@ import pprint
18
18
  import re # noqa: F401
19
19
  import json
20
20
 
21
- from pydantic import BaseModel, ConfigDict, StrictStr
22
- from typing import Any, ClassVar, Dict, List, Optional
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
22
+ from typing import Any, ClassVar, Dict, List
23
+ from wordlift_client.models.embedding_request import EmbeddingRequest
23
24
  from typing import Optional, Set
24
25
  from typing_extensions import Self
25
26
 
@@ -27,9 +28,9 @@ class KgEmbeddingRequest(BaseModel):
27
28
  """
28
29
  KgEmbeddingRequest
29
30
  """ # noqa: E501
30
- graphql_query: Optional[StrictStr] = None
31
- properties: Optional[List[StrictStr]] = None
32
- __properties: ClassVar[List[str]] = ["graphql_query", "properties"]
31
+ embedding: EmbeddingRequest
32
+ graphql_query: StrictStr = Field(description="The GraphQL query used to select entities to create embedding vectors for.")
33
+ __properties: ClassVar[List[str]] = ["embedding", "graphql_query"]
33
34
 
34
35
  model_config = ConfigDict(
35
36
  populate_by_name=True,
@@ -70,6 +71,9 @@ class KgEmbeddingRequest(BaseModel):
70
71
  exclude=excluded_fields,
71
72
  exclude_none=True,
72
73
  )
74
+ # override the default output from pydantic by calling `to_dict()` of embedding
75
+ if self.embedding:
76
+ _dict['embedding'] = self.embedding.to_dict()
73
77
  return _dict
74
78
 
75
79
  @classmethod
@@ -82,8 +86,8 @@ class KgEmbeddingRequest(BaseModel):
82
86
  return cls.model_validate(obj)
83
87
 
84
88
  _obj = cls.model_validate({
85
- "graphql_query": obj.get("graphql_query"),
86
- "properties": obj.get("properties")
89
+ "embedding": EmbeddingRequest.from_dict(obj["embedding"]) if obj.get("embedding") is not None else None,
90
+ "graphql_query": obj.get("graphql_query")
87
91
  })
88
92
  return _obj
89
93
 
@@ -0,0 +1,90 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ WordLift API
5
+
6
+ WordLift API
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Contact: hello@wordlift.io
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 KgEmbeddingResponse(BaseModel):
27
+ """
28
+ Graph Embedding Response
29
+ """ # noqa: E501
30
+ id: StrictStr = Field(description="The id/iri of the web page in the Graph.")
31
+ model: StrictStr
32
+ __properties: ClassVar[List[str]] = ["id", "model"]
33
+
34
+ model_config = ConfigDict(
35
+ populate_by_name=True,
36
+ validate_assignment=True,
37
+ protected_namespaces=(),
38
+ )
39
+
40
+
41
+ def to_str(self) -> str:
42
+ """Returns the string representation of the model using alias"""
43
+ return pprint.pformat(self.model_dump(by_alias=True))
44
+
45
+ def to_json(self) -> str:
46
+ """Returns the JSON representation of the model using alias"""
47
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
48
+ return json.dumps(self.to_dict())
49
+
50
+ @classmethod
51
+ def from_json(cls, json_str: str) -> Optional[Self]:
52
+ """Create an instance of KgEmbeddingResponse from a JSON string"""
53
+ return cls.from_dict(json.loads(json_str))
54
+
55
+ def to_dict(self) -> Dict[str, Any]:
56
+ """Return the dictionary representation of the model using alias.
57
+
58
+ This has the following differences from calling pydantic's
59
+ `self.model_dump(by_alias=True)`:
60
+
61
+ * `None` is only added to the output dict for nullable fields that
62
+ were set at model initialization. Other fields with value `None`
63
+ are ignored.
64
+ """
65
+ excluded_fields: Set[str] = set([
66
+ ])
67
+
68
+ _dict = self.model_dump(
69
+ by_alias=True,
70
+ exclude=excluded_fields,
71
+ exclude_none=True,
72
+ )
73
+ return _dict
74
+
75
+ @classmethod
76
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
77
+ """Create an instance of KgEmbeddingResponse from a dict"""
78
+ if obj is None:
79
+ return None
80
+
81
+ if not isinstance(obj, dict):
82
+ return cls.model_validate(obj)
83
+
84
+ _obj = cls.model_validate({
85
+ "id": obj.get("id"),
86
+ "model": obj.get("model")
87
+ })
88
+ return _obj
89
+
90
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: wordlift-client
3
- Version: 1.114.0
3
+ Version: 1.115.0
4
4
  Summary: WordLift API
5
5
  Home-page:
6
6
  Author: WordLift
@@ -1,7 +1,7 @@
1
- wordlift_client/__init__.py,sha256=ENuv_BMl6yWZsbfXvbSY57-fKiVvVh7brFaqN7nOFtI,18735
2
- wordlift_client/api_client.py,sha256=0DLtNYdVa8YnoeWxWJgEyO90BNWd5fTlahR25fpFxOc,26397
1
+ wordlift_client/__init__.py,sha256=1M4umbwEoDxd6ZysyDPVVASscrl-tO_-IjgQRr7CaK0,18812
2
+ wordlift_client/api_client.py,sha256=vuyINDX704u9-MUPYkj30hOiuP92lMISMxaZvjOmeMQ,26397
3
3
  wordlift_client/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
4
- wordlift_client/configuration.py,sha256=wGIsLddODP6Gbfsj9WzQ00SlfFMLvPKiFpTN3Otej0g,15932
4
+ wordlift_client/configuration.py,sha256=x7tA-Ln-KF4gpfhq7QXHxD6qrb3n0aIbCdUzmgxodPo,15932
5
5
  wordlift_client/exceptions.py,sha256=KvTu-E964XhAzMXOSfVycfOL1Eeraob5bgD4CfElD7M,5912
6
6
  wordlift_client/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  wordlift_client/rest.py,sha256=3D4hicZkeSFLxmhmgnlH63K7P39ToGyPk_3aQlHGznI,6817
@@ -36,7 +36,7 @@ wordlift_client/api/custom_domains_api.py,sha256=LuKLllZaBA9k7W3SBRP4gKDLoF3liCp
36
36
  wordlift_client/api/data_uri_api.py,sha256=pLZRk1-LHBq65MYmWOjek7u3LOdlRAFoIXDm0V_zX-Q,10860
37
37
  wordlift_client/api/dataset_api.py,sha256=1HI7Ssmvx5mFLZa_Xldq944GdgLiTF7mY7pU6mbfjj8,42369
38
38
  wordlift_client/api/default_api.py,sha256=yxtYQghfU_e_UAB5crSS1YTqV725mtlsv2QSKz2VIg4,11335
39
- wordlift_client/api/embedding_api.py,sha256=Sigezg2srkeVYFXE7dP9gZXx5lZ1k9W0VbZFfxO5iOs,11667
39
+ wordlift_client/api/embedding_api.py,sha256=zvNmwVIaLguoIz7wtb4mmI84CKHil8jBPVhMpdoLyeQ,11732
40
40
  wordlift_client/api/embeddings_api.py,sha256=SaKKcVZ6voLpH0Coo5glu7sTsAClHR7eTc9wKiMIMsc,11181
41
41
  wordlift_client/api/entities_api.py,sha256=6cQ2m_b5f9aWCGnbb6auGiyrBP6LV7ZQQZDyve7y3ik,59076
42
42
  wordlift_client/api/entity_gaps_api.py,sha256=9jd4dkhQlDX409rDUPHQeDBPzF5q5RfjXRUC8M4lk94,11687
@@ -78,7 +78,7 @@ wordlift_client/api/web_asyncs_metadata_api.py,sha256=cpDQmIGc6uHu5rFXwZAy1cVgcW
78
78
  wordlift_client/api/web_asyncs_responses_api.py,sha256=h91xI3iIgGoMUcZ7Oft5xiLy0rHh_2qzZDrFTRz3P8w,10889
79
79
  wordlift_client/api/web_pages_api.py,sha256=VKPLIaQRxxDn3daP0zvXRiHj2eegsZIjxUmHKzxZXoc,10839
80
80
  wordlift_client/api/web_pages_imports_api.py,sha256=yPhNLZ1jV2dEDnYuHb7OpiFH3K2ROrRYHG4ZrAf4VMU,11719
81
- wordlift_client/models/__init__.py,sha256=4mRvHRIKwuME54dXJd3yDOVvsZilENwsqAWcbPe4EU4,13250
81
+ wordlift_client/models/__init__.py,sha256=vouTUgQszIoOb1tX5h-b0Ul1LtkQpPhNVqCskvGR_VY,13327
82
82
  wordlift_client/models/account.py,sha256=trGNzy3ZBGE1VsSke4aoXBQem-3jK60xVz0OWOOMWso,5523
83
83
  wordlift_client/models/account_config.py,sha256=_4YZ8IGS4h16wa9aSaL9rpeoZYR8faiwEAtovP4eBVI,2592
84
84
  wordlift_client/models/account_info.py,sha256=tCqVHqfeK5u1cQkLOBgJRUTs-e8vmGCjqZ4wgfmNIuw,7750
@@ -160,7 +160,8 @@ wordlift_client/models/internal_link_destination.py,sha256=xWWqeUtc7MY2ErG7zitUP
160
160
  wordlift_client/models/internal_link_request.py,sha256=72ouLEOqachUNYOAEDxhOwrG43wBTGDZ5g1y6dibfvs,3537
161
161
  wordlift_client/models/internal_link_source.py,sha256=TCovpxQBR2v537rFePpptO4DEi--5V9fmmqMYA0jPrQ,2740
162
162
  wordlift_client/models/item.py,sha256=MvFFi8thULENZd9sbzTYlZH2bwqCGxwXJp4YJqtQvFs,3092
163
- wordlift_client/models/kg_embedding_request.py,sha256=g9aBAWm1_IDruTUi6--350jfCyl0-GmAkE4PaJ3u56o,2603
163
+ wordlift_client/models/kg_embedding_request.py,sha256=du2ce52FsAkkr5sLGvShzCQXFsXJHvQ8dDy5ita2tWw,2974
164
+ wordlift_client/models/kg_embedding_response.py,sha256=v4fz8xCXdcHclAbvBxLmmgV2k-Fki_OJfIhL8GzIHpk,2569
164
165
  wordlift_client/models/level_enum.py,sha256=0SRm7XXcgWCxcbrVHFi7GoFdmpla38Fl3RXIXH8_YVk,700
165
166
  wordlift_client/models/location_inner.py,sha256=Y_RHc_JGr4sWRHqSJgyFvoiWU8HCLbmtpQEjBAkk70c,4765
166
167
  wordlift_client/models/longtail_response.py,sha256=MOJRLQ14lB2Zjl5Df4W0I-WVBwnmwnHx3eLk4fdxOy4,3124
@@ -255,8 +256,8 @@ wordlift_client/models/with_limits.py,sha256=9I6-JNIb8pgUfVUegNqTc3YNx0micXUTpDo
255
256
  wordlift_client/models/word.py,sha256=FPCGb6ohwdfydE5_qG4PT-UrnMzaTktAWqEEnezwaso,3922
256
257
  wordlift_client/models/word_repetition_data.py,sha256=CQnxCnhakt12czl6a_AQIPgHlJtvR9YGBIjGV22rq14,2659
257
258
  wordlift_client/models/word_request.py,sha256=ZD13xNRYCZmF14jxEDrRRyEMAd-quDT-HsqkbUP_xWU,2627
258
- wordlift_client-1.114.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
259
- wordlift_client-1.114.0.dist-info/METADATA,sha256=tB2srgyI1_YG-vdc6UGDDhrci_9vOx-3kg1TGqetZWI,530
260
- wordlift_client-1.114.0.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
261
- wordlift_client-1.114.0.dist-info/top_level.txt,sha256=p7KFYU869ksxkpP7ADvg8baPgWkTYCzcOpDl1qrJdHk,16
262
- wordlift_client-1.114.0.dist-info/RECORD,,
259
+ wordlift_client-1.115.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
260
+ wordlift_client-1.115.0.dist-info/METADATA,sha256=TO0p5bZ8cMxcLtCCRpBIkX1zU6yBsOEfjrcD3DRdfSA,530
261
+ wordlift_client-1.115.0.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
262
+ wordlift_client-1.115.0.dist-info/top_level.txt,sha256=p7KFYU869ksxkpP7ADvg8baPgWkTYCzcOpDl1qrJdHk,16
263
+ wordlift_client-1.115.0.dist-info/RECORD,,