lambda-playwright 0.1.0__tar.gz → 0.1.2__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.
- lambda_playwright-0.1.2/PKG-INFO +77 -0
- {lambda_playwright-0.1.0 → lambda_playwright-0.1.2}/README.md +4 -6
- lambda_playwright-0.1.2/lambda_playwright.egg-info/PKG-INFO +77 -0
- {lambda_playwright-0.1.0 → lambda_playwright-0.1.2}/setup.py +7 -1
- lambda_playwright-0.1.0/PKG-INFO +0 -12
- lambda_playwright-0.1.0/lambda_playwright.egg-info/PKG-INFO +0 -12
- {lambda_playwright-0.1.0 → lambda_playwright-0.1.2}/lambda_playwright/__init__.py +0 -0
- {lambda_playwright-0.1.0 → lambda_playwright-0.1.2}/lambda_playwright/client.py +0 -0
- {lambda_playwright-0.1.0 → lambda_playwright-0.1.2}/lambda_playwright/types.py +0 -0
- {lambda_playwright-0.1.0 → lambda_playwright-0.1.2}/lambda_playwright.egg-info/SOURCES.txt +0 -0
- {lambda_playwright-0.1.0 → lambda_playwright-0.1.2}/lambda_playwright.egg-info/dependency_links.txt +0 -0
- {lambda_playwright-0.1.0 → lambda_playwright-0.1.2}/lambda_playwright.egg-info/requires.txt +0 -0
- {lambda_playwright-0.1.0 → lambda_playwright-0.1.2}/lambda_playwright.egg-info/top_level.txt +0 -0
- {lambda_playwright-0.1.0 → lambda_playwright-0.1.2}/setup.cfg +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
|
+
```
|
|
@@ -21,9 +21,9 @@ client = LambdaPlaywright()
|
|
|
21
21
|
# Or explicitly
|
|
22
22
|
client = LambdaPlaywright(
|
|
23
23
|
function_url="https://your-function-url.lambda-url.ap-southeast-1.on.aws",
|
|
24
|
-
access_key_id="
|
|
25
|
-
secret_access_key="
|
|
26
|
-
region="ap-southeast-
|
|
24
|
+
access_key_id="your-access-key-id",
|
|
25
|
+
secret_access_key="your-secret-access-key",
|
|
26
|
+
region="ap-southeast-2"
|
|
27
27
|
)
|
|
28
28
|
```
|
|
29
29
|
|
|
@@ -33,10 +33,8 @@ client = LambdaPlaywright(
|
|
|
33
33
|
response = client.visit({
|
|
34
34
|
"url": "https://example.com",
|
|
35
35
|
"actions": [
|
|
36
|
-
{"type": "
|
|
37
|
-
{"type": "wait_for_selector", "selector": ".results"}
|
|
36
|
+
{"type": "wait_for_selector", "selector": "a"}
|
|
38
37
|
],
|
|
39
|
-
"wait_for_network_idle": True
|
|
40
38
|
})
|
|
41
39
|
|
|
42
40
|
print(response["html"])
|
|
@@ -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,9 +1,15 @@
|
|
|
1
|
+
from pathlib import Path
|
|
1
2
|
from setuptools import setup, find_packages
|
|
2
3
|
|
|
4
|
+
this_directory = Path(__file__).parent
|
|
5
|
+
long_description = (this_directory / "README.md").read_text()
|
|
6
|
+
|
|
3
7
|
setup(
|
|
4
8
|
name="lambda_playwright",
|
|
5
|
-
version="0.1.
|
|
9
|
+
version="0.1.2",
|
|
6
10
|
description="SDK for invoking Lambda Playwright service",
|
|
11
|
+
long_description=long_description,
|
|
12
|
+
long_description_content_type="text/markdown",
|
|
7
13
|
author="Hubexo",
|
|
8
14
|
packages=find_packages(),
|
|
9
15
|
install_requires=[
|
lambda_playwright-0.1.0/PKG-INFO
DELETED
|
@@ -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
|
|
@@ -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
|
|
File without changes
|
|
File without changes
|
{lambda_playwright-0.1.0 → lambda_playwright-0.1.2}/lambda_playwright.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
{lambda_playwright-0.1.0 → lambda_playwright-0.1.2}/lambda_playwright.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|