Metadata-Version: 2.4
Name: pylowright
Version: 0.4
Summary: Pylowright browser automation helpers
Author-email: Pylonium Contributors <walia.raman89@gmail.com>
License: MIT
Keywords: playwright,browser,automation,testing
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: playwright>=1.39.0

# pylowright

A lightweight browser automation helper package for Playwright-based browser automation.

## Installation

Install the package locally for development:

```bash
pip install -e .
```

Install runtime dependencies:

```bash
pip install playwright
playwright install
```

## Usage

Import the package and create a browser session using the provided APIs:

```python
from pylowright import Browser

browser = Browser.persistent(profile="chrome")
try:
    browser.goto("https://example.com")
    print(browser.title)
finally:
    browser.close()
```

Or use a session directly:

```python
from pylowright.browser import BrowserSession
from playwright.sync_api import sync_playwright

with sync_playwright() as pw:
    session = BrowserSession.ephemeral(pw.chromium, profile="chrome")
    session.goto("https://example.com")
    print(session.title)
    session.close()
```

## Testing

Run tests:

```bash
pytest -q
```
