semvec/pypi-packages huggingface dataset:
libimagequant 2.17.0.0
Unofficial Python bindings for libimagequant
Requires Python: >=3.6

Unofficial libimagequant Python Bindings
========================================

[![Documentation](https://img.shields.io/badge/documentation-Read%20the%20Docs-brightgreen.svg?logo=read%20the%20docs&logoColor=white)](http://libimagequant-python.readthedocs.io/)
[![PyPI](https://img.shields.io/pypi/v/libimagequant.svg?logo=python&logoColor=white)](https://pypi.org/project/libimagequant/)
[![License: GNU GPL 3.0](https://img.shields.io/github/license/RoadrunnerWMC/libimagequant-python.svg?logo=gnu&logoColor=white)](https://www.gnu.org/licenses/gpl-3.0)

This repository is the home of the unofficial Python bindings for
[libimagequant](https://pngquant.org/lib/).

Full documentation, including setup and usage instructions, is available on
[Read the Docs](http://libimagequant-python.readthedocs.io/).


License
-------

Licensed under the GNU GPL v3. See the `LICENSE` file for the full license
text.
playwright-har-tracer 0.3.2
A Python implementation version of Playwright's HAR tracer
Requires Python: >=3.8,<4.0

# playwright-har-tracer

[![PyPI version](https://badge.fury.io/py/playwright-har-tracer.svg)](https://badge.fury.io/py/playwright-har-tracer)
[![Python CI](https://github.com/ninoseki/playwright-har-tracer/actions/workflows/test.yml/badge.svg)](https://github.com/ninoseki/playwright-har-tracer/actions/workflows/test.yml)
[![Coverage Status](https://coveralls.io/repos/github/ninoseki/playwright-har-tracer/badge.svg?branch=main)](https://coveralls.io/github/ninoseki/playwright-har-tracer?branch=main)

A Python implementation version of Playwright's HAR tracer.
It is equivalent to playwright `v0.13.x`’s HAR tracer implementation.

## Motivation

Playwright's HAR tracer is implemented to generate HAR as a file. I need to get HAR as a Python object rather than a file.

- `playwright-har-tracer`'s HarTracer generates HAR as a dataclass object.

## ⚠️ Limitations

- Tested with Python 3.8+
- Tested with Chromium only
- Supports the async API only

## Installation

```bash
pip install playwright-har-tracer
```

## Usage

```python
import asyncio
from playwright.async_api import async_playwright
from playwright_har_tracer import HarTracer


async def main():
    async with async_playwright() as p:
        browser = await p.chromium.launch()
        context = await browser.new_context()

        tracer = HarTracer(context=context, browser_name=p.chromium.name)

        page = await context.new_page()

        await page.goto("http://whatsmyuseragent.org/")

        har = await tracer.flush()

        await context.close()
        await browser.close()

    print(har.to_json())


asyncio.run(main())
```