Python package which builds on pypac to add pac file support for httplib2 Http
Project description
pypac4http2
Python package which builds on pypac to add pac file support for httplib2 Http
This package adds proxy auto configure pac support to the httplib2 library Http classby sub-classing the class and adding a new constructor parameter for a resolver class.
Installation
pip install pypac4http2
Usage
HttpPac Class
The HttpPac class extends httplib2.Http and automatically resolves the proxy for each request using a PAC file.
from pypac4http2 import HttpPac
# Automatically discover PAC using OS settings or WPAD
http = HttpPac()
response, content = http.request("http://example.org")
# Or specify a PAC URL
http = HttpPac(pac_url="http://internal.corp/proxy.pac")
response, content = http.request("http://example.org")
CLI Tool
The package includes a CLI tool pypac4http2 to resolve proxies for a given URL.
# Resolve proxy using OS auto-discovery
pypac4http2 https://google.com
# Resolve proxy using a specific PAC URL
pypac4http2 --pac-url http://example.com/proxy.pac https://google.com
Output Example:
Proxy choice: PROXY proxy.example.com:8080
{
"target_url": "https://google.com",
"pac_result": "PROXY proxy.example.com:8080",
"proxy_info": {
"proxy_type": "HTTP",
"proxy_host": "proxy.example.com",
"proxy_port": 8080
}
}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pypac4http2-0.0.0.tar.gz.
File metadata
- Download URL: pypac4http2-0.0.0.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2035a7ec1ee0c3ddc2031aeb20fb3219794ee38aa20122cc11fc0cab6ca8fff7
|
|
| MD5 |
19b8e10274c1ffc46ae36968f707a547
|
|
| BLAKE2b-256 |
a33483cac1458a817157d905fbb0a1ad5e418f027d8c151d65a0a4a252ece137
|
Provenance
The following attestation bundles were made for pypac4http2-0.0.0.tar.gz:
Publisher:
publish.yml on MikeMoore63/pypac4http2
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pypac4http2-0.0.0.tar.gz -
Subject digest:
2035a7ec1ee0c3ddc2031aeb20fb3219794ee38aa20122cc11fc0cab6ca8fff7 - Sigstore transparency entry: 850141255
- Sigstore integration time:
-
Permalink:
MikeMoore63/pypac4http2@4a99beedfffba94527b2abfaf5d71d38874c1ad1 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/MikeMoore63
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4a99beedfffba94527b2abfaf5d71d38874c1ad1 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pypac4http2-0.0.0-py3-none-any.whl.
File metadata
- Download URL: pypac4http2-0.0.0-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e92ac3c6e899ef19a1f864f7152509dd94c2d535aac67c7ab351952dfd23b9e3
|
|
| MD5 |
b5c390ccb2b240f4ec59527151205ad6
|
|
| BLAKE2b-256 |
1fe468983ce4c9db28086799640be121c0f329af52b82a07d311e95db7c03d60
|
Provenance
The following attestation bundles were made for pypac4http2-0.0.0-py3-none-any.whl:
Publisher:
publish.yml on MikeMoore63/pypac4http2
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pypac4http2-0.0.0-py3-none-any.whl -
Subject digest:
e92ac3c6e899ef19a1f864f7152509dd94c2d535aac67c7ab351952dfd23b9e3 - Sigstore transparency entry: 850141259
- Sigstore integration time:
-
Permalink:
MikeMoore63/pypac4http2@4a99beedfffba94527b2abfaf5d71d38874c1ad1 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/MikeMoore63
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4a99beedfffba94527b2abfaf5d71d38874c1ad1 -
Trigger Event:
release
-
Statement type: