Skip to main content

Ombra SDK for Python (ombrabrowser)

Alpha (0.1.0). 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.0)
Registry PyPI
Python 3.10+
Engine range >=151.0.7922.108,<152
Returns playwright.sync_api.Browser / playwright.async_api.Browser
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()

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()

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
│   ├── 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_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.0

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.0
File Size Uploaded Provenance Actions
ombrabrowser-0.1.0.tar.gz 63.6 kB Without provenance Details for ombrabrowser-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 116.7 kB

Release files / ombrabrowser-0.1.0.tar.gz

Download URL ombrabrowser-0.1.0.tar.gz
Size 63.6 kB
Tags Source
SHA-256 checksum
How to use checksums
5550711cd46a026d014bbcabaa4b0bd1afe1e19631b47dd6fa5f18a8ebcfa85d
BLAKE2b-256 checksum
How to use checksums
0d6afe09e5d82890e07e66d6518ca2b66198198e5e16058c315756eb76c0a983
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.8

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

Download URL ombrabrowser-0.1.0-py3-none-any.whl
Size 53.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0ab65684cfa02c316a387c3f206b11223502e7d676bc279f2abde487dee12987
BLAKE2b-256 checksum
How to use checksums
e44f8fe64b2e3329ae9d7bd268d427ccf5ab9728dc9d0ada6a52a3cfa49c5d37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.8

Security for ombrabrowser 0.1.0

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