Ombra SDK for Python (ombrabrowser)
Alpha (
0.1.3). 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.3) |
| 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 (installed automatically) |
| Status | Alpha |
Installation
pip install ombrabrowser
# Optional GeoIP auto-detection for timezone/locale="auto" + SOCKS5 upstream proxy helpers:
pip install "ombrabrowser[geoip]"
For local development from the repository root:
pip install -e sdks/python
Playwright is included in the standard installation; the legacy ombrabrowser[playwright] extra remains a compatibility alias. On first launch, the SDK resolves a local Ombra engine or downloads and verifies it automatically. No desktop app or playwright install chromium command is required.
Migrating from Playwright
Replace the import and browser launch; keep your existing page code:
- from playwright.sync_api import sync_playwright
- pw = sync_playwright().start()
- browser = pw.chromium.launch()
+ from ombrabrowser import launch
+ browser = launch()
page = browser.new_page()
page.goto("https://example.com")
# ... rest of your code works unchanged
For async code, use from ombrabrowser import launch_async and browser = await launch_async().
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 ".[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 is a required dependency; the older
ombrabrowser[playwright]installation command remains supported. - 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 viaconnect_over_cdp(..., no_defaults=True, is_local=True), defaultsnew_page()/new_context()tono_viewport=True, and never injects init scripts,Runtime.enable,--enable-automation, proxy credentials on CLI, orEmulationoverrides.
Metadata
Release files for ombrabrowser 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ombrabrowser-0.1.3.tar.gz | 89.3 kB | Without provenance | Details for ombrabrowser-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ombrabrowser-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for ombrabrowser-0.1.3-py3-none-any.whl |
Total release size: 152.4 kB
Release files / ombrabrowser-0.1.3.tar.gz
| Download URL | ombrabrowser-0.1.3.tar.gz |
|---|---|
| Size | 89.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
973fb907edad7a4dcd5fae61b2afbf2b1f5134b5eaf24ebbcaa4a05a790d598a
|
|
BLAKE2b-256 checksum How to use checksums |
2969ef94b759e12f5c66673ed062e8dd7118279bb03c22996f7206fbf47e271c
|
| 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.3-py3-none-any.whl
| Download URL | ombrabrowser-0.1.3-py3-none-any.whl |
|---|---|
| Size | 63.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a49ba70a68e02c4985d819622578ecab92c228e29a7c56af7330b324d441dbe6
|
|
BLAKE2b-256 checksum How to use checksums |
3bfac89df4039cb6d84dd7b3540b0a59cacbcc983322abd56c1992addc095c64
|
| 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.3
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.