lambda-playwright 0.1.0__py3-none-any.whl → 0.1.2__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.
- lambda_playwright-0.1.2.dist-info/METADATA +77 -0
- {lambda_playwright-0.1.0.dist-info → lambda_playwright-0.1.2.dist-info}/RECORD +4 -4
- lambda_playwright-0.1.0.dist-info/METADATA +0 -12
- {lambda_playwright-0.1.0.dist-info → lambda_playwright-0.1.2.dist-info}/WHEEL +0 -0
- {lambda_playwright-0.1.0.dist-info → lambda_playwright-0.1.2.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: lambda_playwright
|
|
3
|
+
Version: 0.1.2
|
|
4
|
+
Summary: SDK for invoking Lambda Playwright service
|
|
5
|
+
Author: Hubexo
|
|
6
|
+
Requires-Python: >=3.8
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
Requires-Dist: requests>=2.25.0
|
|
9
|
+
Requires-Dist: requests-aws4auth>=1.1.0
|
|
10
|
+
Dynamic: author
|
|
11
|
+
Dynamic: description
|
|
12
|
+
Dynamic: description-content-type
|
|
13
|
+
Dynamic: requires-dist
|
|
14
|
+
Dynamic: requires-python
|
|
15
|
+
Dynamic: summary
|
|
16
|
+
|
|
17
|
+
# Lambda Playwright SDK
|
|
18
|
+
|
|
19
|
+
A Python SDK for interacting with the Lambda Playwright service.
|
|
20
|
+
|
|
21
|
+
## Installation
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
pip install lambda-playwright
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Usage
|
|
28
|
+
|
|
29
|
+
### Initialization
|
|
30
|
+
|
|
31
|
+
```python
|
|
32
|
+
from lambda_playwright import LambdaPlaywright
|
|
33
|
+
|
|
34
|
+
# Initialize with environment variables (AWS_PLAYWRIGHT_FUNCTION_URL, AWS_PLAYWRIGHT_ACCESS_KEY, AWS_PLAYWRIGHT_SECRET_ACCESS)
|
|
35
|
+
client = LambdaPlaywright()
|
|
36
|
+
|
|
37
|
+
# Or explicitly
|
|
38
|
+
client = LambdaPlaywright(
|
|
39
|
+
function_url="https://your-function-url.lambda-url.ap-southeast-1.on.aws",
|
|
40
|
+
access_key_id="your-access-key-id",
|
|
41
|
+
secret_access_key="your-secret-access-key",
|
|
42
|
+
region="ap-southeast-2"
|
|
43
|
+
)
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Visit a Page
|
|
47
|
+
|
|
48
|
+
```python
|
|
49
|
+
response = client.visit({
|
|
50
|
+
"url": "https://example.com",
|
|
51
|
+
"actions": [
|
|
52
|
+
{"type": "wait_for_selector", "selector": "a"}
|
|
53
|
+
],
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
print(response["html"])
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Render HTML
|
|
60
|
+
|
|
61
|
+
```python
|
|
62
|
+
response = client.render_html({
|
|
63
|
+
"html_content": "<h1>Hello World</h1><script>document.write('Loaded');</script>",
|
|
64
|
+
"actions": [],
|
|
65
|
+
"scroll_to_bottom": True
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
print(response["html"])
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Development
|
|
72
|
+
|
|
73
|
+
To run locally against a local Lambda container:
|
|
74
|
+
|
|
75
|
+
```python
|
|
76
|
+
client = LambdaPlaywright(debug=True)
|
|
77
|
+
```
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
lambda_playwright/__init__.py,sha256=wM-jJdR5xKphtiKLfXhKzkk0Njp2GBZRcD5DjfJyajg,236
|
|
2
2
|
lambda_playwright/client.py,sha256=uXDtzeV_x81H3vvkB1xt-QLJ_biolVYl9sobfMdVoGw,5331
|
|
3
3
|
lambda_playwright/types.py,sha256=FA8GZTgE01-eq0mVRHPjDIlTkcol61PB1-W-QTUssbo,1198
|
|
4
|
-
lambda_playwright-0.1.
|
|
5
|
-
lambda_playwright-0.1.
|
|
6
|
-
lambda_playwright-0.1.
|
|
7
|
-
lambda_playwright-0.1.
|
|
4
|
+
lambda_playwright-0.1.2.dist-info/METADATA,sha256=sxVUrlLo9ke27KKrkvGY6oVjMziKA-ZVWMbqspoemgI,1584
|
|
5
|
+
lambda_playwright-0.1.2.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
6
|
+
lambda_playwright-0.1.2.dist-info/top_level.txt,sha256=80BqofT54Wl3SPgeA9kUVxj4yytBtZ3qLsPt5svzK7w,18
|
|
7
|
+
lambda_playwright-0.1.2.dist-info/RECORD,,
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: lambda_playwright
|
|
3
|
-
Version: 0.1.0
|
|
4
|
-
Summary: SDK for invoking Lambda Playwright service
|
|
5
|
-
Author: Hubexo
|
|
6
|
-
Requires-Python: >=3.8
|
|
7
|
-
Requires-Dist: requests>=2.25.0
|
|
8
|
-
Requires-Dist: requests-aws4auth>=1.1.0
|
|
9
|
-
Dynamic: author
|
|
10
|
-
Dynamic: requires-dist
|
|
11
|
-
Dynamic: requires-python
|
|
12
|
-
Dynamic: summary
|
|
File without changes
|
|
File without changes
|