Skip to main content

@antybrowser/sdk (Python)

Official Antybrowser Python SDK for the Local API.

PyPI version License: MIT

Installation

pip install antybrowser

Quick Start

import asyncio
from antybrowser import AntybrowserClient, CreateProfileRequest

async def main():
    async with AntybrowserClient(api_key="your_key", port=5173) as client:
        # List profiles
        profiles = await client.get_profiles()
        for p in profiles:
            print(f"{p.name} (status: {p.status})")

        # Create a profile
        profile = await client.create_profile(CreateProfileRequest(
            name="My Profile",
            browser_type="Chrome",
            os_fingerprint="Windows",
            language="en-US",
            use_fingerprint=True,
        ))

        # Start it — get debug port for Selenium/Playwright
        result = await client.start_profile(profile.id)
        print(f"Debug port: {result.data.debug_port}")

asyncio.run(main())

Configuration

# Simple
client = AntybrowserClient(api_key="my_key")

# Custom port
client = AntybrowserClient(api_key="my_key", port=5174)

# Full override
client = AntybrowserClient(api_key="my_key", base_url="http://10.0.0.5:5173")

Context Manager

async with AntybrowserClient(api_key="my_key") as client:
    profiles = await client.get_profiles()
# Connection automatically closed

API Methods

Method Description
get_status() Check API connection
get_settings() Get settings
get_sync_status() Get sync status
refresh_sync(profile_id?) Trigger sync
get_profiles() List profiles
create_profile(request) Create profile
update_profile(id, **fields) Update profile
delete_profile(id) Delete profile
start_profile(id) Start profile
stop_profile(id) Stop profile
duplicate_profile(id, opts?) Duplicate profile
get_automations() List automations
run_automation(id, request) Run automation
get_groups() List groups
create_group(request) Create group
update_group(id, **fields) Update group
delete_group(id) Delete group
get_proxies() List proxies
create_proxy(request) Create proxy
check_proxy(host, port, ...) Check proxy
check_proxies_bulk(proxies) Bulk check
delete_proxy(id) Delete proxy
get_extensions() List extensions
delete_extension(id) Delete extension
get_profile_extensions(id) Get profile extensions
set_profile_extensions(id, ids) Set profile extensions

Error Handling

from antybrowser import AntybrowserError

try:
    await client.get_profiles()
except AntybrowserError as e:
    print(f"Status: {e.status_code}")
    print(f"Body: {e.response_body}")

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

antybrowser-1.0.2.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

antybrowser-1.0.2-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file antybrowser-1.0.2.tar.gz.

File metadata

  • Download URL: antybrowser-1.0.2.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for antybrowser-1.0.2.tar.gz
Algorithm Hash digest
SHA256 f09925f33ac63b08bebd232e4ea086fa56eed8d411deb0f340d0dd46dd0a3d45
MD5 7f3771757c4238d9b1823a63041e3cf3
BLAKE2b-256 f6922d3001b8715d70a53007c3f12c933a2f8f57a39c8d5e348e3011925a1674

See more details on using hashes here.

File details

Details for the file antybrowser-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: antybrowser-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for antybrowser-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1156803b08c2436b0e08e6611213f7a74b6c3fe28811072be476616a2ab7c643
MD5 41998a8d285a5253148cc0d454c5ddee
BLAKE2b-256 09e62058eb217a18071d70e1528bca72937efa56fef40784157e50c88d89904f

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page