Metadata-Version: 2.4
Name: browserman
Version: 0.1.0a1
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Rust
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Typing :: Typed
License-File: LICENSE-MIT
License-File: LICENSE-APACHE
Summary: Python bindings for browserman, a cross-platform browser detection and launcher written in Rust.
Keywords: browser,launch,detect,chrome,firefox,rust
Author-email: Ronie Martinez <ronmarti18@gmail.com>
License-Expression: MIT OR Apache-2.0
Requires-Python: >=3.10
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM

# browserman

Python bindings for browserman, a cross-platform browser detection and launcher written in Rust.

## Python

```sh
pip install browserman
```

```python
import browserman

for browser in browserman.browsers():
    print(browser.browser_type, browser.display_name, browser.version, browser.path)

chrome = browserman.get("chrome", "152.*")
if chrome is not None:
    pid = chrome.launch("https://example.com", ["--incognito"])

pid = browserman.launch("firefox", url="https://example.com")
```

`browser.launch()` and `browser.logo()` act on a browser you already have.
The module level `browserman.launch()` looks the browser up first, so prefer the methods when you have one.

Both `launch` forms return the process id of the new child, because `std::process::Child` has no Python equivalent.
They raise `BrowsermanError` when no browser matches or the process cannot be started.

`browser.logo()` returns a `Logo` carrying `content_type` and `bytes`, or `None` when no icon can be extracted.

The package ships `py.typed` and a stub file, so type checkers see the full API.

