Skip to main content

requests-wininet

PyPI version

A transport adapter for Python's requests library that uses the Windows WinINet API. This allows Python HTTP(S) requests to leverage the same proxy, authentication, and network stack as Internet Explorer and other native Windows applications. This is designed for GUI applications that need to use the same client certificates and proxy settings as the user's Windows environment.

Features

  • Seamless integration with the requests library
  • Provides integrated support for existing windows client certificates, similar to how Chrome and Edge handle them
  • Drop-in replacement for the default requests transport adapter
  • Uses Windows WinINet for HTTP/HTTPS
  • Supports system proxy settings and authentication dialogs
  • Handles chunked transfer encoding and streaming responses
  • Python 3.13+

Requirements

  • Windows OS
  • Python >= 3.13
  • requests >= 2.32.3, <3.0.0

Installation

pip install requests-wininet

Or with Poetry:

poetry add requests-wininet

Usage

import requests
from requests_wininet import WinINetAdapter

session = requests.Session()
session.mount("http://", WinINetAdapter())
session.mount("https://", WinINetAdapter())

response = session.get("https://example.com")
print(response.status_code)
print(response.headers)
print(response.text)

Development & Testing

  • Clone the repository and install dependencies:
    poetry install
    
  • Run tests:
    poetry run pytest
    
  • Run code coverage:
    poetry run coverage run -m pytest
    poetry run coverage report
    

License

APACHE-2.0

Author

Curtis Ruck (ruckc@users.github.com)

Metadata

Release files for requests-wininet 0.1.7

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

Source distribution (sdist)

Source distribution for requests-wininet 0.1.7
File Size Uploaded Provenance Actions
requests_wininet-0.1.7.tar.gz 7.2 kB Without provenance Details for requests_wininet-0.1.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for requests-wininet 0.1.7
File Interpreter ABI Platform Actions
requests_wininet-0.1.7-py3-none-any.whl Python 3 none any Details for requests_wininet-0.1.7-py3-none-any.whl

Total release size: 14.5 kB

Release files / requests_wininet-0.1.7.tar.gz

Download URL requests_wininet-0.1.7.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
fd624548a461deaaf9327ba05be66e6691dde312377e08a1979a6581be593a52
BLAKE2b-256 checksum
How to use checksums
22f923cd0c15037eeae990ba3acb68059fe8bd78b4979cba6dcd48f46e26b281
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.3 CPython/3.13.5 Windows/2022Server

Release files / requests_wininet-0.1.7-py3-none-any.whl

Download URL requests_wininet-0.1.7-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7a57103ef2492c811bd37ba3b6fcf898f0655d91fe805cb38d2e5b7f2ce9653a
BLAKE2b-256 checksum
How to use checksums
1ad3a923b3cedabf5c3c3cf16fbb9d560e48ec305d621c4723ed568351027483
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.3 CPython/3.13.5 Windows/2022Server

Security for requests-wininet 0.1.7

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