SDK release
This guide covers SDK v0.4.4.
Python SDK quickstart¶
Asynchronous Python client for aimlib mobile proxies, managed remote-browser sessions, network operations, and support tickets. Python 3.10 or newer is required.
Install¶
For proxy, device, network-operation, and support APIs:
Include managed remote-browser support when needed:
The browser extra provides the supported client integration. No separate browser installation step is required.
Configure¶
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 requires an eligible active rental.
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 network operations.ai.ticketscreates, lists, reads, replies to, and closes support tickets.