aimlib 0.4.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.
aimlib-0.4.2/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 aimlib
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
aimlib-0.4.2/PKG-INFO ADDED
@@ -0,0 +1,112 @@
1
+ Metadata-Version: 2.4
2
+ Name: aimlib
3
+ Version: 0.4.2
4
+ Summary: Python SDK for aimlib mobile proxies and remote-browser sessions
5
+ Author: aimlib
6
+ License-Expression: MIT
7
+ Project-URL: Documentation, https://docs.aimlib.com/
8
+ Project-URL: Changelog, https://github.com/rukouai/aimlib-python/blob/main/CHANGELOG.md
9
+ Project-URL: Issues, https://github.com/rukouai/aimlib-python/issues
10
+ Project-URL: Source, https://github.com/rukouai/aimlib-python
11
+ Keywords: aimlib,mobile-proxy,proxy,remote-browser,asyncio
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Framework :: AsyncIO
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3 :: Only
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Programming Language :: Python :: 3.14
23
+ Classifier: Topic :: Internet :: Proxy Servers
24
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
25
+ Requires-Python: >=3.10
26
+ Description-Content-Type: text/markdown
27
+ License-File: LICENSE
28
+ Requires-Dist: httpx<1,>=0.27
29
+ Provides-Extra: browser
30
+ Requires-Dist: patchright==1.61.2; extra == "browser"
31
+ Dynamic: license-file
32
+
33
+ # aimlib Python SDK
34
+
35
+ [![PyPI](https://img.shields.io/pypi/v/aimlib)](https://pypi.org/project/aimlib/)
36
+ [![Python](https://img.shields.io/pypi/pyversions/aimlib)](https://pypi.org/project/aimlib/)
37
+ [![CI](https://github.com/rukouai/aimlib-python/actions/workflows/ci.yml/badge.svg)](https://github.com/rukouai/aimlib-python/actions/workflows/ci.yml)
38
+
39
+ Asynchronous Python client for aimlib mobile proxies, on-device remote-browser sessions, radio
40
+ operations, and support tickets. Python 3.10 or newer is required.
41
+
42
+ ## Install
43
+
44
+ For proxy, device, radio-operation, and support APIs:
45
+
46
+ ```sh
47
+ python -m pip install --upgrade aimlib
48
+ ```
49
+
50
+ Include managed remote-browser support when needed:
51
+
52
+ ```sh
53
+ python -m pip install --upgrade "aimlib[browser]"
54
+ ```
55
+
56
+ The browser extra connects to Chromium on the leased phone. It does not download or launch a browser
57
+ binary on your computer.
58
+
59
+ ## Configure
60
+
61
+ ```sh
62
+ export AIMLIB_API_KEY="<api-key>"
63
+ export AIMLIB_BASE_URL="https://uswest1.aimlib.com"
64
+ ```
65
+
66
+ API keys, credential-bearing proxy URLs, and browser connection tokens are secrets. Do not print or
67
+ log them.
68
+
69
+ ## Example
70
+
71
+ ```python
72
+ from aimlib import Aimlib
73
+
74
+ async with Aimlib() as ai:
75
+ device = (await ai.devices.list())[0]
76
+
77
+ http_proxy = device.proxy.http_url
78
+ socks_remote_dns_proxy = device.proxy.socks5h_url
79
+
80
+ async with await device.browser(ttl="10m") as session:
81
+ page = await session.new_page()
82
+ await page.goto("https://example.com")
83
+ print(await page.title())
84
+ ```
85
+
86
+ Only devices in your active rentals are returned. A remote browser can be created only after a
87
+ rental is active and the phone has been assigned to it.
88
+
89
+ ## Main APIs
90
+
91
+ - `ai.devices.list()` and `ai.device(id)` return devices in active rentals.
92
+ - `device.proxy.http_url`, `.socks5_url`, and `.socks5h_url` address the same proxy host and port.
93
+ - `device.browser()` creates a remote-browser session for the active rental.
94
+ - `session.new_page()`, `.disconnect()`, `.connect()`, and `.stop()` manage that session.
95
+ - `device.rotate_ip()` and `device.switch_carrier()` support blocking or queued operation modes.
96
+ - `ai.operations.get(id)` and `.wait(id)` poll queued radio operations.
97
+ - `ai.tickets` creates, lists, reads, replies to, and closes support tickets.
98
+
99
+ ## Development
100
+
101
+ ```sh
102
+ python -m pip install -e ".[browser]"
103
+ python -m unittest discover -s tests -v
104
+ ```
105
+
106
+ See the [customer documentation](https://docs.aimlib.com/) for the complete API contract, limits,
107
+ security policy, and examples. Release notes are kept in the
108
+ [changelog](https://github.com/rukouai/aimlib-python/blob/main/CHANGELOG.md).
109
+
110
+ Report security issues privately as described in the
111
+ [security policy](https://github.com/rukouai/aimlib-python/blob/main/SECURITY.md). Never include API
112
+ keys, credential-bearing proxy URLs, browser connection tokens, or customer data in an issue or log.
aimlib-0.4.2/README.md ADDED
@@ -0,0 +1,80 @@
1
+ # aimlib Python SDK
2
+
3
+ [![PyPI](https://img.shields.io/pypi/v/aimlib)](https://pypi.org/project/aimlib/)
4
+ [![Python](https://img.shields.io/pypi/pyversions/aimlib)](https://pypi.org/project/aimlib/)
5
+ [![CI](https://github.com/rukouai/aimlib-python/actions/workflows/ci.yml/badge.svg)](https://github.com/rukouai/aimlib-python/actions/workflows/ci.yml)
6
+
7
+ Asynchronous Python client for aimlib mobile proxies, on-device remote-browser sessions, radio
8
+ operations, and support tickets. Python 3.10 or newer is required.
9
+
10
+ ## Install
11
+
12
+ For proxy, device, radio-operation, and support APIs:
13
+
14
+ ```sh
15
+ python -m pip install --upgrade aimlib
16
+ ```
17
+
18
+ Include managed remote-browser support when needed:
19
+
20
+ ```sh
21
+ python -m pip install --upgrade "aimlib[browser]"
22
+ ```
23
+
24
+ The browser extra connects to Chromium on the leased phone. It does not download or launch a browser
25
+ binary on your computer.
26
+
27
+ ## Configure
28
+
29
+ ```sh
30
+ export AIMLIB_API_KEY="<api-key>"
31
+ export AIMLIB_BASE_URL="https://uswest1.aimlib.com"
32
+ ```
33
+
34
+ API keys, credential-bearing proxy URLs, and browser connection tokens are secrets. Do not print or
35
+ log them.
36
+
37
+ ## Example
38
+
39
+ ```python
40
+ from aimlib import Aimlib
41
+
42
+ async with Aimlib() as ai:
43
+ device = (await ai.devices.list())[0]
44
+
45
+ http_proxy = device.proxy.http_url
46
+ socks_remote_dns_proxy = device.proxy.socks5h_url
47
+
48
+ async with await device.browser(ttl="10m") as session:
49
+ page = await session.new_page()
50
+ await page.goto("https://example.com")
51
+ print(await page.title())
52
+ ```
53
+
54
+ Only devices in your active rentals are returned. A remote browser can be created only after a
55
+ rental is active and the phone has been assigned to it.
56
+
57
+ ## Main APIs
58
+
59
+ - `ai.devices.list()` and `ai.device(id)` return devices in active rentals.
60
+ - `device.proxy.http_url`, `.socks5_url`, and `.socks5h_url` address the same proxy host and port.
61
+ - `device.browser()` creates a remote-browser session for the active rental.
62
+ - `session.new_page()`, `.disconnect()`, `.connect()`, and `.stop()` manage that session.
63
+ - `device.rotate_ip()` and `device.switch_carrier()` support blocking or queued operation modes.
64
+ - `ai.operations.get(id)` and `.wait(id)` poll queued radio operations.
65
+ - `ai.tickets` creates, lists, reads, replies to, and closes support tickets.
66
+
67
+ ## Development
68
+
69
+ ```sh
70
+ python -m pip install -e ".[browser]"
71
+ python -m unittest discover -s tests -v
72
+ ```
73
+
74
+ See the [customer documentation](https://docs.aimlib.com/) for the complete API contract, limits,
75
+ security policy, and examples. Release notes are kept in the
76
+ [changelog](https://github.com/rukouai/aimlib-python/blob/main/CHANGELOG.md).
77
+
78
+ Report security issues privately as described in the
79
+ [security policy](https://github.com/rukouai/aimlib-python/blob/main/SECURITY.md). Never include API
80
+ keys, credential-bearing proxy URLs, browser connection tokens, or customer data in an issue or log.