Python SDK for aimlib mobile proxies and remote-browser sessions
Project description
aimlib Python SDK
Asynchronous Python client for aimlib mobile proxies, on-device remote-browser sessions, radio operations, and support tickets. Python 3.10 or newer is required.
Install
For proxy, device, radio-operation, and support APIs:
python -m pip install --upgrade aimlib
Include managed remote-browser support when needed:
python -m pip install --upgrade "aimlib[browser]"
The browser extra connects to Chromium on the leased phone. It does not download or launch a browser binary on your computer.
Configure
export AIMLIB_API_KEY="<api-key>"
export AIMLIB_BASE_URL="https://uswest1.aimlib.com"
API keys, credential-bearing proxy URLs, and browser connection tokens are secrets. Do not print or log them.
Example
from aimlib import Aimlib
async with Aimlib() as ai:
device = (await ai.devices.list())[0]
http_proxy = device.proxy.http_url
socks_remote_dns_proxy = device.proxy.socks5h_url
async with await device.browser(ttl="10m") as session:
page = await session.new_page()
await page.goto("https://example.com")
print(await page.title())
Only devices in your active rentals are returned. A remote browser can be created only after a rental is active and the phone has been assigned to it.
Main APIs
ai.devices.list()andai.device(id)return devices in active rentals.device.proxy.http_url,.socks5_url, and.socks5h_urladdress the same proxy host and port.device.browser()creates a remote-browser session for the active rental.session.new_page(),.disconnect(),.connect(), and.stop()manage that session.device.rotate_ip()anddevice.switch_carrier()support blocking or queued operation modes.ai.operations.get(id)and.wait(id)poll queued radio operations.ai.ticketscreates, lists, reads, replies to, and closes support tickets.
Development
python -m pip install -e ".[browser]"
python -m unittest discover -s tests -v
See the customer documentation for the complete API contract, limits, security policy, and examples. Release notes are kept in the changelog.
Report security issues privately as described in the security policy. Never include API keys, credential-bearing proxy URLs, browser connection tokens, or customer data in an issue or log.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aimlib-0.4.2.tar.gz.
File metadata
- Download URL: aimlib-0.4.2.tar.gz
- Upload date:
- Size: 19.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63d3c904413b57762a54c3b6f730ad968da78824e426f930901b8b73d0d6eb48
|
|
| MD5 |
68d9b2e7c3693560463bbc63e167d2a2
|
|
| BLAKE2b-256 |
d87f9bd2eeafe6a88aca345b7c9b551a41d09ed3e69f9909940e95b7da1cbb8e
|
Provenance
The following attestation bundles were made for aimlib-0.4.2.tar.gz:
Publisher:
release.yml on rukouai/aimlib-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aimlib-0.4.2.tar.gz -
Subject digest:
63d3c904413b57762a54c3b6f730ad968da78824e426f930901b8b73d0d6eb48 - Sigstore transparency entry: 2169636546
- Sigstore integration time:
-
Permalink:
rukouai/aimlib-python@e0d55f29c932ac2e61dd4411c43cda00f4a41f60 -
Branch / Tag:
refs/tags/v0.4.2 - Owner: https://github.com/rukouai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e0d55f29c932ac2e61dd4411c43cda00f4a41f60 -
Trigger Event:
release
-
Statement type:
File details
Details for the file aimlib-0.4.2-py3-none-any.whl.
File metadata
- Download URL: aimlib-0.4.2-py3-none-any.whl
- Upload date:
- Size: 13.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
178762b924be7b9b118b310ee7c24c2cffff2643c2d9767a79292e0cacbbf9bb
|
|
| MD5 |
7014e53f7e3247fe578af222db47dad5
|
|
| BLAKE2b-256 |
27a6805e906d5a74205981036c0cdbd3686b1f3bed41460209692cc630df8330
|
Provenance
The following attestation bundles were made for aimlib-0.4.2-py3-none-any.whl:
Publisher:
release.yml on rukouai/aimlib-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aimlib-0.4.2-py3-none-any.whl -
Subject digest:
178762b924be7b9b118b310ee7c24c2cffff2643c2d9767a79292e0cacbbf9bb - Sigstore transparency entry: 2169636568
- Sigstore integration time:
-
Permalink:
rukouai/aimlib-python@e0d55f29c932ac2e61dd4411c43cda00f4a41f60 -
Branch / Tag:
refs/tags/v0.4.2 - Owner: https://github.com/rukouai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e0d55f29c932ac2e61dd4411c43cda00f4a41f60 -
Trigger Event:
release
-
Statement type: