grasp-sdk 0.1.4__tar.gz → 0.1.5__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 grasp-sdk might be problematic. Click here for more details.
- {grasp_sdk-0.1.4/grasp_sdk.egg-info → grasp_sdk-0.1.5}/PKG-INFO +21 -3
- {grasp_sdk-0.1.4 → grasp_sdk-0.1.5}/README.md +20 -2
- {grasp_sdk-0.1.4 → grasp_sdk-0.1.5}/grasp_sdk/__init__.py +1 -1
- {grasp_sdk-0.1.4 → grasp_sdk-0.1.5}/grasp_sdk/sandbox/chrome-stable.mjs +43 -17
- {grasp_sdk-0.1.4 → grasp_sdk-0.1.5}/grasp_sdk/sandbox/chromium.mjs +19 -17
- {grasp_sdk-0.1.4 → grasp_sdk-0.1.5/grasp_sdk.egg-info}/PKG-INFO +21 -3
- {grasp_sdk-0.1.4 → grasp_sdk-0.1.5}/pyproject.toml +1 -1
- {grasp_sdk-0.1.4 → grasp_sdk-0.1.5}/MANIFEST.in +0 -0
- {grasp_sdk-0.1.4 → grasp_sdk-0.1.5}/build_and_publish.py +0 -0
- {grasp_sdk-0.1.4 → grasp_sdk-0.1.5}/example_usage.py +0 -0
- {grasp_sdk-0.1.4 → grasp_sdk-0.1.5}/grasp_sdk/models/__init__.py +0 -0
- {grasp_sdk-0.1.4 → grasp_sdk-0.1.5}/grasp_sdk/services/__init__.py +0 -0
- {grasp_sdk-0.1.4 → grasp_sdk-0.1.5}/grasp_sdk/services/browser.py +0 -0
- {grasp_sdk-0.1.4 → grasp_sdk-0.1.5}/grasp_sdk/services/sandbox.py +0 -0
- {grasp_sdk-0.1.4 → grasp_sdk-0.1.5}/grasp_sdk/utils/__init__.py +0 -0
- {grasp_sdk-0.1.4 → grasp_sdk-0.1.5}/grasp_sdk/utils/auth.py +0 -0
- {grasp_sdk-0.1.4 → grasp_sdk-0.1.5}/grasp_sdk/utils/config.py +0 -0
- {grasp_sdk-0.1.4 → grasp_sdk-0.1.5}/grasp_sdk/utils/logger.py +0 -0
- {grasp_sdk-0.1.4 → grasp_sdk-0.1.5}/grasp_sdk.egg-info/SOURCES.txt +0 -0
- {grasp_sdk-0.1.4 → grasp_sdk-0.1.5}/grasp_sdk.egg-info/dependency_links.txt +0 -0
- {grasp_sdk-0.1.4 → grasp_sdk-0.1.5}/grasp_sdk.egg-info/entry_points.txt +0 -0
- {grasp_sdk-0.1.4 → grasp_sdk-0.1.5}/grasp_sdk.egg-info/not-zip-safe +0 -0
- {grasp_sdk-0.1.4 → grasp_sdk-0.1.5}/grasp_sdk.egg-info/requires.txt +0 -0
- {grasp_sdk-0.1.4 → grasp_sdk-0.1.5}/grasp_sdk.egg-info/top_level.txt +0 -0
- {grasp_sdk-0.1.4 → grasp_sdk-0.1.5}/py.typed +0 -0
- {grasp_sdk-0.1.4 → grasp_sdk-0.1.5}/requirements.txt +0 -0
- {grasp_sdk-0.1.4 → grasp_sdk-0.1.5}/setup.cfg +0 -0
- {grasp_sdk-0.1.4 → grasp_sdk-0.1.5}/setup.py +0 -0
- {grasp_sdk-0.1.4 → grasp_sdk-0.1.5}/test_install.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: grasp_sdk
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.5
|
|
4
4
|
Summary: Python SDK for Grasp E2B - Browser automation and sandbox management
|
|
5
5
|
Home-page: https://github.com/grasp-team/grasp-e2b
|
|
6
6
|
Author: Grasp Team
|
|
@@ -47,8 +47,14 @@ Dynamic: requires-python
|
|
|
47
47
|
|
|
48
48
|
# Grasp SDK - Python Implementation
|
|
49
49
|
|
|
50
|
+
[](https://badge.fury.io/py/grasp-sdk)
|
|
51
|
+
[](https://www.python.org/downloads/)
|
|
52
|
+
[](https://opensource.org/licenses/MIT)
|
|
53
|
+
|
|
50
54
|
🐍 Python implementation of Grasp SDK for E2B platform providing secure command execution and browser automation in isolated cloud environments.
|
|
51
55
|
|
|
56
|
+
**Current Version: 0.1.4** - [View on PyPI](https://pypi.org/project/grasp-sdk/0.1.4/)
|
|
57
|
+
|
|
52
58
|
## 🚀 Features
|
|
53
59
|
|
|
54
60
|
- **Secure Execution**: Run commands and scripts in isolated E2B sandboxes
|
|
@@ -61,8 +67,8 @@ Dynamic: requires-python
|
|
|
61
67
|
## 📦 Installation
|
|
62
68
|
|
|
63
69
|
```bash
|
|
64
|
-
# Install from PyPI
|
|
65
|
-
pip install
|
|
70
|
+
# Install from PyPI
|
|
71
|
+
pip install grasp_sdk
|
|
66
72
|
|
|
67
73
|
# Install from source
|
|
68
74
|
pip install -e .
|
|
@@ -300,6 +306,18 @@ This Python implementation provides the same API surface as the Node.js/TypeScri
|
|
|
300
306
|
|
|
301
307
|
MIT License - see the [LICENSE](../LICENSE) file for details.
|
|
302
308
|
|
|
309
|
+
## 📋 Release History
|
|
310
|
+
|
|
311
|
+
### v0.1.4 (2025-01-27)
|
|
312
|
+
- Version synchronization update
|
|
313
|
+
- Package metadata improvements
|
|
314
|
+
- Documentation updates
|
|
315
|
+
|
|
316
|
+
### v0.1.0 (2025-01-27)
|
|
317
|
+
- Initial release
|
|
318
|
+
- Core functionality implementation
|
|
319
|
+
- Complete API compatibility with Node.js version
|
|
320
|
+
|
|
303
321
|
## 🔗 Related
|
|
304
322
|
|
|
305
323
|
- [Node.js/TypeScript Implementation](../src/)
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
# Grasp SDK - Python Implementation
|
|
2
2
|
|
|
3
|
+
[](https://badge.fury.io/py/grasp-sdk)
|
|
4
|
+
[](https://www.python.org/downloads/)
|
|
5
|
+
[](https://opensource.org/licenses/MIT)
|
|
6
|
+
|
|
3
7
|
🐍 Python implementation of Grasp SDK for E2B platform providing secure command execution and browser automation in isolated cloud environments.
|
|
4
8
|
|
|
9
|
+
**Current Version: 0.1.4** - [View on PyPI](https://pypi.org/project/grasp-sdk/0.1.4/)
|
|
10
|
+
|
|
5
11
|
## 🚀 Features
|
|
6
12
|
|
|
7
13
|
- **Secure Execution**: Run commands and scripts in isolated E2B sandboxes
|
|
@@ -14,8 +20,8 @@
|
|
|
14
20
|
## 📦 Installation
|
|
15
21
|
|
|
16
22
|
```bash
|
|
17
|
-
# Install from PyPI
|
|
18
|
-
pip install
|
|
23
|
+
# Install from PyPI
|
|
24
|
+
pip install grasp_sdk
|
|
19
25
|
|
|
20
26
|
# Install from source
|
|
21
27
|
pip install -e .
|
|
@@ -253,6 +259,18 @@ This Python implementation provides the same API surface as the Node.js/TypeScri
|
|
|
253
259
|
|
|
254
260
|
MIT License - see the [LICENSE](../LICENSE) file for details.
|
|
255
261
|
|
|
262
|
+
## 📋 Release History
|
|
263
|
+
|
|
264
|
+
### v0.1.4 (2025-01-27)
|
|
265
|
+
- Version synchronization update
|
|
266
|
+
- Package metadata improvements
|
|
267
|
+
- Documentation updates
|
|
268
|
+
|
|
269
|
+
### v0.1.0 (2025-01-27)
|
|
270
|
+
- Initial release
|
|
271
|
+
- Core functionality implementation
|
|
272
|
+
- Complete API compatibility with Node.js version
|
|
273
|
+
|
|
256
274
|
## 🔗 Related
|
|
257
275
|
|
|
258
276
|
- [Node.js/TypeScript Implementation](../src/)
|
|
@@ -109,12 +109,37 @@ try {
|
|
|
109
109
|
|
|
110
110
|
args.push(
|
|
111
111
|
'--no-sandbox',
|
|
112
|
+
'--disable-setuid-sandbox',
|
|
112
113
|
'--disable-dev-shm-usage',
|
|
113
114
|
'--disable-gpu',
|
|
114
115
|
'--disable-software-rasterizer',
|
|
115
116
|
'--user-data-dir=/home/user/.browser-context'
|
|
116
117
|
);
|
|
117
118
|
|
|
119
|
+
args.push(
|
|
120
|
+
// 避免缓存积累影响性能
|
|
121
|
+
'--disable-application-cache',
|
|
122
|
+
|
|
123
|
+
// 关闭所有硬件加速特性,防止 GPU 相关崩溃
|
|
124
|
+
'--disable-accelerated-2d-canvas',
|
|
125
|
+
'--disable-accelerated-video-decode',
|
|
126
|
+
|
|
127
|
+
// 禁用后台渲染,减少无关资源消耗
|
|
128
|
+
'--disable-background-timer-throttling',
|
|
129
|
+
'--disable-backgrounding-occluded-windows',
|
|
130
|
+
'--disable-renderer-backgrounding',
|
|
131
|
+
|
|
132
|
+
// 避免过度日志影响性能
|
|
133
|
+
'--disable-logging',
|
|
134
|
+
|
|
135
|
+
// 禁用不必要的多媒体解码
|
|
136
|
+
'--mute-audio',
|
|
137
|
+
|
|
138
|
+
// 避免崩溃时弹窗
|
|
139
|
+
'--no-default-browser-check',
|
|
140
|
+
'--no-first-run',
|
|
141
|
+
);
|
|
142
|
+
|
|
118
143
|
if(headless) {
|
|
119
144
|
args.push('--headless=new');
|
|
120
145
|
}
|
|
@@ -201,6 +226,24 @@ try {
|
|
|
201
226
|
level: 'info',
|
|
202
227
|
data: { sandboxId }
|
|
203
228
|
});
|
|
229
|
+
|
|
230
|
+
const closeId = wsId;
|
|
231
|
+
proxy.once('close', async (req, socket, head) => {
|
|
232
|
+
console.log('🔒 CDP WebSocket connection closed');
|
|
233
|
+
await logger.info('CDP WebSocket connection closed', { sandboxId });
|
|
234
|
+
Sentry.addBreadcrumb({
|
|
235
|
+
category: 'websocket',
|
|
236
|
+
message: 'CDP connection closed',
|
|
237
|
+
level: 'info',
|
|
238
|
+
data: { sandboxId }
|
|
239
|
+
});
|
|
240
|
+
setTimeout(() => {
|
|
241
|
+
if(wsId === closeId) {
|
|
242
|
+
console.log('❌ Force closed...', wsId);
|
|
243
|
+
process.exit(0);
|
|
244
|
+
}
|
|
245
|
+
}, keepAliveMS);
|
|
246
|
+
});
|
|
204
247
|
});
|
|
205
248
|
|
|
206
249
|
proxy.on('proxyReqWs', (proxyReq, req, socket, options, head) => {
|
|
@@ -222,23 +265,6 @@ try {
|
|
|
222
265
|
extra: { url: req?.url }
|
|
223
266
|
});
|
|
224
267
|
});
|
|
225
|
-
|
|
226
|
-
proxy.on('close', async (req, socket, head) => {
|
|
227
|
-
console.log('🔒 CDP WebSocket connection closed');
|
|
228
|
-
await logger.info('CDP WebSocket connection closed', { sandboxId });
|
|
229
|
-
Sentry.addBreadcrumb({
|
|
230
|
-
category: 'websocket',
|
|
231
|
-
message: 'CDP connection closed',
|
|
232
|
-
level: 'info',
|
|
233
|
-
data: { sandboxId }
|
|
234
|
-
});
|
|
235
|
-
const closeId = wsId;
|
|
236
|
-
setTimeout(() => {
|
|
237
|
-
if(wsId === closeId) {
|
|
238
|
-
process.exit(0);
|
|
239
|
-
}
|
|
240
|
-
}, keepAliveMS);
|
|
241
|
-
});
|
|
242
268
|
|
|
243
269
|
const server = http.createServer(async (req, res) => {
|
|
244
270
|
if (req.url === '/health') {
|
|
@@ -123,6 +123,7 @@ try {
|
|
|
123
123
|
'--disable-background-timer-throttling',
|
|
124
124
|
'--disable-backgrounding-occluded-windows',
|
|
125
125
|
'--disable-renderer-backgrounding',
|
|
126
|
+
"--disable-software-rasterizer",
|
|
126
127
|
...JSON.parse(process.env.BROWSER_ARGS),
|
|
127
128
|
);
|
|
128
129
|
|
|
@@ -196,6 +197,24 @@ try {
|
|
|
196
197
|
level: 'info',
|
|
197
198
|
data: { sandboxId }
|
|
198
199
|
});
|
|
200
|
+
|
|
201
|
+
const closeId = wsId;
|
|
202
|
+
proxy.once('close', async (req, socket, head) => {
|
|
203
|
+
console.log('🔒 CDP WebSocket connection closed');
|
|
204
|
+
await logger.info('CDP WebSocket connection closed', { sandboxId });
|
|
205
|
+
Sentry.addBreadcrumb({
|
|
206
|
+
category: 'websocket',
|
|
207
|
+
message: 'CDP connection closed',
|
|
208
|
+
level: 'info',
|
|
209
|
+
data: { sandboxId }
|
|
210
|
+
});
|
|
211
|
+
setTimeout(() => {
|
|
212
|
+
if(wsId === closeId) {
|
|
213
|
+
console.log('❌ Force closed...', wsId);
|
|
214
|
+
process.exit(0);
|
|
215
|
+
}
|
|
216
|
+
}, keepAliveMS);
|
|
217
|
+
});
|
|
199
218
|
});
|
|
200
219
|
|
|
201
220
|
proxy.on('proxyReqWs', (proxyReq, req, socket, options, head) => {
|
|
@@ -217,23 +236,6 @@ try {
|
|
|
217
236
|
extra: { url: req?.url }
|
|
218
237
|
});
|
|
219
238
|
});
|
|
220
|
-
|
|
221
|
-
proxy.on('close', async (req, socket, head) => {
|
|
222
|
-
console.log('🔒 CDP WebSocket connection closed');
|
|
223
|
-
await logger.info('CDP WebSocket connection closed', { sandboxId });
|
|
224
|
-
Sentry.addBreadcrumb({
|
|
225
|
-
category: 'websocket',
|
|
226
|
-
message: 'CDP connection closed',
|
|
227
|
-
level: 'info',
|
|
228
|
-
data: { sandboxId }
|
|
229
|
-
});
|
|
230
|
-
const closeId = wsId;
|
|
231
|
-
setTimeout(() => {
|
|
232
|
-
if(wsId === closeId) {
|
|
233
|
-
process.exit(0);
|
|
234
|
-
}
|
|
235
|
-
}, keepAliveMS);
|
|
236
|
-
});
|
|
237
239
|
|
|
238
240
|
const server = http.createServer(async (req, res) => {
|
|
239
241
|
if (req.url === '/health') {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: grasp_sdk
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.5
|
|
4
4
|
Summary: Python SDK for Grasp E2B - Browser automation and sandbox management
|
|
5
5
|
Home-page: https://github.com/grasp-team/grasp-e2b
|
|
6
6
|
Author: Grasp Team
|
|
@@ -47,8 +47,14 @@ Dynamic: requires-python
|
|
|
47
47
|
|
|
48
48
|
# Grasp SDK - Python Implementation
|
|
49
49
|
|
|
50
|
+
[](https://badge.fury.io/py/grasp-sdk)
|
|
51
|
+
[](https://www.python.org/downloads/)
|
|
52
|
+
[](https://opensource.org/licenses/MIT)
|
|
53
|
+
|
|
50
54
|
🐍 Python implementation of Grasp SDK for E2B platform providing secure command execution and browser automation in isolated cloud environments.
|
|
51
55
|
|
|
56
|
+
**Current Version: 0.1.4** - [View on PyPI](https://pypi.org/project/grasp-sdk/0.1.4/)
|
|
57
|
+
|
|
52
58
|
## 🚀 Features
|
|
53
59
|
|
|
54
60
|
- **Secure Execution**: Run commands and scripts in isolated E2B sandboxes
|
|
@@ -61,8 +67,8 @@ Dynamic: requires-python
|
|
|
61
67
|
## 📦 Installation
|
|
62
68
|
|
|
63
69
|
```bash
|
|
64
|
-
# Install from PyPI
|
|
65
|
-
pip install
|
|
70
|
+
# Install from PyPI
|
|
71
|
+
pip install grasp_sdk
|
|
66
72
|
|
|
67
73
|
# Install from source
|
|
68
74
|
pip install -e .
|
|
@@ -300,6 +306,18 @@ This Python implementation provides the same API surface as the Node.js/TypeScri
|
|
|
300
306
|
|
|
301
307
|
MIT License - see the [LICENSE](../LICENSE) file for details.
|
|
302
308
|
|
|
309
|
+
## 📋 Release History
|
|
310
|
+
|
|
311
|
+
### v0.1.4 (2025-01-27)
|
|
312
|
+
- Version synchronization update
|
|
313
|
+
- Package metadata improvements
|
|
314
|
+
- Documentation updates
|
|
315
|
+
|
|
316
|
+
### v0.1.0 (2025-01-27)
|
|
317
|
+
- Initial release
|
|
318
|
+
- Core functionality implementation
|
|
319
|
+
- Complete API compatibility with Node.js version
|
|
320
|
+
|
|
303
321
|
## 🔗 Related
|
|
304
322
|
|
|
305
323
|
- [Node.js/TypeScript Implementation](../src/)
|
|
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
|
|
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
|