🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

impit

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

impit

A library for making HTTP requests through browser impersonation

0.2.3
PyPI
Maintainers
2

impit for Python

impit is a Python package that provides bindings for the impit library.

It allows you to switch the TLS fingerprints and the HTTP headers of your requests, while still using the same API as httpx or requests.

Installation

pip install impit

Compatibility

Operating SystemArchitecturelibc implementationPrebuilt wheels available on PyPI
Linuxx86_64glibc
Linuxx86_64musl
macOSx86_64N/A
Windowsx86_64N/A
macOSarm64N/A
Windowsarm64N/A
Linuxarm64musl
Linuxarm64glibc❌*

*The prebuilt binaries for Linux on arm64 with glibc are WIP and not available as prebuilt wheels on PyPI yet. You can build the package from sources in this repository.

Usage

import asyncio
from impit import AsyncClient

async def main():
    impit = AsyncClient(http3=True, browser='firefox')

    response = await impit.get(
        "https://example.com",
    );

    print(response.status_code)
    print(response.text)
    print(response.http_version)

asyncio.run(main())

Impit implements the HTTPX client interface, so you can use it as a drop-in replacement for httpx.AsyncClient. Note that the implementation is partial and some features may not be supported yet.

Keywords

apify

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts