alterlab 2.0.1__tar.gz → 2.1.0__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: alterlab
3
- Version: 2.0.1
3
+ Version: 2.1.0
4
4
  Summary: AlterLab Python SDK
5
5
  Author: AlterLab
6
6
  Author-email: dev@alterlab.io
@@ -15,3 +15,4 @@ Classifier: Programming Language :: Python :: 3.13
15
15
  Classifier: Programming Language :: Python :: 3.14
16
16
  Requires-Dist: httpx (>=0.25.2,<0.26.0)
17
17
  Requires-Dist: pydantic (>=2.5.0,<3.0.0)
18
+ Requires-Dist: typing_extensions (>=3.7.4)
@@ -12,12 +12,17 @@ Example:
12
12
  result = await client.scrape("https://example.com")
13
13
  print(result['content'])
14
14
 
15
- # Advanced scraping with cost controls
15
+ # Authenticated scraping with cookies
16
16
  result = await client.scrape(
17
- "https://example.com",
18
- mode="js",
19
- advanced=AdvancedOptions(render_js=True, screenshot=True),
20
- cost_controls=CostControls(max_credits=5)
17
+ "https://amazon.com/dp/B0XXXXX",
18
+ cookies={"session-id": "abc123", "session-token": "xyz789"}
19
+ )
20
+
21
+ # Session management
22
+ session = await client.sessions.create(
23
+ name="My Amazon Prime",
24
+ domain="amazon.com",
25
+ cookies={"session-id": "abc123"},
21
26
  )
22
27
 
23
28
  asyncio.run(main())
@@ -30,18 +35,13 @@ For synchronous usage:
30
35
  print(result['content'])
31
36
  """
32
37
 
33
- from alterlab.client import (
34
- AlterLab,
35
- AlterLabSync,
36
- AdvancedOptions,
37
- CostControls,
38
- AlterLabError,
39
- AlterLabAPIError,
40
- AlterLabTimeoutError,
41
- AlterLabValidationError
42
- )
43
-
44
- __version__ = "2.0.0"
38
+ from alterlab.client import (AdvancedOptions, AlterLab, AlterLabAPIError,
39
+ AlterLabError, AlterLabSync, AlterLabTimeoutError,
40
+ AlterLabValidationError, CostControls)
41
+ from alterlab.types import (SessionIntegration, SessionListResponse,
42
+ SessionValidation)
43
+
44
+ __version__ = "2.1.0"
45
45
  __all__ = [
46
46
  "AlterLab",
47
47
  "AlterLabSync",
@@ -50,5 +50,8 @@ __all__ = [
50
50
  "AlterLabError",
51
51
  "AlterLabAPIError",
52
52
  "AlterLabTimeoutError",
53
- "AlterLabValidationError"
53
+ "AlterLabValidationError",
54
+ "SessionIntegration",
55
+ "SessionListResponse",
56
+ "SessionValidation",
54
57
  ]