Skip to main content

proxy-watch

The operating system's proxy settings for Python, layered with http_proxy, https_proxy, all_proxy and no_proxy, and the route each URL takes under them. Windows, macOS and Linux (GNOME, KDE) settings are read directly; nothing is spawned.

pip install proxy-watch
import proxy_watch

snapshot = proxy_watch.read()
route = snapshot.route("https://example.com/")
if route.kind == "steps":
    print(route.steps)  # ["direct"] or proxy URLs, credentials included
else:
    print(route.kind)   # "pac", "pac-inline" or "wpad": the caller runs the script

PAC

route(url, pac=...) chooses who runs a PAC configuration:

pac Engine
"none" (default) No engine: the route names the PAC URL, script or WPAD
"native" The OS's engine (WinHTTP, CFNetwork), with real DNS
"quickjs" QuickJS in this process, under a PacPolicy
"auto" The OS's engine where it has one for the mode, else QuickJS

script= runs a PAC body you fetched yourself, and wpad=True lets the OS discover one (Windows, macOS). route.engine says which engine answered. QuickJS's default policy answers as if off every network (myIpAddress() is 127.0.0.1 and dnsResolve answers None), so a script that picks a proxy by network needs a PacPolicy that says where the machine is.

Watching

with proxy_watch.watch(lambda err, snapshot: print(err or snapshot.route("https://example.com/").kind)) as watcher:
    ...

on_change runs on the watch's own thread after each change.

Wheels

One abi3 wheel per platform serves CPython 3.10 and later: Linux x86-64 and AArch64 (manylinux2014 and musllinux 1.2), macOS x86-64 and arm64, Windows x86-64 and ARM64. QuickJS is built into each of them.

License

MIT OR Apache-2.0. Each wheel carries THIRD-PARTY-LICENSES.txt for the Rust crates, the C sources and the Rust standard library linked into it.

Metadata

Release files for proxy-watch 0.1.0

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

Built distributions (wheels)

Table of built distributions (wheels) for proxy-watch 0.1.0
File
proxy_watch-0.1.0-cp310-abi3-win_arm64.whl CPython 3.10 abi3 Windows ARM64 Details
proxy_watch-0.1.0-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details
proxy_watch-0.1.0-cp310-abi3-musllinux_1_2_x86_64.whl CPython 3.10 abi3 Linux musl 1.2+ x86-64 Details
proxy_watch-0.1.0-cp310-abi3-musllinux_1_2_aarch64.whl CPython 3.10 abi3 Linux musl 1.2+ ARM64 Details
proxy_watch-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details
proxy_watch-0.1.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details
proxy_watch-0.1.0-cp310-abi3-macosx_11_0_x86_64.whl CPython 3.10 abi3 macOS 11.0+ x86-64 Details
proxy_watch-0.1.0-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details

Total release size: 9.9 MB

Release files / proxy_watch-0.1.0-cp310-abi3-win_arm64.whl

Download URL proxy_watch-0.1.0-cp310-abi3-win_arm64.whl
Size 999.5 kB
Tags CPython 3.10 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
d30a9e77b05320d1d0da4777f8d15f00d9bb3103dbf8687e2b6f298c38057d4a
BLAKE2b-256 checksum
How to use checksums
44e00403b4a31613bb381497e8ebda7ff73ad317b722d908ff8ffa74886202fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / proxy_watch-0.1.0-cp310-abi3-win_amd64.whl

Download URL proxy_watch-0.1.0-cp310-abi3-win_amd64.whl
Size 1.1 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
68d2e020fb67b1bb44e39be676afeb24d6222f64af72ac36cbdc630b0699fd75
BLAKE2b-256 checksum
How to use checksums
cba3f21926265c477bc9432ae915270dd76eac484f6d91db2deb5ffceeedbcea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / proxy_watch-0.1.0-cp310-abi3-musllinux_1_2_x86_64.whl

Download URL proxy_watch-0.1.0-cp310-abi3-musllinux_1_2_x86_64.whl
Size 1.4 MB
Tags CPython 3.10 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
2fe8d5e33600519b21e451f4982a813e5b10541d5c7234f21fe9c71b1962118b
BLAKE2b-256 checksum
How to use checksums
f5eeca3fa395918545e05fee09a117b45d9919bafdaab220d5dd533336866754
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / proxy_watch-0.1.0-cp310-abi3-musllinux_1_2_aarch64.whl

Download URL proxy_watch-0.1.0-cp310-abi3-musllinux_1_2_aarch64.whl
Size 1.3 MB
Tags CPython 3.10 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
7840d5af0bbbaa9ba446b774c0ae8832316544e1255eda03c29cca686f91c34d
BLAKE2b-256 checksum
How to use checksums
0b8280b47fe55649b29061e506b52981bb2147a7592db84514c8551cdf8a4d78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / proxy_watch-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL proxy_watch-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.4 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
ed2a9ad028ffe06c954686d45366bdbd0e42a80961a41211988bba333850e6b0
BLAKE2b-256 checksum
How to use checksums
45abedf753e36bff16eb6a56f5a182a63411c517f56c1eea6fd2814d26ae4eba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / proxy_watch-0.1.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL proxy_watch-0.1.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 1.3 MB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
c33459a64ebcd49858274ade75085d4ccedb3b2fa4ec9e467bc24666b023148f
BLAKE2b-256 checksum
How to use checksums
321299df2ff0a37db451370d4eed10644bcfb3b1ad4235e484802a838f445088
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / proxy_watch-0.1.0-cp310-abi3-macosx_11_0_x86_64.whl

Download URL proxy_watch-0.1.0-cp310-abi3-macosx_11_0_x86_64.whl
Size 1.3 MB
Tags CPython 3.10 abi3 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
a5a6c4400561ed11995e1ae1903f1648d0ee4ae11931431aa7cdd20554a3842f
BLAKE2b-256 checksum
How to use checksums
0ee34a59152b8b8fc0798b2db39b3775dbbd4578c60b984a0f9f63795a863e17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / proxy_watch-0.1.0-cp310-abi3-macosx_11_0_arm64.whl

Download URL proxy_watch-0.1.0-cp310-abi3-macosx_11_0_arm64.whl
Size 1.2 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
690ace28a2125bbece8b5e1cf57cfc69b229fe7332703645d93c84f680e779f8
BLAKE2b-256 checksum
How to use checksums
d0b130a052809c3aeb7e4582f66597a8a38f54a050a4693f060be45236c8f692
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

0.2.1

18 release files

This release

0.1.0 This release

8 release files

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