Skip to main content

Ombra SDK for Python (ombrabrowser)

Alpha (0.1.1). Implements SDK contract v0.1 and attaches Playwright over CDP (connect_over_cdp(..., no_defaults=True, is_local=True)) to Ombra stealth Chromium.

All SDKs · Contract · Stealth invariants

Package overview

Item Value
Package ombrabrowser (0.1.1)
Registry PyPI
Python 3.10+
Engine range >=151.0.7922.108,<152
Returns playwright.sync_api.Browser / playwright.async_api.Browser
Playwright >=1.60,<2.0 (optional extra)
Status Alpha

Installation

pip install "ombrabrowser[playwright]"
# Optional GeoIP auto-detection for timezone/locale="auto" + SOCKS5 upstream proxy helpers:
pip install "ombrabrowser[all]"

For local development from the repository root:

pip install -e "sdks/python[playwright]"

Playwright is an optional extra: importing ombrabrowser (binary_info, ensure_binary, clear_cache, error types, CLI) works without Playwright installed, while launch*() raises PlaywrightNotInstalledError with installation instructions if Playwright is missing.

Usage

from ombrabrowser import launch

browser = launch()
page = browser.new_page()
page.goto("https://example.com")
print(page.title())
browser.close()

Pin an exact engine release with version in any launch*() helper:

from ombrabrowser import launch, binary_info, ensure_binary

engine_version = "151.0.7922.108-9"
ensure_binary(version=engine_version)  # Optional: download and verify before launching
browser = launch(version=engine_version)
try:
    page = browser.new_page()
    page.goto("https://example.com")
finally:
    browser.close()
print(binary_info(version=engine_version))

version overrides OMBRA_VERSION and disables automatic upgrades for that launch. Include the release suffix (-9) for an exact build; a Chromium-only pin accepts local releases or the channel release with that Chromium version. A conflicting binary_path or OMBRA_BINARY_PATH raises UnsupportedEngineError. If the requested build is missing and download=False, launch raises BinaryNotFoundError.

ombrabrowser install --version 151.0.7922.108-9
OMBRA_VERSION=151.0.7922.108-9 python your_script.py

With a persistent named profile, authenticated proxy relay, fingerprint, and native engine humanization:

from ombrabrowser import launch

browser = launch(
    profile="pricing-eu",
    headless=False,
    proxy="socks5://user:pass@proxy:1080",
    fingerprint={"seed": 20261116, "os": "macos"},
    humanize={"preset": "default"},
)

Async, context, and persistent-context helpers:

from ombrabrowser import (
    launch_async,
    launch_context,
    launch_context_async,
    launch_persistent_context,
    launch_persistent_context_async,
    last_launch_info,
)

browser = await launch_async()
context = launch_context(viewport={"width": 1920, "height": 1080}, locale="en-US")
persistent_ctx = launch_persistent_context("my-profile")
print(last_launch_info(persistent_ctx))
persistent_ctx.close()

Custom Ombra CDP domain (9 CAPTCHA events, live policy control, humanize, and native agent):

from ombrabrowser import launch, ombra_cdp

browser = launch(captcha={"solve": False})  # detect-only mode (or captcha=True to auto-solve)
page = browser.new_page()

# Attaches to a browser-level CDP session (works with Browser or BrowserContext):
with ombra_cdp(browser) as cdp:
    with cdp.record_captcha_events() as rec:
        page.goto("https://example.com")
        # Pumps Playwright's sync loop while waiting for Ombra.captcha* events:
        event = rec.wait_for(("captchaDetected", "captchaSolved"), timeout_ms=10_000, page=page)
        print(event["event"], event.get("captcha"))

    print(cdp.get_captcha_state())
    cdp.set_captcha_policy(solve=True, max_attempts=3, time_budget_ms=30_000)

browser.close()

Binary management and CLI:

from ombrabrowser import binary_info, ensure_binary, clear_cache

print(binary_info())
ensure_binary()
clear_cache()
ombrabrowser info      # Print JSON diagnostics (or `ombrabrowser doctor`)
ombrabrowser install   # Download and verify Ed25519 + SHA-256 engine archive
ombrabrowser update    # Check channel manifest and update cached engine
ombrabrowser clear-cache
ombrabrowser login     # Save license key to ~/.ombra/license.key (chmod 600)
ombrabrowser logout

