Metadata-Version: 2.4
Name: wpr-http
Version: 0.2.0
Summary: Standalone HTTP client using version-selected Firefox Necko/NSS Workers
License: MPL-2.0-compatible client; see runtime bundle notices
Project-URL: Repository, https://github.com/childclm/wpr-http
Project-URL: Documentation, https://github.com/childclm/wpr-http/blob/main/README.md
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: wpr-runtime-core<0.3,>=0.2.0

# WPR HTTP

Standalone HTTP requests using real, version-selected Firefox Necko/NSS network
Workers. Installing this package does not install the WPR browser client.
The native runtime is downloaded separately and remains centrally built.

```python
import asyncio
from wpr_http import AsyncClient

async def main():
    async with AsyncClient(firefox_version="155") as client:
        response = await client.get("https://www.baidu.com/")
        async with response:
            response.raise_for_status()
            print(response.status_code, await response.atext())

asyncio.run(main())
```

`firefox_version` selects a genuine installed Gecko network engine, not a
User-Agent string or a simulated browser. Only Firefox 155 is currently built
and supported. Selecting another version raises an explicit compatibility error;
it never silently uses 155. Different installed engine versions use separate
runtime/profile locations and separate Worker processes.

Runtime installation and supported versions:

```powershell
python -m wpr_http runtimes
python -m wpr_http install-runtime --version 155
```

An explicit `runtime_home` can select another verified runtime installation.
Existing `AsyncWprHttpClient`, Request/Response/Timeout and exception names remain
available. `WprHttpClient` remains the historical asynchronous alias.

The native network runtime is a separate download from the private
`childclm/gecko-web-runtime` Release. Installation needs access to that repository. Set
`WPR_GITHUB_TOKEN` or `GH_TOKEN`, or use Git Credential Manager, then run
`python -m wpr_http install-runtime --version 155`.
