Registry / http-networking / impit
library0.14.0pypypi✓ verified 23d ago

Impit is a high-performance Python library that provides bindings for a Rust-based HTTP client, enabling browser-like TLS fingerprints, automatic HTTP header ordering, and support for HTTP/2 and HTTP/3. It offers an API similar to popular Python HTTP libraries like httpx and requests, making it suitable for web scraping and applications requiring advanced browser impersonation to avoid detection. The current version is 0.12.0, with an active release cadence for both its Python and Node.js bindings.

pip install impit
INSTALL
IMPORT
SIG · IMPIT
I
impit
http-networkingpythonv0.14.0
Install
1.8s avg
Import
159ms
Disk
26MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.14.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.160s · 27.2MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.8s · import 0.158s · 27MB
26MB installed
● package 26MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AsyncClient
from impit import AsyncClient
Client
from impit import Client
For synchronous use cases, analogous to httpx.Client.

This quickstart demonstrates how to initialize an `AsyncClient` and make an asynchronous GET request, mimicking a Firefox browser. It highlights common client configuration options and basic response handling. Remember to close the client using `await client.aclose()` to release resources.

import asyncio from impit import AsyncClient async def main(): # Initialize AsyncClient with browser impersonation settings # Options for 'browser': 'chrome', 'firefox' # http3=True enables HTTP/3 support client = AsyncClient(http3=True, browser='firefox') # Make an asynchronous GET request try: response = await client.get("https://example.com") response.raise_for_status() # Raise an exception for bad status codes print(f"Status Code: {response.status_code}") print(f"HTTP Version: {response.http_version}") print("Response content (first 200 chars):\n" + response.text[:200]) except Exception as e: print(f"An error occurred: {e}") finally: await client.aclose() # Ensure the client is closed if __name__ == "__main__": asyncio.run(main())
Debug
Known issues
gotchaIn version 0.12.0, the behavior of `timeout=None` for Python bindings was updated. Passing `timeout=None` now explicitly disables the timeout for a client or request, aligning with `httpx`'s behavior. Previous versions might have implicitly applied a default timeout when `None` was used.
fix
Explicitly use a specific `timeout` value (e.g., `timeout=10.0`) if a timeout is desired, or be aware that `timeout=None` will result in no timeout being applied.
affects: >=0.12.0
gotchaImpit's Python implementation partially mirrors the `httpx` client interface, but some advanced features or edge cases present in `httpx` might not yet be fully supported. Users expecting full API parity should consult the documentation for specific feature availability.
fix
Always refer to the official Impit Python documentation for supported features and behavior, especially when migrating from or integrating with `httpx`.
affects: All versions
gotchaPrebuilt wheels for specific Linux architectures (e.g., `arm64` with `glibc`) might not be available on PyPI. In such cases, the package will need to be built from source, which requires a `Maturin` setup and Rust toolchain.
fix
Check the PyPI page for `impit` under 'Download files' to see available wheels for your platform. If not available, ensure you have Rust and `maturin` installed to build from source (`pip install maturin && pip install impit --no-binary :all:`).
affects: All versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'impit'
The 'impit' package is not installed in your Python environment.
fix
pip install impit
ImportError: cannot import name 'AsyncClient' from 'impit'
The specific class or function being imported is either misspelled or not exposed directly at the top level of the 'impit' package, or its location has changed.
fix
Check the official Impit Python documentation for the correct import paths and class names. For 'AsyncClient' and 'Browser', the correct import is typically `from impit import AsyncClient, Browser`.
ERROR: Failed building wheel for impit (or similar build-related errors during pip install)
Prebuilt binary wheels for your specific operating system and Python architecture might not be available on PyPI, and your system lacks the necessary Rust toolchain and 'maturin' to build 'impit' from source.
fix
Ensure you have Rust and `maturin` installed. First, install `maturin` (`pip install maturin`), then try installing `impit` again. If it still fails, explicitly try building from source with `pip install impit --no-binary :all:`.
AttributeError: 'AsyncClient' object has no attribute 'some_non_existent_method'
You are attempting to call a method or access an attribute that does not exist on the 'AsyncClient' object (or other impit objects). This often happens when users assume full API parity with libraries like httpx or requests, which impit only partially mirrors.
fix
Consult the official Impit Python documentation to verify the available methods and attributes for the 'AsyncClient' class and ensure correct usage.
Unexpected behavior with timeout=None (e.g., request hangs indefinitely)
In impit version 0.12.0, setting `timeout=None` explicitly disables the timeout, rather than applying a default timeout, which might be different from previous versions or other HTTP libraries.
fix
If a timeout is desired, explicitly provide a numeric timeout value (e.g., `timeout=10.0`). If indefinite waiting is indeed the intention, `timeout=None` is the correct setting.
Upgrade
Version history
0.14.0latest on PyPI · released Aug 25, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
11 hits · last 30 days
node
10
Resources
impit — pip install impit · libregistry