simplex 1.2.41__py3-none-any.whl → 1.2.42__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/cli.py +2 -3
- simplex/simplex.py +11 -2
- {simplex-1.2.41.dist-info → simplex-1.2.42.dist-info}/METADATA +11 -2
- simplex-1.2.42.dist-info/RECORD +11 -0
- {simplex-1.2.41.dist-info → simplex-1.2.42.dist-info}/WHEEL +1 -1
- simplex-1.2.41.dist-info/RECORD +0 -11
- {simplex-1.2.41.dist-info → simplex-1.2.42.dist-info}/LICENSE +0 -0
- {simplex-1.2.41.dist-info → simplex-1.2.42.dist-info}/entry_points.txt +0 -0
- {simplex-1.2.41.dist-info → simplex-1.2.42.dist-info}/top_level.txt +0 -0
simplex/cli.py
CHANGED
|
@@ -47,9 +47,8 @@ def run(directory):
|
|
|
47
47
|
|
|
48
48
|
@cli.command()
|
|
49
49
|
@click.argument('website')
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
"""Capture login session for a website"""
|
|
50
|
+
def login(website):
|
|
51
|
+
"""Capture login session for a website. See https://simplex.sh/docs/getting-started for more information."""
|
|
53
52
|
try:
|
|
54
53
|
# Initialize Simplex with API key from environment
|
|
55
54
|
api_key = os.getenv("SIMPLEX_API_KEY")
|
simplex/simplex.py
CHANGED
|
@@ -59,10 +59,15 @@ class Simplex:
|
|
|
59
59
|
self.api_key = api_key
|
|
60
60
|
self.session_id = None
|
|
61
61
|
atexit.register(self.close_session)
|
|
62
|
-
|
|
63
62
|
self.playwright = Playwright(self)
|
|
64
|
-
|
|
63
|
+
self.pw_browser = None
|
|
64
|
+
self.pw = None
|
|
65
|
+
|
|
65
66
|
def close_session(self):
|
|
67
|
+
if self.pw_browser:
|
|
68
|
+
self.pw_browser.close()
|
|
69
|
+
if self.pw:
|
|
70
|
+
self.pw.stop()
|
|
66
71
|
if not self.session_id:
|
|
67
72
|
return
|
|
68
73
|
response = requests.post(
|
|
@@ -119,6 +124,10 @@ class Simplex:
|
|
|
119
124
|
raise ValueError(f"It looks like the session wasn't created successfully. Did you set your api_key when creating the Simplex class?")
|
|
120
125
|
self.session_id = response_json['session_id']
|
|
121
126
|
livestream_url = response_json['livestream_url']
|
|
127
|
+
|
|
128
|
+
# Start Playwright without using context manager
|
|
129
|
+
self.pw = sync_playwright().start()
|
|
130
|
+
self.pw_browser = self.pw.chromium.connect_over_cdp(response_json['connect_url'])
|
|
122
131
|
|
|
123
132
|
if show_in_console:
|
|
124
133
|
print(f"Livestream URL: {livestream_url}")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: simplex
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.42
|
|
4
4
|
Summary: Official Python SDK for Simplex API
|
|
5
5
|
Home-page: https://simplex.sh
|
|
6
6
|
Author: Simplex Labs, Inc.
|
|
@@ -18,6 +18,15 @@ Requires-Dist: requests
|
|
|
18
18
|
Requires-Dist: python-dotenv
|
|
19
19
|
Requires-Dist: click
|
|
20
20
|
Requires-Dist: playwright
|
|
21
|
+
Dynamic: author
|
|
22
|
+
Dynamic: author-email
|
|
23
|
+
Dynamic: classifier
|
|
24
|
+
Dynamic: description
|
|
25
|
+
Dynamic: description-content-type
|
|
26
|
+
Dynamic: home-page
|
|
27
|
+
Dynamic: requires-dist
|
|
28
|
+
Dynamic: requires-python
|
|
29
|
+
Dynamic: summary
|
|
21
30
|
|
|
22
31
|
# Simplex AI Python SDK
|
|
23
32
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
simplex/__init__.py,sha256=L_5i__xt_ZDkr6e-Wx9cr84t9sXpioOT7j01NJYJCTE,75
|
|
2
|
+
simplex/cli.py,sha256=0K_pzoVdF7vfTJPUONhFzzTvjZk2M7FZPpEONjZWJC8,2268
|
|
3
|
+
simplex/simplex.py,sha256=qJPzXzsRsAnIGUcri45Qqb_fOjS9e4KTX32V3ac158g,23130
|
|
4
|
+
simplex/deploy/__init__.py,sha256=_JQ81F_Nu7hSAfMA691gzs6a4-8oZ-buJ9h3Au12BKw,96
|
|
5
|
+
simplex/deploy/push.py,sha256=hRAbtFZaECKnBljaOLQ5nzJ6hk7tZgc1c7QdgxKQFoY,6123
|
|
6
|
+
simplex-1.2.42.dist-info/LICENSE,sha256=Xh0SJjYZfNI71pCNMB40aKlBLLuOB0blx5xkTtufFNQ,1075
|
|
7
|
+
simplex-1.2.42.dist-info/METADATA,sha256=v8X8x7EjupQqB2fHnU8X09ZN5LjsguQNMvfZ_LKT2CI,964
|
|
8
|
+
simplex-1.2.42.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
9
|
+
simplex-1.2.42.dist-info/entry_points.txt,sha256=3veL2w3c5vxb3dm8I_M8Fs-370n1ZnvD8uu1nSsL7z8,45
|
|
10
|
+
simplex-1.2.42.dist-info/top_level.txt,sha256=cbMH1bYpN0A3gP-ecibPRHasHoqB-01T_2BUFS8p0CE,8
|
|
11
|
+
simplex-1.2.42.dist-info/RECORD,,
|
simplex-1.2.41.dist-info/RECORD
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
simplex/__init__.py,sha256=L_5i__xt_ZDkr6e-Wx9cr84t9sXpioOT7j01NJYJCTE,75
|
|
2
|
-
simplex/cli.py,sha256=FcnZtxstZQS8bOshgT_RBSbEfCY2UkDU7FGBLZNmwAY,2307
|
|
3
|
-
simplex/simplex.py,sha256=NHFOokIA7GYmbJ0J-Ul-qf3aVM3xa5frQN-9MV9GoYw,22758
|
|
4
|
-
simplex/deploy/__init__.py,sha256=_JQ81F_Nu7hSAfMA691gzs6a4-8oZ-buJ9h3Au12BKw,96
|
|
5
|
-
simplex/deploy/push.py,sha256=hRAbtFZaECKnBljaOLQ5nzJ6hk7tZgc1c7QdgxKQFoY,6123
|
|
6
|
-
simplex-1.2.41.dist-info/LICENSE,sha256=Xh0SJjYZfNI71pCNMB40aKlBLLuOB0blx5xkTtufFNQ,1075
|
|
7
|
-
simplex-1.2.41.dist-info/METADATA,sha256=Tt9Pd3kbyxQO0JjMLtzrNIv6i47YolrqvT-lKKioZBI,767
|
|
8
|
-
simplex-1.2.41.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
9
|
-
simplex-1.2.41.dist-info/entry_points.txt,sha256=3veL2w3c5vxb3dm8I_M8Fs-370n1ZnvD8uu1nSsL7z8,45
|
|
10
|
-
simplex-1.2.41.dist-info/top_level.txt,sha256=cbMH1bYpN0A3gP-ecibPRHasHoqB-01T_2BUFS8p0CE,8
|
|
11
|
-
simplex-1.2.41.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|