Metadata-Version: 2.4
Name: never_safari
Version: 0.1.1
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Intended Audience :: Developers
Summary: Send local HTTP requests with a byte-exact macOS Safari 26.5 network fingerprint (TLS/HTTP2/HPACK/headers).
Keywords: safari,tls,http2,fingerprint,ja4,anti-detection,scraping
Author: never_safari contributors
License: MIT
Requires-Python: >=3.9
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Repository, https://github.com/neverl805/never_safari

# never_safari (Python)

Send local HTTP requests with a **byte-exact macOS Safari 26.5 network
fingerprint** — TLS ClientHello (JA3/JA4), HTTP/2 (SETTINGS/WINDOW_UPDATE/
pseudo-header order), HPACK (Huffman + dynamic table), request-header order,
download flow-control cadence, and TLS-record framing — like `curl_cffi`, but for
Safari. Built on a patched BoringSSL + a from-scratch HTTP/2 layer.

## Install

```sh
pip install never_safari          # prebuilt wheels: macOS / Linux / Windows
# or from source (needs cmake, go, ninja, a C/C++ compiler):
pip install maturin && maturin develop -m crates/safari-py/Cargo.toml
```

## Use

```python
import never_safari

# A reusable client keeps cookies + connections (like a browser).
s = never_safari.Client()
r = s.get("https://tls.peet.ws/api/all")
print(r.status, r.ok)
print(r.json()["tls"]["ja4"])       # t13d2013h2_a09f3c656075_7f0f34a4126d

# POST with JSON + custom headers
r = s.post("https://api.example.com/v1/items",
           json=b'{"name":"x"}',
           headers={"authorization": "Bearer TOKEN"},
           referer="https://api.example.com/app")
print(r.status, r.text)

# Options
s = never_safari.Client(
    ios=False,            # iOS Safari 26 profile (no post-quantum MLKEM768)
    proxy="http://user:pass@host:8080",
    multiplex=True,       # browser-style: concurrent requests share one connection
    read_timeout=30.0,
    connect_timeout=10.0,
    max_redirects=10,
)

# One-shot helpers (throwaway client)
never_safari.get("https://example.com")
never_safari.user_agent()
```

`Response`: `.status`, `.ok`, `.headers` (dict), `.content` (bytes, decoded),
`.text`, `.json()`, `.resumed`, `.url`.

`Client`: `.get/.post/.request`, `.clear_cookies()`, `.clear_pool()`,
`.clear_session()`, `.idle_connections`.

The network call releases the GIL, so many Python threads can crawl concurrently.

See the [project README](https://github.com/neverl805/never_safari) for the full
fingerprint details and scope.

