simile 0.3.11__tar.gz → 0.3.13__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.
Potentially problematic release.
This version of simile might be problematic. Click here for more details.
- {simile-0.3.11 → simile-0.3.13}/PKG-INFO +1 -1
- {simile-0.3.11 → simile-0.3.13}/pyproject.toml +1 -1
- {simile-0.3.11 → simile-0.3.13}/simile/client.py +17 -2
- {simile-0.3.11 → simile-0.3.13}/simile/models.py +1 -0
- {simile-0.3.11 → simile-0.3.13}/simile.egg-info/PKG-INFO +1 -1
- {simile-0.3.11 → simile-0.3.13}/LICENSE +0 -0
- {simile-0.3.11 → simile-0.3.13}/README.md +0 -0
- {simile-0.3.11 → simile-0.3.13}/setup.cfg +0 -0
- {simile-0.3.11 → simile-0.3.13}/setup.py +0 -0
- {simile-0.3.11 → simile-0.3.13}/simile/__init__.py +0 -0
- {simile-0.3.11 → simile-0.3.13}/simile/auth_client.py +0 -0
- {simile-0.3.11 → simile-0.3.13}/simile/exceptions.py +0 -0
- {simile-0.3.11 → simile-0.3.13}/simile/resources.py +0 -0
- {simile-0.3.11 → simile-0.3.13}/simile.egg-info/SOURCES.txt +0 -0
- {simile-0.3.11 → simile-0.3.13}/simile.egg-info/dependency_links.txt +0 -0
- {simile-0.3.11 → simile-0.3.13}/simile.egg-info/requires.txt +0 -0
- {simile-0.3.11 → simile-0.3.13}/simile.egg-info/top_level.txt +0 -0
|
@@ -254,6 +254,18 @@ class Simile:
|
|
|
254
254
|
"DELETE", f"agents/{str(agent_id)}/populations/{str(population_id)}"
|
|
255
255
|
)
|
|
256
256
|
return raw_response.json()
|
|
257
|
+
|
|
258
|
+
async def batch_add_agents_to_population(
|
|
259
|
+
self, agent_ids: List[Union[str, uuid.UUID]], population_id: Union[str, uuid.UUID]
|
|
260
|
+
) -> Dict[str, Any]:
|
|
261
|
+
"""Add multiple agents to a population in a single batch operation."""
|
|
262
|
+
agent_id_strs = [str(aid) for aid in agent_ids]
|
|
263
|
+
raw_response = await self._request(
|
|
264
|
+
"POST",
|
|
265
|
+
f"populations/{str(population_id)}/agents/batch",
|
|
266
|
+
json=agent_id_strs
|
|
267
|
+
)
|
|
268
|
+
return raw_response.json()
|
|
257
269
|
|
|
258
270
|
async def get_populations_for_agent(
|
|
259
271
|
self, agent_id: Union[str, uuid.UUID]
|
|
@@ -300,10 +312,13 @@ class Simile:
|
|
|
300
312
|
return [DataItem(**item) for item in raw_response.json()]
|
|
301
313
|
|
|
302
314
|
async def update_data_item(
|
|
303
|
-
self,
|
|
315
|
+
self,
|
|
316
|
+
data_item_id: Union[str, uuid.UUID],
|
|
317
|
+
content: Any,
|
|
318
|
+
metadata: Optional[Dict[str, Any]] = None,
|
|
304
319
|
) -> DataItem:
|
|
305
320
|
"""Updates an existing data item."""
|
|
306
|
-
payload = UpdateDataItemPayload(content=content)
|
|
321
|
+
payload = UpdateDataItemPayload(content=content, metadata=metadata)
|
|
307
322
|
response_data = await self._request(
|
|
308
323
|
"POST",
|
|
309
324
|
f"data_item/update/{str(data_item_id)}",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|