snaprender 0.7.3__tar.gz → 0.7.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.
@@ -0,0 +1,25 @@
1
+ node_modules/
2
+ dist/
3
+ .env
4
+ .env.local
5
+ .env.production
6
+ *.log
7
+ coverage/
8
+ .vscode/
9
+ .idea/
10
+ *.tsbuildinfo
11
+ .DS_Store
12
+ tmp/
13
+ backups/
14
+ site/.astro/
15
+ site/dist/
16
+ claude-instructions/
17
+ .mcpregistry_*
18
+ temp-promo-send.sh
19
+
20
+ # marketing skills context (contains internal metrics)
21
+ .agents/
22
+
23
+ # Local Claude Code settings may hold machine-specific commands; never commit them
24
+ .claude/settings.local.json*
25
+ .claude/*.bak
@@ -1,8 +1,25 @@
1
+ Metadata-Version: 2.1
2
+ Name: snaprender
3
+ Version: 0.7.5
4
+ Summary: Official Python SDK for SnapRender Screenshot API
5
+ Project-URL: Homepage, https://snap-render.com
6
+ Project-URL: Documentation, https://snap-render.com/docs
7
+ Project-URL: Repository, https://github.com/User0856/snaprender-integrations
8
+ Project-URL: Issues, https://github.com/User0856/snaprender-integrations/issues
9
+ License: MIT
10
+ License-File: LICENSE
11
+ Keywords: api,capture,screenshot,snaprender,webpage
12
+ Requires-Python: >=3.8
13
+ Requires-Dist: httpx>=0.24
14
+ Description-Content-Type: text/markdown
15
+
16
+ <a href="https://snap-render.com"><img src="https://snap-render.com/brand/snaprender-icon-128.png" alt="SnapRender" width="64" height="64"></a>
17
+
1
18
  # snaprender
2
19
 
3
20
  [![PyPI version](https://img.shields.io/pypi/v/snaprender)](https://pypi.org/project/snaprender/)
4
21
  [![PyPI downloads](https://img.shields.io/pypi/dm/snaprender)](https://pypi.org/project/snaprender/)
5
- [![license](https://img.shields.io/pypi/l/snaprender)](https://github.com/User0856/snaprender/blob/main/LICENSE)
22
+ [![license](https://img.shields.io/pypi/l/snaprender)](https://pypi.org/project/snaprender/)
6
23
 
7
24
  Official Python SDK for the [SnapRender](https://snap-render.com) Screenshot API. Capture pixel-perfect screenshots, extract page content, run batch jobs, and manage webhooks with a single library.
8
25
 
@@ -121,6 +138,7 @@ print(result["image"]) # data:image/png;base64,...
121
138
  | `width` | int | `1280` | Viewport width in pixels |
122
139
  | `height` | int | `800` | Viewport height in pixels |
123
140
  | `full_page` | bool | `False` | Capture the full scrollable page |
141
+ | `lazy_load` | bool | `False` | With `full_page`, scroll through the page first so lazy-loaded images appear (usually 1-5 s slower). Ignored unless `full_page` is true |
124
142
  | `quality` | int | `90` | JPEG/WebP quality (1-100) |
125
143
  | `delay` | int | `0` | Wait (ms) after page load before capture |
126
144
  | `dark_mode` | bool | `False` | Emulate dark color scheme |
@@ -162,6 +180,7 @@ print(result["expires_at"]) # ISO 8601 timestamp
162
180
  | `width` | int | `None` | Viewport width |
163
181
  | `height` | int | `None` | Viewport height |
164
182
  | `full_page` | bool | `None` | Full-page capture |
183
+ | `lazy_load` | bool | `None` | With `full_page`, load lazy images first |
165
184
  | `quality` | int | `None` | JPEG/WebP quality |
166
185
  | `delay` | int | `None` | Wait (ms) after load |
167
186
  | `dark_mode` | bool | `None` | Emulate dark mode |
@@ -239,12 +258,12 @@ job = snap.batch(
239
258
  width=1280,
240
259
  dark_mode=True,
241
260
  )
242
- print(job["job_id"]) # use this to poll status
261
+ print(job["jobId"]) # use this to poll status
243
262
  ```
244
263
 
245
264
  **Options**: same screenshot options as `capture()` (except `url`, `html`, `markdown`, `response_type`, `cache`, `cache_ttl`). These options apply to every URL in the batch.
246
265
 
247
- **Returns** `{ "job_id": str, "status": str, "total": int, ... }`
266
+ **Returns** `{ "jobId": str, "status": str, "statusUrl": str, "total": int, "completed": int, "failed": int, "items": list, ... }`
248
267
 
249
268
  ---
250
269
 
@@ -258,15 +277,18 @@ import time
258
277
  job = snap.batch(["https://example.com", "https://example.org"])
259
278
 
260
279
  while True:
261
- status = snap.get_batch_status(job["job_id"])
280
+ status = snap.get_batch_status(job["jobId"])
262
281
  print(f"{status['status']} - {status.get('completed', 0)}/{status['total']}")
263
282
  if status["status"] in ("completed", "failed"):
264
283
  break
265
284
  time.sleep(2)
266
285
 
267
286
  # Download results
268
- for result in status["results"]:
269
- print(result["url"], result["download_url"])
287
+ for item in status["items"]:
288
+ if item["status"] == "completed":
289
+ print(item["url"], item["downloadUrl"])
290
+ else:
291
+ print(item["url"], item.get("error"))
270
292
  ```
271
293
 
272
294
  ---
@@ -436,7 +458,6 @@ Common error codes: `INVALID_API_KEY`, `QUOTA_EXCEEDED`, `INVALID_URL`, `VALIDAT
436
458
  - [Pricing](https://snap-render.com/pricing)
437
459
  - [Dashboard](https://app.snap-render.com/dashboard)
438
460
  - [Blog](https://snap-render.com/blog)
439
- - [GitHub](https://github.com/User0856/snaprender)
440
461
 
441
462
  ## License
442
463
 
@@ -1,22 +1,10 @@
1
- Metadata-Version: 2.1
2
- Name: snaprender
3
- Version: 0.7.3
4
- Summary: Official Python SDK for SnapRender Screenshot API
5
- Project-URL: Homepage, https://snap-render.com
6
- Project-URL: Documentation, https://snap-render.com/docs
7
- Project-URL: Repository, https://github.com/User0856/snaprender
8
- License: MIT
9
- License-File: LICENSE
10
- Keywords: api,capture,screenshot,snaprender,webpage
11
- Requires-Python: >=3.8
12
- Requires-Dist: httpx>=0.24
13
- Description-Content-Type: text/markdown
1
+ <a href="https://snap-render.com"><img src="https://snap-render.com/brand/snaprender-icon-128.png" alt="SnapRender" width="64" height="64"></a>
14
2
 
15
3
  # snaprender
16
4
 
17
5
  [![PyPI version](https://img.shields.io/pypi/v/snaprender)](https://pypi.org/project/snaprender/)
18
6
  [![PyPI downloads](https://img.shields.io/pypi/dm/snaprender)](https://pypi.org/project/snaprender/)
19
- [![license](https://img.shields.io/pypi/l/snaprender)](https://github.com/User0856/snaprender/blob/main/LICENSE)
7
+ [![license](https://img.shields.io/pypi/l/snaprender)](https://pypi.org/project/snaprender/)
20
8
 
21
9
  Official Python SDK for the [SnapRender](https://snap-render.com) Screenshot API. Capture pixel-perfect screenshots, extract page content, run batch jobs, and manage webhooks with a single library.
22
10
 
@@ -135,6 +123,7 @@ print(result["image"]) # data:image/png;base64,...
135
123
  | `width` | int | `1280` | Viewport width in pixels |
136
124
  | `height` | int | `800` | Viewport height in pixels |
137
125
  | `full_page` | bool | `False` | Capture the full scrollable page |
126
+ | `lazy_load` | bool | `False` | With `full_page`, scroll through the page first so lazy-loaded images appear (usually 1-5 s slower). Ignored unless `full_page` is true |
138
127
  | `quality` | int | `90` | JPEG/WebP quality (1-100) |
139
128
  | `delay` | int | `0` | Wait (ms) after page load before capture |
140
129
  | `dark_mode` | bool | `False` | Emulate dark color scheme |
@@ -176,6 +165,7 @@ print(result["expires_at"]) # ISO 8601 timestamp
176
165
  | `width` | int | `None` | Viewport width |
177
166
  | `height` | int | `None` | Viewport height |
178
167
  | `full_page` | bool | `None` | Full-page capture |
168
+ | `lazy_load` | bool | `None` | With `full_page`, load lazy images first |
179
169
  | `quality` | int | `None` | JPEG/WebP quality |
180
170
  | `delay` | int | `None` | Wait (ms) after load |
181
171
  | `dark_mode` | bool | `None` | Emulate dark mode |
@@ -253,12 +243,12 @@ job = snap.batch(
253
243
  width=1280,
254
244
  dark_mode=True,
255
245
  )
256
- print(job["job_id"]) # use this to poll status
246
+ print(job["jobId"]) # use this to poll status
257
247
  ```
258
248
 
259
249
  **Options**: same screenshot options as `capture()` (except `url`, `html`, `markdown`, `response_type`, `cache`, `cache_ttl`). These options apply to every URL in the batch.
260
250
 
261
- **Returns** `{ "job_id": str, "status": str, "total": int, ... }`
251
+ **Returns** `{ "jobId": str, "status": str, "statusUrl": str, "total": int, "completed": int, "failed": int, "items": list, ... }`
262
252
 
263
253
  ---
264
254
 
@@ -272,15 +262,18 @@ import time
272
262
  job = snap.batch(["https://example.com", "https://example.org"])
273
263
 
274
264
  while True:
275
- status = snap.get_batch_status(job["job_id"])
265
+ status = snap.get_batch_status(job["jobId"])
276
266
  print(f"{status['status']} - {status.get('completed', 0)}/{status['total']}")
277
267
  if status["status"] in ("completed", "failed"):
278
268
  break
279
269
  time.sleep(2)
280
270
 
281
271
  # Download results
282
- for result in status["results"]:
283
- print(result["url"], result["download_url"])
272
+ for item in status["items"]:
273
+ if item["status"] == "completed":
274
+ print(item["url"], item["downloadUrl"])
275
+ else:
276
+ print(item["url"], item.get("error"))
284
277
  ```
285
278
 
286
279
  ---
@@ -450,7 +443,6 @@ Common error codes: `INVALID_API_KEY`, `QUOTA_EXCEEDED`, `INVALID_URL`, `VALIDAT
450
443
  - [Pricing](https://snap-render.com/pricing)
451
444
  - [Dashboard](https://app.snap-render.com/dashboard)
452
445
  - [Blog](https://snap-render.com/blog)
453
- - [GitHub](https://github.com/User0856/snaprender)
454
446
 
455
447
  ## License
456
448
 
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "snaprender"
7
- version = "0.7.3"
7
+ version = "0.7.5"
8
8
  description = "Official Python SDK for SnapRender Screenshot API"
9
9
  readme = "README.md"
10
10
  license = {text = "MIT"}
@@ -15,4 +15,5 @@ keywords = ["screenshot", "api", "snaprender", "capture", "webpage"]
15
15
  [project.urls]
16
16
  Homepage = "https://snap-render.com"
17
17
  Documentation = "https://snap-render.com/docs"
18
- Repository = "https://github.com/User0856/snaprender"
18
+ Repository = "https://github.com/User0856/snaprender-integrations"
19
+ Issues = "https://github.com/User0856/snaprender-integrations/issues"
@@ -3,4 +3,4 @@
3
3
  from .client import SnapRender, SnapRenderError
4
4
 
5
5
  __all__ = ["SnapRender", "SnapRenderError"]
6
- __version__ = "0.7.3"
6
+ __version__ = "0.7.5"
@@ -52,6 +52,7 @@ class SnapRender:
52
52
  width: Optional[int] = None,
53
53
  height: Optional[int] = None,
54
54
  full_page: Optional[bool] = None,
55
+ lazy_load: Optional[bool] = None,
55
56
  quality: Optional[int] = None,
56
57
  delay: Optional[int] = None,
57
58
  dark_mode: Optional[bool] = None,
@@ -87,6 +88,8 @@ class SnapRender:
87
88
  body["height"] = height
88
89
  if full_page is not None:
89
90
  body["full_page"] = full_page
91
+ if lazy_load is not None:
92
+ body["lazy_load"] = lazy_load
90
93
  if quality is not None:
91
94
  body["quality"] = quality
92
95
  if delay is not None:
@@ -123,6 +126,8 @@ class SnapRender:
123
126
  params["height"] = height
124
127
  if full_page is not None:
125
128
  params["full_page"] = str(full_page).lower()
129
+ if lazy_load is not None:
130
+ params["lazy_load"] = str(lazy_load).lower()
126
131
  if quality is not None:
127
132
  params["quality"] = quality
128
133
  if delay is not None:
@@ -165,6 +170,7 @@ class SnapRender:
165
170
  width: Optional[int] = None,
166
171
  height: Optional[int] = None,
167
172
  full_page: Optional[bool] = None,
173
+ lazy_load: Optional[bool] = None,
168
174
  quality: Optional[int] = None,
169
175
  delay: Optional[int] = None,
170
176
  dark_mode: Optional[bool] = None,
@@ -192,6 +198,8 @@ class SnapRender:
192
198
  body["height"] = height
193
199
  if full_page is not None:
194
200
  body["full_page"] = full_page
201
+ if lazy_load is not None:
202
+ body["lazy_load"] = lazy_load
195
203
  if quality is not None:
196
204
  body["quality"] = quality
197
205
  if delay is not None:
@@ -263,6 +271,7 @@ class SnapRender:
263
271
  width: Optional[int] = None,
264
272
  height: Optional[int] = None,
265
273
  full_page: Optional[bool] = None,
274
+ lazy_load: Optional[bool] = None,
266
275
  quality: Optional[int] = None,
267
276
  delay: Optional[int] = None,
268
277
  dark_mode: Optional[bool] = None,
@@ -287,6 +296,8 @@ class SnapRender:
287
296
  body["height"] = height
288
297
  if full_page is not None:
289
298
  body["full_page"] = full_page
299
+ if lazy_load is not None:
300
+ body["lazy_load"] = lazy_load
290
301
  if quality is not None:
291
302
  body["quality"] = quality
292
303
  if delay is not None:
@@ -1,17 +0,0 @@
1
- node_modules/
2
- dist/
3
- .env
4
- .env.local
5
- .env.production
6
- *.log
7
- coverage/
8
- .vscode/
9
- .idea/
10
- *.tsbuildinfo
11
- .DS_Store
12
- tmp/
13
- backups/
14
- site/.astro/
15
- site/dist/
16
- claude-instructions/
17
- .mcpregistry_*
File without changes