alterlab 2.0.0__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.
@@ -0,0 +1,18 @@
1
+ Metadata-Version: 2.4
2
+ Name: alterlab
3
+ Version: 2.1.0
4
+ Summary: AlterLab Python SDK
5
+ Author: AlterLab
6
+ Author-email: dev@alterlab.io
7
+ Requires-Python: >=3.8,<4.0
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3.8
10
+ Classifier: Programming Language :: Python :: 3.9
11
+ Classifier: Programming Language :: Python :: 3.10
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Classifier: Programming Language :: Python :: 3.14
16
+ Requires-Dist: httpx (>=0.25.2,<0.26.0)
17
+ Requires-Dist: pydantic (>=2.5.0,<3.0.0)
18
+ Requires-Dist: typing_extensions (>=3.7.4)
@@ -0,0 +1,57 @@
1
+ """AlterLab Python SDK.
2
+
3
+ A production-ready Python client for the AlterLab Scraping API with full feature support.
4
+
5
+ Example:
6
+ import asyncio
7
+ from alterlab import AlterLab, AdvancedOptions, CostControls
8
+
9
+ async def main():
10
+ async with AlterLab(api_key="sk_test_...") as client:
11
+ # Simple scraping
12
+ result = await client.scrape("https://example.com")
13
+ print(result['content'])
14
+
15
+ # Authenticated scraping with cookies
16
+ result = await client.scrape(
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"},
26
+ )
27
+
28
+ asyncio.run(main())
29
+
30
+ For synchronous usage:
31
+ from alterlab import AlterLabSync
32
+
33
+ with AlterLabSync(api_key="sk_test_...") as client:
34
+ result = client.scrape("https://example.com")
35
+ print(result['content'])
36
+ """
37
+
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
+ __all__ = [
46
+ "AlterLab",
47
+ "AlterLabSync",
48
+ "AdvancedOptions",
49
+ "CostControls",
50
+ "AlterLabError",
51
+ "AlterLabAPIError",
52
+ "AlterLabTimeoutError",
53
+ "AlterLabValidationError",
54
+ "SessionIntegration",
55
+ "SessionListResponse",
56
+ "SessionValidation",
57
+ ]