launch() returns a real Playwright Browser. There is no wrapper and no new page API.

Layout

sdks/python/
├── LICENSE
├── MANIFEST.in
├── NOTICE
├── pyproject.toml
├── README.md
├── src/ombrabrowser/
│   ├── __init__.py       # Public exports and error hierarchy
│   ├── __main__.py       # `python -m ombrabrowser` / `ombrabrowser` CLI
│   ├── _version.py       # SDK version, contract range, engine compatibility
│   ├── binary.py         # Resolution order, Ed25519 + SHA-256 verification, cache
│   ├── captcha.py        # Re-exports for custom CAPTCHA CDP events and commands
│   ├── cdp.py            # Browser-level Ombra CDP domain client (sync & async)
│   ├── config.py         # Env vars, platform detection, signing pubkeys, license resolution
│   ├── errors.py         # Typed OmbraError hierarchy + secret redaction
│   ├── geoip.py          # Optional GeoIP lookup for timezone/locale="auto"
│   ├── launcher.py       # Sync/async launchers, CDP attach, readiness, process reaper
│   ├── options.py        # launch-options.schema.json validation + CLI flag builder
│   ├── profile.py        # Named profile slugification, seed persistence, cross-process locks
│   ├── proxy.py          # Proxy validation + in-memory loopback SOCKS5 credential relay
│   └── py.typed          # PEP 561 typing marker
└── tests/
    ├── conftest.py
    ├── test_binary.py
    ├── test_cdp_captcha.py
    ├── test_engine_versions.py
    ├── test_cli.py
    ├── test_launch.py
    ├── test_options.py
    ├── test_profile.py
    ├── test_proxy.py
    └── test_stealth_invariants.py

Build and test

cd sdks/python
python -m venv .venv && . .venv/bin/activate
pip install -e ".[playwright,dev]"
pytest -v tests
# Optional live test against an installed/cached Ombra Chromium binary:
OMBRA_REAL_BROWSER_TEST=1 pytest -v tests -m real_browser

Notes

  • Playwright stays an optional extra (ombrabrowser[playwright]); ombrabrowser imports cleanly without it.
  • Sync and async launchers share binary resolution, profile locking, option validation, and the loopback SOCKS5 proxy relay.
  • launch_context() / launch_persistent_context() close the underlying browser and engine process when the context closes.
  • Obeys all stealth invariants (SI-01..SI-12): connects via connect_over_cdp(..., no_defaults=True, is_local=True), defaults new_page()/new_context() to no_viewport=True, and never injects init scripts, Runtime.enable, --enable-automation, proxy credentials on CLI, or Emulation overrides.

Metadata

Release files for ombrabrowser 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ombrabrowser 0.1.1
File Size Uploaded Provenance Actions
ombrabrowser-0.1.1.tar.gz 79.0 kB Without provenance Details for ombrabrowser-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ombrabrowser 0.1.1
File Interpreter ABI Platform Actions
ombrabrowser-0.1.1-py3-none-any.whl Python 3 none any Details for ombrabrowser-0.1.1-py3-none-any.whl

Total release size: 141.2 kB

Release files / ombrabrowser-0.1.1.tar.gz

Download URL ombrabrowser-0.1.1.tar.gz
Size 79.0 kB
Tags Source
SHA-256 checksum
How to use checksums
18b7005a08c2d913670f23ac0f63b65970dc56e592e67dfa8f8b3384a8bdcc90
BLAKE2b-256 checksum
How to use checksums
f2ba2057974e6d16d1f122cd37d3b11642e8c099ccba8dbf12e49a069c2ad8f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / ombrabrowser-0.1.1-py3-none-any.whl

Download URL ombrabrowser-0.1.1-py3-none-any.whl
Size 62.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
37ddf2a40bfa162fc4644ef60a21ee2112ad90f7f2da68eb3e2f6217a957606d
BLAKE2b-256 checksum
How to use checksums
805a94ec6eebdce92fd7dfe32ba862023b881add272a3a2862b607dd0ada857c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Security for ombrabrowser 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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