simplex 1.2.76__py3-none-any.whl → 1.2.79__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 simplex might be problematic. Click here for more details.

simplex/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
- from .simplex import Simplex
1
+ from .simplex import Simplex, BASE_URL
2
2
 
3
3
  __version__ = "1.2.22"
4
- __all__ = ["Simplex"]
4
+ __all__ = ["Simplex", "BASE_URL"]
simplex/simplex.py CHANGED
@@ -262,7 +262,32 @@ class Simplex:
262
262
  return response.json()['captcha_solved']
263
263
  else:
264
264
  raise ValueError(f"Failed to wait for captcha: {response.json()['error']}")
265
+
266
+ def agentic(self, task: str, max_steps: Optional[int] = 10):
267
+ if not self.session_id:
268
+ raise ValueError(f"Must call create_session before calling action agentic with task='{task}'")
265
269
 
270
+ data = {
271
+ 'task': task,
272
+ 'session_id': self.session_id,
273
+ 'max_steps': max_steps
274
+ }
275
+
276
+ response = requests.post(
277
+ f"{BASE_URL}/agentic",
278
+ headers={
279
+ 'x-api-key': self.api_key
280
+ },
281
+ data=data
282
+ )
283
+
284
+ if 'succeeded' not in response.json():
285
+ raise ValueError(f"It looks like the agentic action failed to return a response. Did you set your api_key when creating the Simplex class?")
286
+ if response.json()['succeeded']:
287
+ return
288
+ else:
289
+ raise ValueError(f"Failed to complete agentic task: {response.json()['error']}")
290
+
266
291
  def click(self, element_description: str, dropdown_option: bool = False, override_fail_state: bool = False):
267
292
  if not element_description or not element_description.strip():
268
293
  raise ValueError("element_description cannot be empty")
@@ -961,9 +986,6 @@ class Simplex:
961
986
  if 'succeeded' not in response.json():
962
987
  raise ValueError(f"It looks like the capture_login_session action failed to return a response. Did you set your api_key when creating the Simplex class?")
963
988
  response_json = response.json()
964
- if "storage_state" in response_json:
965
- print("response keys: ", response_json['storage_state'].keys())
966
- # print(response_json)
967
989
  if response_json['succeeded']:
968
990
  return response_json['storage_state']
969
991
  else:
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.1
2
2
  Name: simplex
3
- Version: 1.2.76
3
+ Version: 1.2.79
4
4
  Summary: Official Python SDK for Simplex API
5
5
  Home-page: https://simplex.sh
6
6
  Author: Simplex Labs, Inc.
@@ -19,16 +19,6 @@ Requires-Dist: python-dotenv
19
19
  Requires-Dist: click
20
20
  Provides-Extra: playwright
21
21
  Requires-Dist: rebrowser-playwright>=1.0.0; extra == "playwright"
22
- Dynamic: author
23
- Dynamic: author-email
24
- Dynamic: classifier
25
- Dynamic: description
26
- Dynamic: description-content-type
27
- Dynamic: home-page
28
- Dynamic: provides-extra
29
- Dynamic: requires-dist
30
- Dynamic: requires-python
31
- Dynamic: summary
32
22
 
33
23
  # Simplex AI Python SDK
34
24
 
@@ -0,0 +1,11 @@
1
+ simplex/__init__.py,sha256=GDLe-j8I1LGm6oWr-4pZtUpatdH3aGAqiUYH42p0CXA,97
2
+ simplex/cli.py,sha256=0K_pzoVdF7vfTJPUONhFzzTvjZk2M7FZPpEONjZWJC8,2268
3
+ simplex/simplex.py,sha256=LugwirZm1IWSL22uptE5dgATf90EnmkCzvrgalYj8sk,40501
4
+ simplex/deploy/__init__.py,sha256=_JQ81F_Nu7hSAfMA691gzs6a4-8oZ-buJ9h3Au12BKw,96
5
+ simplex/deploy/push.py,sha256=hRAbtFZaECKnBljaOLQ5nzJ6hk7tZgc1c7QdgxKQFoY,6123
6
+ simplex-1.2.79.dist-info/LICENSE,sha256=Xh0SJjYZfNI71pCNMB40aKlBLLuOB0blx5xkTtufFNQ,1075
7
+ simplex-1.2.79.dist-info/METADATA,sha256=h2d-E6WbWseXS3J-d681LjTRTMgH2qEWUrKzfdE92ds,834
8
+ simplex-1.2.79.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
9
+ simplex-1.2.79.dist-info/entry_points.txt,sha256=3veL2w3c5vxb3dm8I_M8Fs-370n1ZnvD8uu1nSsL7z8,45
10
+ simplex-1.2.79.dist-info/top_level.txt,sha256=cbMH1bYpN0A3gP-ecibPRHasHoqB-01T_2BUFS8p0CE,8
11
+ simplex-1.2.79.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.8.0)
2
+ Generator: setuptools (75.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,11 +0,0 @@
1
- simplex/__init__.py,sha256=L_5i__xt_ZDkr6e-Wx9cr84t9sXpioOT7j01NJYJCTE,75
2
- simplex/cli.py,sha256=0K_pzoVdF7vfTJPUONhFzzTvjZk2M7FZPpEONjZWJC8,2268
3
- simplex/simplex.py,sha256=NsSGeR_bmqpl60aVvak0LoBJMyzySCEvstFXjS4vTS0,39767
4
- simplex/deploy/__init__.py,sha256=_JQ81F_Nu7hSAfMA691gzs6a4-8oZ-buJ9h3Au12BKw,96
5
- simplex/deploy/push.py,sha256=hRAbtFZaECKnBljaOLQ5nzJ6hk7tZgc1c7QdgxKQFoY,6123
6
- simplex-1.2.76.dist-info/LICENSE,sha256=Xh0SJjYZfNI71pCNMB40aKlBLLuOB0blx5xkTtufFNQ,1075
7
- simplex-1.2.76.dist-info/METADATA,sha256=I20rjBbj_P7lioJ4ijblp0j2V3BMJKVDuWl-P2ZfC3E,1055
8
- simplex-1.2.76.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
9
- simplex-1.2.76.dist-info/entry_points.txt,sha256=3veL2w3c5vxb3dm8I_M8Fs-370n1ZnvD8uu1nSsL7z8,45
10
- simplex-1.2.76.dist-info/top_level.txt,sha256=cbMH1bYpN0A3gP-ecibPRHasHoqB-01T_2BUFS8p0CE,8
11
- simplex-1.2.76.dist-info/RECORD,,