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
snapshot.to_dict() gives the whole configuration as dicts and lists: the mode in effect,
each proxy's host, port and credentials, the bypass rules, and every source's own mode.
repr() masks passwords; to_dict() holds them.
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), Linux ARMv7 (manylinux2014), macOS x86-64 and arm64,
Windows x86-64 and ARM64. QuickJS is built into each of them.
The free-threaded build has no stable ABI before 3.15, so CPython 3.14t takes a wheel of its
own on each of those platforms. The module runs without the GIL: importing it leaves
sys._is_gil_enabled() false. 3.13t is not supported.
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.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 22.9 MB
Release files / proxy_watch-0.2.0-cp314-cp314t-win_arm64.whl
| Download URL | proxy_watch-0.2.0-cp314-cp314t-win_arm64.whl |
|---|---|
| Size | 1.0 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading Windows ARM64 |
|
SHA-256 checksum How to use checksums |
61c5cfe112e156a94f5cde720f3ccbee05ea70add86ec3fbf63fbc567183074e
|
|
BLAKE2b-256 checksum How to use checksums |
3d85b7128a6ef1f5347b583b87096ca6fec2da3c692d7f9393c48179d2c8c204
|
| 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.2.0-cp314-cp314t-win_amd64.whl
| Download URL | proxy_watch-0.2.0-cp314-cp314t-win_amd64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading Windows x86-64 |
|
SHA-256 checksum How to use checksums |
a422b43bf3c4f985c8793316d9590a8317c0991212ec712c2db9cfc2b9a795e1
|
|
BLAKE2b-256 checksum How to use checksums |
5dbab8f58271718797abe11d569e3b5f95790638226920e7a9337acf885b2832
|
| 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.2.0-cp314-cp314t-musllinux_1_2_x86_64.whl
| Download URL | proxy_watch-0.2.0-cp314-cp314t-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
b0a48ea738fd072c63a5125fe23a4fea2d3e5c66dd1b8f9007e1ff5bd26fc442
|
|
BLAKE2b-256 checksum How to use checksums |
5f5e29c4217672c0b991ac36f4c728f6a3a519e5e4593aebab1ab12384c6b82a
|
| 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.2.0-cp314-cp314t-musllinux_1_2_aarch64.whl
| Download URL | proxy_watch-0.2.0-cp314-cp314t-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading Linux musl 1.2+ ARM64 |
|
SHA-256 checksum How to use checksums |
4164b15e43dad17fc53312ac2d9199be371ce1cf29628fc62b5cb53ed015cdc7
|
|
BLAKE2b-256 checksum How to use checksums |
6a6dadd29ecc0a3a45b862ed61778c7c2c517df10374b447acb7ab762108d28c
|
| 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.2.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | proxy_watch-0.2.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
f5ee1993035d3ad0e1c4d3de3644c914136c8a90775c2f9f53b05aac96f8a92d
|
|
BLAKE2b-256 checksum How to use checksums |
bbba9bdc7ad91f6ffa789b96afbc20585120cfccf76ad9ad19f2310e2bd6f437
|
| 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.2.0-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
| Download URL | proxy_watch-0.2.0-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ ARMv7l |
|
SHA-256 checksum How to use checksums |
f172e027f83443c92a80a9d2652c01094a503113de16b087f68eb94d95a39c81
|
|
BLAKE2b-256 checksum How to use checksums |
68ab4f3a33af431706bd8258910dbd043c2fe1473d8e83815166457339189bc8
|
| 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.2.0-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | proxy_watch-0.2.0-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
4cfe41467fc97ea163326c9ab1995161e96ed4c60f67ebcebc4efda7303eba1e
|
|
BLAKE2b-256 checksum How to use checksums |
c010e2f287212dd1ab359b121f856d4b58feb69c9492f3f0c7743f1de59bfe29
|
| 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.2.0-cp314-cp314t-macosx_11_0_x86_64.whl
| Download URL | proxy_watch-0.2.0-cp314-cp314t-macosx_11_0_x86_64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading macOS 11.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
a9a52b4cac1ee9e76d71b02704ebc7a1650d46a06ae45c2a3362c3bfc1e9e283
|
|
BLAKE2b-256 checksum How to use checksums |
07d6456d48e9629a15ea651a68151d6bc19e072c8b3e0a166756ed942f8c1baa
|
| 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.2.0-cp314-cp314t-macosx_11_0_arm64.whl
| Download URL | proxy_watch-0.2.0-cp314-cp314t-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
c3ad931ade58022c4f1f521f86e939e38030610ddd6feccc85548e7e7786872c
|
|
BLAKE2b-256 checksum How to use checksums |
cfc43d9b5c26f6fa61a7bf9262aa070e9c6c300e0202f146b89f715f006e1ac4
|
| 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.2.0-cp310-abi3-win_arm64.whl
| Download URL | proxy_watch-0.2.0-cp310-abi3-win_arm64.whl |
|---|---|
| Size | 1.0 MB |
| Tags | CPython 3.10 Windows ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
b86f9048dc1770bb13ee28ba80f2b6646d34c787e9c95db743fdfb2a9ec795cf
|
|
BLAKE2b-256 checksum How to use checksums |
654948bd6795e64df9224c8727146197cc4373cd9ece7dd7cc752fedd44c6294
|
| 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.2.0-cp310-abi3-win_amd64.whl
| Download URL | proxy_watch-0.2.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 |
b36f3320b9ab1f35b250e89089ffb722da17180e727f70624aca1a3a34f5c4b0
|
|
BLAKE2b-256 checksum How to use checksums |
5375178ed767d2ac85432721c4e54ddb9b077110a3d12b5f17f23d8770920460
|
| 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.2.0-cp310-abi3-musllinux_1_2_x86_64.whl
| Download URL | proxy_watch-0.2.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 |
20deaa3cd1a020d29ffbc8163959105c145e5b7f87860429b2eaa9fd34cf631c
|
|
BLAKE2b-256 checksum How to use checksums |
5dec38faa471f0f7a5d2c465d0cbf2c44834a42e88292ff94bb9a1d6c16045c4
|
| 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.2.0-cp310-abi3-musllinux_1_2_aarch64.whl
| Download URL | proxy_watch-0.2.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 |
ffcf1d8395caa276fa8467bd2a664aca19252b199fe4966c48e100aa405ac5d6
|
|
BLAKE2b-256 checksum How to use checksums |
290074b774ebab33d73f668992ce09fbcbafa6469686b4600662af4dac44c46b
|
| 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.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | proxy_watch-0.2.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 |
02375543ab7da9e7229eae3f5291ee1cfbc56a879b8f2363e0caca89bfe407b1
|
|
BLAKE2b-256 checksum How to use checksums |
a072c67e73bfa092d9429ac53df6ef055cd4dc1673f456cf60effeeb0fb2c008
|
| 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.2.0-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
| Download URL | proxy_watch-0.2.0-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARMv7l abi3 |
|
SHA-256 checksum How to use checksums |
4427f13e38e6e1055795168396ea2c9d9c94e105e085bc62e630fd57e771793f
|
|
BLAKE2b-256 checksum How to use checksums |
a244f7a75cbc35b50802629fe7394a256230bdfc0eca6d056fbaf1587fe1dac3
|
| 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.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | proxy_watch-0.2.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 |
9b2494ae0f5f3402238f2a21010b3a27175eb0ba649aba7ca197166b3bb1ef84
|
|
BLAKE2b-256 checksum How to use checksums |
ef0108ce71490d7c20a48b5a6a8892ced40efd88f7adfcf58de36fe181fad375
|
| 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.2.0-cp310-abi3-macosx_11_0_x86_64.whl
| Download URL | proxy_watch-0.2.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 |
63e868f86f438080ff694787287f2cfa048cf57df8fb8450ab4293eb20bd6f98
|
|
BLAKE2b-256 checksum How to use checksums |
369aa7aaf2dff728aaef1b4a6431ca0adb661eace2f75687a1440954d422e33b
|
| 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.2.0-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | proxy_watch-0.2.0-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
b84a4ef19218c0df9a8207bc129fd828d75c33197bea6cb0bea53728a24a7681
|
|
BLAKE2b-256 checksum How to use checksums |
17edeb0fec1cb0e3e352612671c0a4c3d96f0b37866b659d7f753e7030843423
|
| 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}
|