Obscura Python SDK
Documentação completa: English · Português do Brasil
Playwright-like Python entry points for the Rust Obscura browser fork. The SDK uses Playwright's own Python objects and CDP client; it does not download Chromium.
Complete documentation: English · Português do Brasil
Install from this directory with pip install -e .. On first use, the SDK
downloads the matching release from h4ckf0r0day/obscura into its own
obscura-python data directory. Set OBSCURA_REPOSITORY to use another
repository, such as your own fork, when it has compatible release assets.
Set OBSCURA_PYTHON_HOME to choose the local root.
OBSCURA_EXECUTABLE, executable_path, or a binary on PATH can override
that download.
The package also installs the obscura-python command, which forwards CLI
arguments to the Rust executable:
pip install obscura-python
obscura-python fetch https://example.com --dump text
With uv, install it as a tool:
uv tool install obscura-python
obscura-python --version
Releases are published by GitHub Actions. Create a tag such as v0.1.0 after
configuring the repository as a Trusted Publisher for the obscura-python
project on PyPI; the workflow builds and uploads the wheel and source archive
without storing a PyPI token in GitHub.
For a local checkout use uv tool install ./python, or add it to a project
with uv add ./python. The first execution may require internet access to
download the Rust browser binary; set OBSCURA_EXECUTABLE for offline use.
from obscura.async_api import async_playwright
async with async_playwright() as p:
browser = await p.chromium.launch(proxy={"server": "http://127.0.0.1:8080"})
page = await browser.new_page()
await page.goto("https://example.com")
print(await page.title())
await browser.close()
Janela de visualização (headless)
O engine continua sem janela e recebe comandos por CDP, mas o SDK pode mostrar os frames recebidos em uma janela Tkinter. Isso é útil para depurar um fluxo de RPA sem trocar a API Playwright:
from obscura.sync_api import sync_playwright
with sync_playwright() as p:
browser = p.chromium.launch(show_window=True, window_title="Meu robô", frame_rate=30)
page = browser.contexts[0].pages[0]
page.goto("https://example.com")
input("Pressione Enter para fechar... ")
browser.close()
show_window=True apenas exibe o screencast Page.startScreencast; não torna o
processo do navegador headed e não altera a automação. O recurso depende de
Tkinter estar disponível na instalação do Python.
Each launch chooses a free loopback port and starts an independent process.
connect_over_cdp() connects to an external process and never terminates it.
Obscura is headless only; unsupported launch options produce explicit errors.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file obscura_python-0.1.5.tar.gz.
File metadata
- Download URL: obscura_python-0.1.5.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc22a92f32503c80321ab39789cd8a4d1e266255bc3b5aa7fd069193a3725c95
|
|
| MD5 |
9e0d5778dcbab19825f8630294b2cd8b
|
|
| BLAKE2b-256 |
3a36e6a7e07f77fc97e12b6b4365124efb9414b983775a92efe3e3e6ef17c20d
|
Provenance
The following attestation bundles were made for obscura_python-0.1.5.tar.gz:
Publisher:
publish.yml on Willianjesusdasilva/obscura-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
obscura_python-0.1.5.tar.gz -
Subject digest:
dc22a92f32503c80321ab39789cd8a4d1e266255bc3b5aa7fd069193a3725c95 - Sigstore transparency entry: 2822946685
- Sigstore integration time:
-
Permalink:
Willianjesusdasilva/obscura-python@81ffa13575da4dbd16c672dd288f649f0fd74c5d -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/Willianjesusdasilva
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@81ffa13575da4dbd16c672dd288f649f0fd74c5d -
Trigger Event:
push
-
Statement type:
File details
Details for the file obscura_python-0.1.5-py3-none-any.whl.
File metadata
- Download URL: obscura_python-0.1.5-py3-none-any.whl
- Upload date:
- Size: 11.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6bb5fe79710bb2d6922471a8e204d5efd09ea075ade7eb7170ac6c6e3a1630c4
|
|
| MD5 |
ba84f5310cb21861480be1bfd1d2f82e
|
|
| BLAKE2b-256 |
3df16c0e0654e641682c5b279478942f751d23850c4786bde2414ec8301d821a
|
Provenance
The following attestation bundles were made for obscura_python-0.1.5-py3-none-any.whl:
Publisher:
publish.yml on Willianjesusdasilva/obscura-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
obscura_python-0.1.5-py3-none-any.whl -
Subject digest:
6bb5fe79710bb2d6922471a8e204d5efd09ea075ade7eb7170ac6c6e3a1630c4 - Sigstore transparency entry: 2822946734
- Sigstore integration time:
-
Permalink:
Willianjesusdasilva/obscura-python@81ffa13575da4dbd16c672dd288f649f0fd74c5d -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/Willianjesusdasilva
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@81ffa13575da4dbd16c672dd288f649f0fd74c5d -
Trigger Event:
push
-
Statement type: