neurograph-core 1.202510232201__py3-none-any.whl → 1.202510232218__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.
- neurograph/v1/__init__.py +2 -0
- neurograph/v1/api/persona_api.py +272 -0
- neurograph/v1/models/__init__.py +1 -0
- neurograph/v1/models/personas_get_persona_instance_response.py +183 -0
- {neurograph_core-1.202510232201.dist-info → neurograph_core-1.202510232218.dist-info}/METADATA +1 -1
- {neurograph_core-1.202510232201.dist-info → neurograph_core-1.202510232218.dist-info}/RECORD +8 -7
- {neurograph_core-1.202510232201.dist-info → neurograph_core-1.202510232218.dist-info}/WHEEL +0 -0
- {neurograph_core-1.202510232201.dist-info → neurograph_core-1.202510232218.dist-info}/top_level.txt +0 -0
neurograph/v1/__init__.py
CHANGED
|
@@ -180,6 +180,7 @@ __all__ = [
|
|
|
180
180
|
"PersonasFactorCreateRequest",
|
|
181
181
|
"PersonasFactorCreateResponse",
|
|
182
182
|
"PersonasFactorRow",
|
|
183
|
+
"PersonasGetPersonaInstanceResponse",
|
|
183
184
|
"PersonasInsightCreateRequest",
|
|
184
185
|
"PersonasInsightCreateResponse",
|
|
185
186
|
"PersonasInstanceCreateRequest",
|
|
@@ -390,6 +391,7 @@ from neurograph.v1.models.organizations_workbench_config import OrganizationsWor
|
|
|
390
391
|
from neurograph.v1.models.personas_factor_create_request import PersonasFactorCreateRequest as PersonasFactorCreateRequest
|
|
391
392
|
from neurograph.v1.models.personas_factor_create_response import PersonasFactorCreateResponse as PersonasFactorCreateResponse
|
|
392
393
|
from neurograph.v1.models.personas_factor_row import PersonasFactorRow as PersonasFactorRow
|
|
394
|
+
from neurograph.v1.models.personas_get_persona_instance_response import PersonasGetPersonaInstanceResponse as PersonasGetPersonaInstanceResponse
|
|
393
395
|
from neurograph.v1.models.personas_insight_create_request import PersonasInsightCreateRequest as PersonasInsightCreateRequest
|
|
394
396
|
from neurograph.v1.models.personas_insight_create_response import PersonasInsightCreateResponse as PersonasInsightCreateResponse
|
|
395
397
|
from neurograph.v1.models.personas_instance_create_request import PersonasInstanceCreateRequest as PersonasInstanceCreateRequest
|
neurograph/v1/api/persona_api.py
CHANGED
|
@@ -21,6 +21,7 @@ from typing import Optional
|
|
|
21
21
|
from typing_extensions import Annotated
|
|
22
22
|
from neurograph.v1.models.personas_factor_create_request import PersonasFactorCreateRequest
|
|
23
23
|
from neurograph.v1.models.personas_factor_create_response import PersonasFactorCreateResponse
|
|
24
|
+
from neurograph.v1.models.personas_get_persona_instance_response import PersonasGetPersonaInstanceResponse
|
|
24
25
|
from neurograph.v1.models.personas_insight_create_request import PersonasInsightCreateRequest
|
|
25
26
|
from neurograph.v1.models.personas_insight_create_response import PersonasInsightCreateResponse
|
|
26
27
|
from neurograph.v1.models.personas_instance_create_request import PersonasInstanceCreateRequest
|
|
@@ -1145,6 +1146,277 @@ class PersonaApi:
|
|
|
1145
1146
|
|
|
1146
1147
|
|
|
1147
1148
|
|
|
1149
|
+
@validate_call
|
|
1150
|
+
def api_v1_persona_instance_id_get(
|
|
1151
|
+
self,
|
|
1152
|
+
id: Annotated[StrictStr, Field(description="Persona Instance ID")],
|
|
1153
|
+
_request_timeout: Union[
|
|
1154
|
+
None,
|
|
1155
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1156
|
+
Tuple[
|
|
1157
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1158
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1159
|
+
]
|
|
1160
|
+
] = None,
|
|
1161
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1162
|
+
_content_type: Optional[StrictStr] = None,
|
|
1163
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1164
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1165
|
+
) -> PersonasGetPersonaInstanceResponse:
|
|
1166
|
+
"""Get a single Persona Instance and all associated data
|
|
1167
|
+
|
|
1168
|
+
Get a single Persona Instance and all associated data by ID
|
|
1169
|
+
|
|
1170
|
+
:param id: Persona Instance ID (required)
|
|
1171
|
+
:type id: str
|
|
1172
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1173
|
+
number provided, it will be total request
|
|
1174
|
+
timeout. It can also be a pair (tuple) of
|
|
1175
|
+
(connection, read) timeouts.
|
|
1176
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1177
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1178
|
+
request; this effectively ignores the
|
|
1179
|
+
authentication in the spec for a single request.
|
|
1180
|
+
:type _request_auth: dict, optional
|
|
1181
|
+
:param _content_type: force content-type for the request.
|
|
1182
|
+
:type _content_type: str, Optional
|
|
1183
|
+
:param _headers: set to override the headers for a single
|
|
1184
|
+
request; this effectively ignores the headers
|
|
1185
|
+
in the spec for a single request.
|
|
1186
|
+
:type _headers: dict, optional
|
|
1187
|
+
:param _host_index: set to override the host_index for a single
|
|
1188
|
+
request; this effectively ignores the host_index
|
|
1189
|
+
in the spec for a single request.
|
|
1190
|
+
:type _host_index: int, optional
|
|
1191
|
+
:return: Returns the result object.
|
|
1192
|
+
""" # noqa: E501
|
|
1193
|
+
|
|
1194
|
+
_param = self._api_v1_persona_instance_id_get_serialize(
|
|
1195
|
+
id=id,
|
|
1196
|
+
_request_auth=_request_auth,
|
|
1197
|
+
_content_type=_content_type,
|
|
1198
|
+
_headers=_headers,
|
|
1199
|
+
_host_index=_host_index
|
|
1200
|
+
)
|
|
1201
|
+
|
|
1202
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1203
|
+
'200': "PersonasGetPersonaInstanceResponse",
|
|
1204
|
+
'400': "PersonasGetPersonaInstanceResponse",
|
|
1205
|
+
'404': "PersonasGetPersonaInstanceResponse",
|
|
1206
|
+
'503': "PersonasGetPersonaInstanceResponse",
|
|
1207
|
+
}
|
|
1208
|
+
response_data = self.api_client.call_api(
|
|
1209
|
+
*_param,
|
|
1210
|
+
_request_timeout=_request_timeout
|
|
1211
|
+
)
|
|
1212
|
+
response_data.read()
|
|
1213
|
+
return self.api_client.response_deserialize(
|
|
1214
|
+
response_data=response_data,
|
|
1215
|
+
response_types_map=_response_types_map,
|
|
1216
|
+
).data
|
|
1217
|
+
|
|
1218
|
+
|
|
1219
|
+
@validate_call
|
|
1220
|
+
def api_v1_persona_instance_id_get_with_http_info(
|
|
1221
|
+
self,
|
|
1222
|
+
id: Annotated[StrictStr, Field(description="Persona Instance ID")],
|
|
1223
|
+
_request_timeout: Union[
|
|
1224
|
+
None,
|
|
1225
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1226
|
+
Tuple[
|
|
1227
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1228
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1229
|
+
]
|
|
1230
|
+
] = None,
|
|
1231
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1232
|
+
_content_type: Optional[StrictStr] = None,
|
|
1233
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1234
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1235
|
+
) -> ApiResponse[PersonasGetPersonaInstanceResponse]:
|
|
1236
|
+
"""Get a single Persona Instance and all associated data
|
|
1237
|
+
|
|
1238
|
+
Get a single Persona Instance and all associated data by ID
|
|
1239
|
+
|
|
1240
|
+
:param id: Persona Instance ID (required)
|
|
1241
|
+
:type id: str
|
|
1242
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1243
|
+
number provided, it will be total request
|
|
1244
|
+
timeout. It can also be a pair (tuple) of
|
|
1245
|
+
(connection, read) timeouts.
|
|
1246
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1247
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1248
|
+
request; this effectively ignores the
|
|
1249
|
+
authentication in the spec for a single request.
|
|
1250
|
+
:type _request_auth: dict, optional
|
|
1251
|
+
:param _content_type: force content-type for the request.
|
|
1252
|
+
:type _content_type: str, Optional
|
|
1253
|
+
:param _headers: set to override the headers for a single
|
|
1254
|
+
request; this effectively ignores the headers
|
|
1255
|
+
in the spec for a single request.
|
|
1256
|
+
:type _headers: dict, optional
|
|
1257
|
+
:param _host_index: set to override the host_index for a single
|
|
1258
|
+
request; this effectively ignores the host_index
|
|
1259
|
+
in the spec for a single request.
|
|
1260
|
+
:type _host_index: int, optional
|
|
1261
|
+
:return: Returns the result object.
|
|
1262
|
+
""" # noqa: E501
|
|
1263
|
+
|
|
1264
|
+
_param = self._api_v1_persona_instance_id_get_serialize(
|
|
1265
|
+
id=id,
|
|
1266
|
+
_request_auth=_request_auth,
|
|
1267
|
+
_content_type=_content_type,
|
|
1268
|
+
_headers=_headers,
|
|
1269
|
+
_host_index=_host_index
|
|
1270
|
+
)
|
|
1271
|
+
|
|
1272
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1273
|
+
'200': "PersonasGetPersonaInstanceResponse",
|
|
1274
|
+
'400': "PersonasGetPersonaInstanceResponse",
|
|
1275
|
+
'404': "PersonasGetPersonaInstanceResponse",
|
|
1276
|
+
'503': "PersonasGetPersonaInstanceResponse",
|
|
1277
|
+
}
|
|
1278
|
+
response_data = self.api_client.call_api(
|
|
1279
|
+
*_param,
|
|
1280
|
+
_request_timeout=_request_timeout
|
|
1281
|
+
)
|
|
1282
|
+
response_data.read()
|
|
1283
|
+
return self.api_client.response_deserialize(
|
|
1284
|
+
response_data=response_data,
|
|
1285
|
+
response_types_map=_response_types_map,
|
|
1286
|
+
)
|
|
1287
|
+
|
|
1288
|
+
|
|
1289
|
+
@validate_call
|
|
1290
|
+
def api_v1_persona_instance_id_get_without_preload_content(
|
|
1291
|
+
self,
|
|
1292
|
+
id: Annotated[StrictStr, Field(description="Persona Instance ID")],
|
|
1293
|
+
_request_timeout: Union[
|
|
1294
|
+
None,
|
|
1295
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1296
|
+
Tuple[
|
|
1297
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1298
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1299
|
+
]
|
|
1300
|
+
] = None,
|
|
1301
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1302
|
+
_content_type: Optional[StrictStr] = None,
|
|
1303
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1304
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1305
|
+
) -> RESTResponseType:
|
|
1306
|
+
"""Get a single Persona Instance and all associated data
|
|
1307
|
+
|
|
1308
|
+
Get a single Persona Instance and all associated data by ID
|
|
1309
|
+
|
|
1310
|
+
:param id: Persona Instance ID (required)
|
|
1311
|
+
:type id: str
|
|
1312
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1313
|
+
number provided, it will be total request
|
|
1314
|
+
timeout. It can also be a pair (tuple) of
|
|
1315
|
+
(connection, read) timeouts.
|
|
1316
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1317
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1318
|
+
request; this effectively ignores the
|
|
1319
|
+
authentication in the spec for a single request.
|
|
1320
|
+
:type _request_auth: dict, optional
|
|
1321
|
+
:param _content_type: force content-type for the request.
|
|
1322
|
+
:type _content_type: str, Optional
|
|
1323
|
+
:param _headers: set to override the headers for a single
|
|
1324
|
+
request; this effectively ignores the headers
|
|
1325
|
+
in the spec for a single request.
|
|
1326
|
+
:type _headers: dict, optional
|
|
1327
|
+
:param _host_index: set to override the host_index for a single
|
|
1328
|
+
request; this effectively ignores the host_index
|
|
1329
|
+
in the spec for a single request.
|
|
1330
|
+
:type _host_index: int, optional
|
|
1331
|
+
:return: Returns the result object.
|
|
1332
|
+
""" # noqa: E501
|
|
1333
|
+
|
|
1334
|
+
_param = self._api_v1_persona_instance_id_get_serialize(
|
|
1335
|
+
id=id,
|
|
1336
|
+
_request_auth=_request_auth,
|
|
1337
|
+
_content_type=_content_type,
|
|
1338
|
+
_headers=_headers,
|
|
1339
|
+
_host_index=_host_index
|
|
1340
|
+
)
|
|
1341
|
+
|
|
1342
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1343
|
+
'200': "PersonasGetPersonaInstanceResponse",
|
|
1344
|
+
'400': "PersonasGetPersonaInstanceResponse",
|
|
1345
|
+
'404': "PersonasGetPersonaInstanceResponse",
|
|
1346
|
+
'503': "PersonasGetPersonaInstanceResponse",
|
|
1347
|
+
}
|
|
1348
|
+
response_data = self.api_client.call_api(
|
|
1349
|
+
*_param,
|
|
1350
|
+
_request_timeout=_request_timeout
|
|
1351
|
+
)
|
|
1352
|
+
return response_data.response
|
|
1353
|
+
|
|
1354
|
+
|
|
1355
|
+
def _api_v1_persona_instance_id_get_serialize(
|
|
1356
|
+
self,
|
|
1357
|
+
id,
|
|
1358
|
+
_request_auth,
|
|
1359
|
+
_content_type,
|
|
1360
|
+
_headers,
|
|
1361
|
+
_host_index,
|
|
1362
|
+
) -> RequestSerialized:
|
|
1363
|
+
|
|
1364
|
+
_host = None
|
|
1365
|
+
|
|
1366
|
+
_collection_formats: Dict[str, str] = {
|
|
1367
|
+
}
|
|
1368
|
+
|
|
1369
|
+
_path_params: Dict[str, str] = {}
|
|
1370
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1371
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1372
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1373
|
+
_files: Dict[
|
|
1374
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1375
|
+
] = {}
|
|
1376
|
+
_body_params: Optional[bytes] = None
|
|
1377
|
+
|
|
1378
|
+
# process the path parameters
|
|
1379
|
+
if id is not None:
|
|
1380
|
+
_path_params['id'] = id
|
|
1381
|
+
# process the query parameters
|
|
1382
|
+
# process the header parameters
|
|
1383
|
+
# process the form parameters
|
|
1384
|
+
# process the body parameter
|
|
1385
|
+
|
|
1386
|
+
|
|
1387
|
+
# set the HTTP header `Accept`
|
|
1388
|
+
if 'Accept' not in _header_params:
|
|
1389
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1390
|
+
[
|
|
1391
|
+
'application/json'
|
|
1392
|
+
]
|
|
1393
|
+
)
|
|
1394
|
+
|
|
1395
|
+
|
|
1396
|
+
# authentication setting
|
|
1397
|
+
_auth_settings: List[str] = [
|
|
1398
|
+
'TokenAuth',
|
|
1399
|
+
'ApiKeyAuth'
|
|
1400
|
+
]
|
|
1401
|
+
|
|
1402
|
+
return self.api_client.param_serialize(
|
|
1403
|
+
method='GET',
|
|
1404
|
+
resource_path='/api/v1/persona/instance/{id}',
|
|
1405
|
+
path_params=_path_params,
|
|
1406
|
+
query_params=_query_params,
|
|
1407
|
+
header_params=_header_params,
|
|
1408
|
+
body=_body_params,
|
|
1409
|
+
post_params=_form_params,
|
|
1410
|
+
files=_files,
|
|
1411
|
+
auth_settings=_auth_settings,
|
|
1412
|
+
collection_formats=_collection_formats,
|
|
1413
|
+
_host=_host,
|
|
1414
|
+
_request_auth=_request_auth
|
|
1415
|
+
)
|
|
1416
|
+
|
|
1417
|
+
|
|
1418
|
+
|
|
1419
|
+
|
|
1148
1420
|
@validate_call
|
|
1149
1421
|
def api_v1_persona_instance_post(
|
|
1150
1422
|
self,
|
neurograph/v1/models/__init__.py
CHANGED
|
@@ -151,6 +151,7 @@ from neurograph.v1.models.organizations_workbench_config import OrganizationsWor
|
|
|
151
151
|
from neurograph.v1.models.personas_factor_create_request import PersonasFactorCreateRequest
|
|
152
152
|
from neurograph.v1.models.personas_factor_create_response import PersonasFactorCreateResponse
|
|
153
153
|
from neurograph.v1.models.personas_factor_row import PersonasFactorRow
|
|
154
|
+
from neurograph.v1.models.personas_get_persona_instance_response import PersonasGetPersonaInstanceResponse
|
|
154
155
|
from neurograph.v1.models.personas_insight_create_request import PersonasInsightCreateRequest
|
|
155
156
|
from neurograph.v1.models.personas_insight_create_response import PersonasInsightCreateResponse
|
|
156
157
|
from neurograph.v1.models.personas_instance_create_request import PersonasInstanceCreateRequest
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Neurograph Core
|
|
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
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
22
|
+
from neurograph.v1.models.personas_kpi import PersonasKpi
|
|
23
|
+
from neurograph.v1.models.personas_match_criteria_row_in_db import PersonasMatchCriteriaRowInDb
|
|
24
|
+
from neurograph.v1.models.personas_persona_factor import PersonasPersonaFactor
|
|
25
|
+
from neurograph.v1.models.personas_persona_insight import PersonasPersonaInsight
|
|
26
|
+
from neurograph.v1.models.personas_persona_personality_trait import PersonasPersonaPersonalityTrait
|
|
27
|
+
from typing import Optional, Set
|
|
28
|
+
from typing_extensions import Self
|
|
29
|
+
|
|
30
|
+
class PersonasGetPersonaInstanceResponse(BaseModel):
|
|
31
|
+
"""
|
|
32
|
+
PersonasGetPersonaInstanceResponse
|
|
33
|
+
""" # noqa: E501
|
|
34
|
+
age: Optional[Union[StrictFloat, StrictInt]] = None
|
|
35
|
+
description: Optional[StrictStr] = None
|
|
36
|
+
error: Optional[StrictStr] = None
|
|
37
|
+
factors: Optional[List[PersonasPersonaFactor]] = None
|
|
38
|
+
female: Optional[Union[StrictFloat, StrictInt]] = None
|
|
39
|
+
id: Optional[StrictStr] = None
|
|
40
|
+
income: Optional[StrictStr] = None
|
|
41
|
+
insights: Optional[List[PersonasPersonaInsight]] = None
|
|
42
|
+
kpis: Optional[List[PersonasKpi]] = None
|
|
43
|
+
male: Optional[Union[StrictFloat, StrictInt]] = None
|
|
44
|
+
match_criteria: Optional[List[PersonasMatchCriteriaRowInDb]] = None
|
|
45
|
+
metadata: Optional[StrictStr] = None
|
|
46
|
+
name: Optional[StrictStr] = None
|
|
47
|
+
persona_seed_id: Optional[StrictStr] = None
|
|
48
|
+
personality_background: Optional[StrictStr] = None
|
|
49
|
+
personality_first_name: Optional[StrictStr] = None
|
|
50
|
+
personality_img_url: Optional[StrictStr] = None
|
|
51
|
+
personality_last_name: Optional[StrictStr] = None
|
|
52
|
+
personality_quote: Optional[StrictStr] = None
|
|
53
|
+
personality_traits: Optional[List[PersonasPersonaPersonalityTrait]] = None
|
|
54
|
+
personality_video_url: Optional[StrictStr] = None
|
|
55
|
+
positioning_statement: Optional[StrictStr] = None
|
|
56
|
+
seed_uid: Optional[StrictStr] = None
|
|
57
|
+
summary_detail: Optional[StrictStr] = None
|
|
58
|
+
summary_headline: Optional[StrictStr] = None
|
|
59
|
+
tag: Optional[StrictStr] = None
|
|
60
|
+
ts_created: Optional[StrictInt] = None
|
|
61
|
+
ts_updated: Optional[StrictInt] = None
|
|
62
|
+
value: Optional[StrictStr] = None
|
|
63
|
+
__properties: ClassVar[List[str]] = ["age", "description", "error", "factors", "female", "id", "income", "insights", "kpis", "male", "match_criteria", "metadata", "name", "persona_seed_id", "personality_background", "personality_first_name", "personality_img_url", "personality_last_name", "personality_quote", "personality_traits", "personality_video_url", "positioning_statement", "seed_uid", "summary_detail", "summary_headline", "tag", "ts_created", "ts_updated", "value"]
|
|
64
|
+
|
|
65
|
+
model_config = ConfigDict(
|
|
66
|
+
populate_by_name=True,
|
|
67
|
+
validate_assignment=True,
|
|
68
|
+
protected_namespaces=(),
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def to_str(self) -> str:
|
|
73
|
+
"""Returns the string representation of the model using alias"""
|
|
74
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
75
|
+
|
|
76
|
+
def to_json(self) -> str:
|
|
77
|
+
"""Returns the JSON representation of the model using alias"""
|
|
78
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
79
|
+
return json.dumps(self.to_dict())
|
|
80
|
+
|
|
81
|
+
@classmethod
|
|
82
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
83
|
+
"""Create an instance of PersonasGetPersonaInstanceResponse from a JSON string"""
|
|
84
|
+
return cls.from_dict(json.loads(json_str))
|
|
85
|
+
|
|
86
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
87
|
+
"""Return the dictionary representation of the model using alias.
|
|
88
|
+
|
|
89
|
+
This has the following differences from calling pydantic's
|
|
90
|
+
`self.model_dump(by_alias=True)`:
|
|
91
|
+
|
|
92
|
+
* `None` is only added to the output dict for nullable fields that
|
|
93
|
+
were set at model initialization. Other fields with value `None`
|
|
94
|
+
are ignored.
|
|
95
|
+
"""
|
|
96
|
+
excluded_fields: Set[str] = set([
|
|
97
|
+
])
|
|
98
|
+
|
|
99
|
+
_dict = self.model_dump(
|
|
100
|
+
by_alias=True,
|
|
101
|
+
exclude=excluded_fields,
|
|
102
|
+
exclude_none=True,
|
|
103
|
+
)
|
|
104
|
+
# override the default output from pydantic by calling `to_dict()` of each item in factors (list)
|
|
105
|
+
_items = []
|
|
106
|
+
if self.factors:
|
|
107
|
+
for _item_factors in self.factors:
|
|
108
|
+
if _item_factors:
|
|
109
|
+
_items.append(_item_factors.to_dict())
|
|
110
|
+
_dict['factors'] = _items
|
|
111
|
+
# override the default output from pydantic by calling `to_dict()` of each item in insights (list)
|
|
112
|
+
_items = []
|
|
113
|
+
if self.insights:
|
|
114
|
+
for _item_insights in self.insights:
|
|
115
|
+
if _item_insights:
|
|
116
|
+
_items.append(_item_insights.to_dict())
|
|
117
|
+
_dict['insights'] = _items
|
|
118
|
+
# override the default output from pydantic by calling `to_dict()` of each item in kpis (list)
|
|
119
|
+
_items = []
|
|
120
|
+
if self.kpis:
|
|
121
|
+
for _item_kpis in self.kpis:
|
|
122
|
+
if _item_kpis:
|
|
123
|
+
_items.append(_item_kpis.to_dict())
|
|
124
|
+
_dict['kpis'] = _items
|
|
125
|
+
# override the default output from pydantic by calling `to_dict()` of each item in match_criteria (list)
|
|
126
|
+
_items = []
|
|
127
|
+
if self.match_criteria:
|
|
128
|
+
for _item_match_criteria in self.match_criteria:
|
|
129
|
+
if _item_match_criteria:
|
|
130
|
+
_items.append(_item_match_criteria.to_dict())
|
|
131
|
+
_dict['match_criteria'] = _items
|
|
132
|
+
# override the default output from pydantic by calling `to_dict()` of each item in personality_traits (list)
|
|
133
|
+
_items = []
|
|
134
|
+
if self.personality_traits:
|
|
135
|
+
for _item_personality_traits in self.personality_traits:
|
|
136
|
+
if _item_personality_traits:
|
|
137
|
+
_items.append(_item_personality_traits.to_dict())
|
|
138
|
+
_dict['personality_traits'] = _items
|
|
139
|
+
return _dict
|
|
140
|
+
|
|
141
|
+
@classmethod
|
|
142
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
143
|
+
"""Create an instance of PersonasGetPersonaInstanceResponse from a dict"""
|
|
144
|
+
if obj is None:
|
|
145
|
+
return None
|
|
146
|
+
|
|
147
|
+
if not isinstance(obj, dict):
|
|
148
|
+
return cls.model_validate(obj)
|
|
149
|
+
|
|
150
|
+
_obj = cls.model_validate({
|
|
151
|
+
"age": obj.get("age"),
|
|
152
|
+
"description": obj.get("description"),
|
|
153
|
+
"error": obj.get("error"),
|
|
154
|
+
"factors": [PersonasPersonaFactor.from_dict(_item) for _item in obj["factors"]] if obj.get("factors") is not None else None,
|
|
155
|
+
"female": obj.get("female"),
|
|
156
|
+
"id": obj.get("id"),
|
|
157
|
+
"income": obj.get("income"),
|
|
158
|
+
"insights": [PersonasPersonaInsight.from_dict(_item) for _item in obj["insights"]] if obj.get("insights") is not None else None,
|
|
159
|
+
"kpis": [PersonasKpi.from_dict(_item) for _item in obj["kpis"]] if obj.get("kpis") is not None else None,
|
|
160
|
+
"male": obj.get("male"),
|
|
161
|
+
"match_criteria": [PersonasMatchCriteriaRowInDb.from_dict(_item) for _item in obj["match_criteria"]] if obj.get("match_criteria") is not None else None,
|
|
162
|
+
"metadata": obj.get("metadata"),
|
|
163
|
+
"name": obj.get("name"),
|
|
164
|
+
"persona_seed_id": obj.get("persona_seed_id"),
|
|
165
|
+
"personality_background": obj.get("personality_background"),
|
|
166
|
+
"personality_first_name": obj.get("personality_first_name"),
|
|
167
|
+
"personality_img_url": obj.get("personality_img_url"),
|
|
168
|
+
"personality_last_name": obj.get("personality_last_name"),
|
|
169
|
+
"personality_quote": obj.get("personality_quote"),
|
|
170
|
+
"personality_traits": [PersonasPersonaPersonalityTrait.from_dict(_item) for _item in obj["personality_traits"]] if obj.get("personality_traits") is not None else None,
|
|
171
|
+
"personality_video_url": obj.get("personality_video_url"),
|
|
172
|
+
"positioning_statement": obj.get("positioning_statement"),
|
|
173
|
+
"seed_uid": obj.get("seed_uid"),
|
|
174
|
+
"summary_detail": obj.get("summary_detail"),
|
|
175
|
+
"summary_headline": obj.get("summary_headline"),
|
|
176
|
+
"tag": obj.get("tag"),
|
|
177
|
+
"ts_created": obj.get("ts_created"),
|
|
178
|
+
"ts_updated": obj.get("ts_updated"),
|
|
179
|
+
"value": obj.get("value")
|
|
180
|
+
})
|
|
181
|
+
return _obj
|
|
182
|
+
|
|
183
|
+
|
{neurograph_core-1.202510232201.dist-info → neurograph_core-1.202510232218.dist-info}/RECORD
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
neurograph/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
neurograph/v1/__init__.py,sha256=
|
|
2
|
+
neurograph/v1/__init__.py,sha256=GGdrLbCQuANuO6VOVuVl0imQrNVSN4PuY0wzo5GqN1E,28572
|
|
3
3
|
neurograph/v1/api_client.py,sha256=DDElXCrEofUsxEKyghe4QzGQABihYiXZ7nQ-NXo0Qbo,27790
|
|
4
4
|
neurograph/v1/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
|
|
5
5
|
neurograph/v1/configuration.py,sha256=Z9W6H5lLIHbBY8hJwTw9Zd26kLWVOaoPwnc3daBOIVM,19190
|
|
@@ -17,12 +17,12 @@ neurograph/v1/api/knowledge_extract_api.py,sha256=ggHBzFsfXEqaWJgX21jnDNnE4NRwiJ
|
|
|
17
17
|
neurograph/v1/api/lookup_api.py,sha256=FF-HYxUi3TweR1P7oQvYGqsYfvZFWst9GCEjcfC9u7k,60659
|
|
18
18
|
neurograph/v1/api/organization_api.py,sha256=3X0qublErpfx4J1zvPzjzY7S_AxcVi4vkc3APC519d8,77955
|
|
19
19
|
neurograph/v1/api/organization_metadata_api.py,sha256=PtwuBFSY0FjCAB7fuR710CRkQbtR-xpruX9780hGQxk,34860
|
|
20
|
-
neurograph/v1/api/persona_api.py,sha256=
|
|
20
|
+
neurograph/v1/api/persona_api.py,sha256=wVtRkoPy5lFQRuC_YGMwVRhzDMgvzMbdD_1Mk1Ii7us,143563
|
|
21
21
|
neurograph/v1/api/reporting_api.py,sha256=EcqzhzFcaZGYtNPmTtXPSHLYL8P7BEiVv2dUQMdnRXU,11505
|
|
22
22
|
neurograph/v1/api/system_api.py,sha256=IIy_ywuthVoa9e_Mrhf34ZsPemMTFm-3lMxVT6DgaKI,10864
|
|
23
23
|
neurograph/v1/api/user_api.py,sha256=0Y4xYK1n7WxkfAY8X6umW0y21mFkeKEaEWcLO9ub20o,10366
|
|
24
24
|
neurograph/v1/api/workbench_api.py,sha256=BMhqbbd_PSZ27br7idOgyZFdxMQ0N7O4fFQq8n_6JVs,34221
|
|
25
|
-
neurograph/v1/models/__init__.py,sha256=
|
|
25
|
+
neurograph/v1/models/__init__.py,sha256=YMp92SGm5ry-Ya-McMLjWQjsxxbr0CkRuCYa6gfjfCY,15602
|
|
26
26
|
neurograph/v1/models/admin_permission_response.py,sha256=RPM3v7iutgJKHnZbVo5ALwqMO8UDc6K0DzHdEoRgubo,2936
|
|
27
27
|
neurograph/v1/models/admin_set_permission_request.py,sha256=TQUB1ar9h-VmiRNm5cbUMCV5Rr98AXG7aew5BMyHBq0,2753
|
|
28
28
|
neurograph/v1/models/admin_upsert_user_request.py,sha256=FtnMRtbtg-5rHEFvt62j5K9LhdyIcM1f52BkpLSfQyk,2740
|
|
@@ -161,6 +161,7 @@ neurograph/v1/models/organizations_workbench_config.py,sha256=RbejWgmn-h1taeR9dY
|
|
|
161
161
|
neurograph/v1/models/personas_factor_create_request.py,sha256=QgVDKbJna_BDGc5rqHLIUxM607rEfalLxOmOhhzRNlI,3068
|
|
162
162
|
neurograph/v1/models/personas_factor_create_response.py,sha256=TNMckS_2ouBp643t07KBRQSjTmehshxFytzEfQtk8LY,3127
|
|
163
163
|
neurograph/v1/models/personas_factor_row.py,sha256=1tXF3fy0YKsGBTJ2o10DdyjhMaBRsnGSm0p38sUlwJI,3194
|
|
164
|
+
neurograph/v1/models/personas_get_persona_instance_response.py,sha256=DwsqjIXfy-4ieygb8RikxgMDMzaTvIXKVYKjBpr6K3w,8567
|
|
164
165
|
neurograph/v1/models/personas_insight_create_request.py,sha256=uPX2RDGMbexxWpGFixGaUeocim_YAucUN1UEMZGZdCw,2786
|
|
165
166
|
neurograph/v1/models/personas_insight_create_response.py,sha256=Jantg1PJKhiF_upZ7maKeYN-JFW4Ihlu7lCzOEkb6TE,2956
|
|
166
167
|
neurograph/v1/models/personas_instance_create_request.py,sha256=I6Pazw0Q_UZVXrNQ6ii6n3bpOXQ4MoT6F4ICKavKiNc,4780
|
|
@@ -202,7 +203,7 @@ neurograph/v1/models/workbench_workbench_version.py,sha256=AsgikzRU6BRj99gRFGGTl
|
|
|
202
203
|
neurograph/v1/models/workbench_workbench_version_many_response.py,sha256=xuOxnMscyIo8DhsR-yyir1rruExSgNWMu3yMWzgWbc0,3195
|
|
203
204
|
neurograph/v1/models/workbench_workbench_version_response.py,sha256=nMupKXBsoi4eXD-fsp_5PHrMislATwoBpVIZU7mG9RM,3283
|
|
204
205
|
neurograph/v1/models/workbench_workbench_version_upsert_request.py,sha256=bAxjBeFe8EG3bXPUrLjfntlC65lK5p_ddPs_0yX3A9g,2994
|
|
205
|
-
neurograph_core-1.
|
|
206
|
-
neurograph_core-1.
|
|
207
|
-
neurograph_core-1.
|
|
208
|
-
neurograph_core-1.
|
|
206
|
+
neurograph_core-1.202510232218.dist-info/METADATA,sha256=pV2eXBJx1FMlzIe3gHB-N9v_qvNgkd86HHVp2b2sAUA,1902
|
|
207
|
+
neurograph_core-1.202510232218.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
208
|
+
neurograph_core-1.202510232218.dist-info/top_level.txt,sha256=iajcSUfGanaBq4McklJQ4IXVuwV24WJhY7FRzlQybxI,11
|
|
209
|
+
neurograph_core-1.202510232218.dist-info/RECORD,,
|
|
File without changes
|
{neurograph_core-1.202510232201.dist-info → neurograph_core-1.202510232218.dist-info}/top_level.txt
RENAMED
|
File without changes
|