simile 0.3.1__py3-none-any.whl → 0.3.3__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.
Potentially problematic release.
This version of simile might be problematic. Click here for more details.
- simile/client.py +8 -0
- simile/models.py +7 -0
- simile/resources.py +5 -4
- {simile-0.3.1.dist-info → simile-0.3.3.dist-info}/METADATA +1 -1
- simile-0.3.3.dist-info/RECORD +11 -0
- simile-0.3.1.dist-info/RECORD +0 -11
- {simile-0.3.1.dist-info → simile-0.3.3.dist-info}/WHEEL +0 -0
- {simile-0.3.1.dist-info → simile-0.3.3.dist-info}/licenses/LICENSE +0 -0
- {simile-0.3.1.dist-info → simile-0.3.3.dist-info}/top_level.txt +0 -0
simile/client.py
CHANGED
|
@@ -6,6 +6,7 @@ from pydantic import BaseModel
|
|
|
6
6
|
|
|
7
7
|
from .models import (
|
|
8
8
|
Population,
|
|
9
|
+
PopulationInfo,
|
|
9
10
|
Agent as AgentModel,
|
|
10
11
|
DataItem,
|
|
11
12
|
DeletionResponse,
|
|
@@ -168,6 +169,13 @@ class Simile:
|
|
|
168
169
|
)
|
|
169
170
|
return response_data
|
|
170
171
|
|
|
172
|
+
async def get_population_info(self, population_id: Union[str, uuid.UUID]) -> PopulationInfo:
|
|
173
|
+
"""Gets basic population info (name and agent count) without full population data."""
|
|
174
|
+
response_data = await self._request(
|
|
175
|
+
"GET", f"populations/info/{str(population_id)}", response_model=PopulationInfo
|
|
176
|
+
)
|
|
177
|
+
return response_data
|
|
178
|
+
|
|
171
179
|
async def delete_population(
|
|
172
180
|
self, population_id: Union[str, uuid.UUID]
|
|
173
181
|
) -> DeletionResponse:
|
simile/models.py
CHANGED
|
@@ -13,6 +13,13 @@ class Population(BaseModel):
|
|
|
13
13
|
updated_at: datetime
|
|
14
14
|
|
|
15
15
|
|
|
16
|
+
class PopulationInfo(BaseModel):
|
|
17
|
+
population_id: uuid.UUID
|
|
18
|
+
name: str
|
|
19
|
+
description: Optional[str] = None
|
|
20
|
+
agent_count: int
|
|
21
|
+
|
|
22
|
+
|
|
16
23
|
class DataItem(BaseModel):
|
|
17
24
|
id: uuid.UUID
|
|
18
25
|
agent_id: uuid.UUID
|
simile/resources.py
CHANGED
|
@@ -10,6 +10,7 @@ from .models import (
|
|
|
10
10
|
AddContextRequest,
|
|
11
11
|
AddContextResponse,
|
|
12
12
|
SurveySessionDetailResponse,
|
|
13
|
+
SurveySessionCreateResponse,
|
|
13
14
|
)
|
|
14
15
|
|
|
15
16
|
if TYPE_CHECKING:
|
|
@@ -307,13 +308,13 @@ class SurveySession:
|
|
|
307
308
|
"POST",
|
|
308
309
|
endpoint,
|
|
309
310
|
params=params,
|
|
310
|
-
response_model=
|
|
311
|
+
response_model=SurveySessionCreateResponse,
|
|
311
312
|
)
|
|
312
313
|
|
|
313
314
|
# Create a new SurveySession instance from the response
|
|
314
315
|
return SurveySession(
|
|
315
|
-
id=
|
|
316
|
-
agent_id=
|
|
317
|
-
status=response.
|
|
316
|
+
id=response.id,
|
|
317
|
+
agent_id=response.agent_id,
|
|
318
|
+
status=response.status,
|
|
318
319
|
client=self._client,
|
|
319
320
|
)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
simile/__init__.py,sha256=gElQY-o-_BSigva3w9zIX2KuCR49OM3MpL8sqeUpKzk,936
|
|
2
|
+
simile/auth_client.py,sha256=ICImmaA5fZX9ADbIPIUh4RED3hBZvLf3XSiaqELDAME,7923
|
|
3
|
+
simile/client.py,sha256=Y-u8LH6peWoBJSEP8fva9pq5DkhYf5DpETwqcdg0ogg,12679
|
|
4
|
+
simile/exceptions.py,sha256=-rJ3KZcpvNRi9JXbDpxWDSL2lU1mEJX2piwYRZvhKmg,1406
|
|
5
|
+
simile/models.py,sha256=tqTgNWQjoHdSDffsAhiWyzf3wKgbiU137CtWr3pcFpg,5441
|
|
6
|
+
simile/resources.py,sha256=Juoa32SlN8LdvzCFaobq7uV2itmcwbk5dM_mlc4bCVk,10420
|
|
7
|
+
simile-0.3.3.dist-info/licenses/LICENSE,sha256=tpxX3bpODfyOQVyEM6kCMvPHFCpkjFDj0AICRqKqOFA,1066
|
|
8
|
+
simile-0.3.3.dist-info/METADATA,sha256=FldEaAGi3LwkMt9SBv3UIxtpfCCqJJaJnFef8OskCyU,1276
|
|
9
|
+
simile-0.3.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
10
|
+
simile-0.3.3.dist-info/top_level.txt,sha256=41lJneubAG4-ZOAs5qn7iDtDb-MDxa6DdvgBKwNX84M,7
|
|
11
|
+
simile-0.3.3.dist-info/RECORD,,
|
simile-0.3.1.dist-info/RECORD
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
simile/__init__.py,sha256=gElQY-o-_BSigva3w9zIX2KuCR49OM3MpL8sqeUpKzk,936
|
|
2
|
-
simile/auth_client.py,sha256=ICImmaA5fZX9ADbIPIUh4RED3hBZvLf3XSiaqELDAME,7923
|
|
3
|
-
simile/client.py,sha256=2ZCNzT1j-wZoT0SanLcdO0FPQN6gToksLL5hkBCcc9E,12292
|
|
4
|
-
simile/exceptions.py,sha256=-rJ3KZcpvNRi9JXbDpxWDSL2lU1mEJX2piwYRZvhKmg,1406
|
|
5
|
-
simile/models.py,sha256=SOAqUpxkiZduDBuMooTaOjiLX_3bBolWn7ivj8A-MgY,5304
|
|
6
|
-
simile/resources.py,sha256=vMt6UQ48OH6EXoCIeHSY2KaBTyJ5pUKToX7B90-GIXI,10425
|
|
7
|
-
simile-0.3.1.dist-info/licenses/LICENSE,sha256=tpxX3bpODfyOQVyEM6kCMvPHFCpkjFDj0AICRqKqOFA,1066
|
|
8
|
-
simile-0.3.1.dist-info/METADATA,sha256=a_8_7NIn0jT_QfQgnZb2U7zI9LyD-DzyNlqcDtPdpLI,1276
|
|
9
|
-
simile-0.3.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
10
|
-
simile-0.3.1.dist-info/top_level.txt,sha256=41lJneubAG4-ZOAs5qn7iDtDb-MDxa6DdvgBKwNX84M,7
|
|
11
|
-
simile-0.3.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|