Skip to main content

Warpsock

Python bindings for the Warpsock HTTP client with TLS, HTTP/2, HTTP/3, RFC 6455 WebSocket, and RFC 8441 Extended CONNECT support.

Supported Chrome fingerprints are warpsock.FingerprintProfile.Chrome142 through warpsock.FingerprintProfile.Chrome148. Supported Firefox fingerprints are warpsock.FingerprintProfile.Firefox133 through warpsock.FingerprintProfile.Firefox151, plus ESR branches FirefoxEsr115, FirefoxEsr128, and FirefoxEsr140; examples use Chrome148, the latest implemented Chrome profile.

Installation

pip install warpsock

HTTP

Synchronous HTTP:

import warpsock

builder = warpsock.SyncClient.builder()
builder.fingerprint(warpsock.FingerprintProfile.Chrome148)
client = builder.build()

response = client.get("https://example.com/").send()
print(response.status)
print(response.text())

Async HTTP:

import warpsock

builder = warpsock.AsyncClient.builder()
builder.fingerprint(warpsock.FingerprintProfile.Chrome148)
client = builder.build()

response = await client.get("https://example.com/").send()
print(response.status)
print(response.text())

RFC 6455 WebSockets

import warpsock

builder = warpsock.Client.builder()
builder.cookie_store(True)
client = builder.build()

ws_builder = client.websocket("wss://example.com/socket")
ws_builder.subprotocol("chat.v1")
ws = await ws_builder.connect()

await ws.send_text("hello")
message = await ws.next()
await ws.close(warpsock.CloseFrame(warpsock.CLOSE_NORMAL, "done"))

RFC 8441 HTTP/2 Tunnels

import warpsock

builder = warpsock.Client.builder()
builder.http2_prior_knowledge(True)
client = builder.build()

tunnel = await client.websocket_h2("https://example.com/h2-tunnel").connect()
await tunnel.send_bytes(b"raw bytes", end_stream=False)
data = await tunnel.recv_bytes()
await tunnel.close_send()

RFC 6455 framed WebSockets and RFC 8441 raw HTTP/2 tunnels are separate APIs by design.

License

MIT

Metadata

Release files for warpsock 4.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for warpsock 4.3.2
File Size Uploaded Provenance Actions
warpsock-4.3.2.tar.gz 2.5 MB Without provenance Details for warpsock-4.3.2.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for warpsock 4.3.2
File Actions
warpsock-4.3.2-cp310-abi3-manylinux_2_28_x86_64.whl CPython 3.10 abi3 Linux glibc 2.28+ x86-64 Details for warpsock-4.3.2-cp310-abi3-manylinux_2_28_x86_64.whl
warpsock-4.3.2-cp310-abi3-manylinux_2_28_aarch64.whl CPython 3.10 abi3 Linux glibc 2.28+ ARM64 Details for warpsock-4.3.2-cp310-abi3-manylinux_2_28_aarch64.whl
warpsock-4.3.2-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for warpsock-4.3.2-cp310-abi3-macosx_11_0_arm64.whl
warpsock-4.3.2-cp310-abi3-macosx_10_13_x86_64.whl CPython 3.10 abi3 macOS 10.13+ x86-64 Details for warpsock-4.3.2-cp310-abi3-macosx_10_13_x86_64.whl

Total release size: 33.3 MB

Release files / warpsock-4.3.2.tar.gz

Download URL warpsock-4.3.2.tar.gz
Size 2.5 MB
Tags Source
SHA-256 checksum
How to use checksums
b39bb0c2dc4042e945334f0a5e3de3f69a5e4a38302397a41caa7cb70e363cbe
BLAKE2b-256 checksum
How to use checksums
8cdb4d768e27e2276de6bba5f502808ca0f5340b4f53ce4a12c653bc71eef004
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / warpsock-4.3.2-cp310-abi3-manylinux_2_28_x86_64.whl

Download URL warpsock-4.3.2-cp310-abi3-manylinux_2_28_x86_64.whl
Size 12.3 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
6ca4986839a2efdb6caf860607915b8004d13b652f3642642051808ae2c89353
BLAKE2b-256 checksum
How to use checksums
f6cac840290fc83c27ab352138610ce8a12f40b0b7da9d164fa2be16bed9cc91
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / warpsock-4.3.2-cp310-abi3-manylinux_2_28_aarch64.whl

Download URL warpsock-4.3.2-cp310-abi3-manylinux_2_28_aarch64.whl
Size 11.5 MB
Tags CPython 3.10 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
2e7db11849e4456fb7259d64109da24679bef13b06fc1e893bf7aed0c60d9595
BLAKE2b-256 checksum
How to use checksums
32e2a83ab6c1e7c7effac2bb30554e01f934bb08222568774a0e786d034925dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / warpsock-4.3.2-cp310-abi3-macosx_11_0_arm64.whl

Download URL warpsock-4.3.2-cp310-abi3-macosx_11_0_arm64.whl
Size 3.4 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
485ab11a9eac55e811d4f7c155a2bfc2ca8eefeceb6544192323eec9adb93350
BLAKE2b-256 checksum
How to use checksums
d25904c3fb4bc40080d2f3bf487e3dd729a95560a90686f7353fedc05bfcfe0e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / warpsock-4.3.2-cp310-abi3-macosx_10_13_x86_64.whl

Download URL warpsock-4.3.2-cp310-abi3-macosx_10_13_x86_64.whl
Size 3.6 MB
Tags CPython 3.10 abi3 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
ad7e478effb63a9d60496d07c66cea9627685bd9e92d3e87c68c2c5c66b29d94
BLAKE2b-256 checksum
How to use checksums
2878ad5ea4f11639428b4f520721be0c89c54f7bd305d99a38e8805d58b6f9ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for warpsock 4.3.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page