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, not through a
helper command.
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
def on_change(err, snapshot):
if err:
print(err)
else:
print(snapshot.route("https://example.com/").kind)
with proxy_watch.watch(on_change) 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.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 23.1 MB
Release files / proxy_watch-0.2.1-cp314-cp314t-win_arm64.whl
| Download URL | proxy_watch-0.2.1-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 |
f8a8ed4267dfec44f38c5c6ee99eac27529e253469ab428181d8dac208bd0cb1
|
|
BLAKE2b-256 checksum How to use checksums |
8b5743142d0b202d4489eb71ae29bf6ac6d21eeba05078f2fba941afe30f733e
|
| 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.1-cp314-cp314t-win_amd64.whl
| Download URL | proxy_watch-0.2.1-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 |
159f6b8ef030670053e705461f8ef556d84aaa3da3fdbad88164138c3275ff2b
|
|
BLAKE2b-256 checksum How to use checksums |
398a850a39b2df272c7a288b23935a6d4b3d6d90ac2355937f528fd97ac6d34d
|
| 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.1-cp314-cp314t-musllinux_1_2_x86_64.whl
| Download URL | proxy_watch-0.2.1-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 |
4fd824c24b5f8d8ba4c44bee7026dbc46ebe3eb2dadc3b7508e21122482fa37d
|
|
BLAKE2b-256 checksum How to use checksums |
d132fc8cd85261ba3f259b5881627c22aa272fa5181691eb10084a851e6262c8
|
| 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.1-cp314-cp314t-musllinux_1_2_aarch64.whl
| Download URL | proxy_watch-0.2.1-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 |
24372a72f1cdff8c3fae5bbd341123c7bce44d3b30dbee2281e12097636bbe8c
|
|
BLAKE2b-256 checksum How to use checksums |
b4d0e39c1c50982e1e3ef3bba83b357c310e06d78a457508452c30507376c89d
|
| 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.1-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | proxy_watch-0.2.1-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 |
001c1167f04dff2c16f80ac51bcd254e51963dc66f1fa1fc31f3a39220345c4b
|
|
BLAKE2b-256 checksum How to use checksums |
5f9454686124e794899f1b682a8ec005ba0fc50be1e018d7dc6d1d255c3d16f6
|
| 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.1-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
| Download URL | proxy_watch-0.2.1-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 |
9114c0c8ab9075551e90e6a4274e0eb6916f214d213a85b90525df927756da30
|
|
BLAKE2b-256 checksum How to use checksums |
7dc488be70e26d28ed4f73d6608598d2f8b668d23f263dd3b0971998d73fd6ba
|
| 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.1-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | proxy_watch-0.2.1-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 |
d69a720a835342ed0061f0463a288930260e9eab6b64b43b7410654b6577e752
|
|
BLAKE2b-256 checksum How to use checksums |
14324b069ec6dd95e9c467cbdb292956c9ff6b8640be30b0ff72b9f32c2b9d31
|
| 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.1-cp314-cp314t-macosx_11_0_x86_64.whl
| Download URL | proxy_watch-0.2.1-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 |
b2d9cf859436d400c56467be79e57637b3b3f597a714549776dd6f444007ee21
|
|
BLAKE2b-256 checksum How to use checksums |
07d36704b275b40e9b6e9677d5173f78d163304ed5c62992a67f0071128f86c0
|
| 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.1-cp314-cp314t-macosx_11_0_arm64.whl
| Download URL | proxy_watch-0.2.1-cp314-cp314t-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
f4ff03e9a901ff3a8f93e30df68d5e471006282164b1b6fd39cc10fe4c07f0e5
|
|
BLAKE2b-256 checksum How to use checksums |
68d0dd1154c517955a6ef6abfcf37126df2df0900d438a43ac345f6f54501e56
|
| 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.1-cp310-abi3-win_arm64.whl
| Download URL | proxy_watch-0.2.1-cp310-abi3-win_arm64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.10 Windows ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
d90ab6a8dae5026a5453f1347bc4f23dae7a75cc9878bbff93ce8e8f7bd17f28
|
|
BLAKE2b-256 checksum How to use checksums |
0b30a829cf80dcd1e46c5b68347c899945fa7945637c356cf716020679cb0bd9
|
| 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.1-cp310-abi3-win_amd64.whl
| Download URL | proxy_watch-0.2.1-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
dcee6f762a354ef4fafc1acd8753c1a223665d9f4fe2335d805e02030d1dd465
|
|
BLAKE2b-256 checksum How to use checksums |
9e685739a584f21a274b5b0ca85b9057441f67944ab1b9ff162c456058070992
|
| 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.1-cp310-abi3-musllinux_1_2_x86_64.whl
| Download URL | proxy_watch-0.2.1-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 |
9110d40ce89a9c1ed8645907cd84c262b66aa05de64e730de1049a85cd0c1c79
|
|
BLAKE2b-256 checksum How to use checksums |
c9698c935d24048e4aabdbe872aa613aaaf0894498a2e40bcf8eb8005c3a6bd8
|
| 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.1-cp310-abi3-musllinux_1_2_aarch64.whl
| Download URL | proxy_watch-0.2.1-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 |
6ae0f2a3a4d1a37b66c04223e8fc6c31b2fd769b9b397aaa5483cba4d7e9a207
|
|
BLAKE2b-256 checksum How to use checksums |
da2dd208226bd79f6c1faf120bbceb55ec2618d10c8436a8f251be2352bd3506
|
| 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.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | proxy_watch-0.2.1-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 |
3685c173f47b1e8ff77f5039cea9d62ba42c3c2d79219a6ddd199c982c238d3f
|
|
BLAKE2b-256 checksum How to use checksums |
d59cf1fd696d0f16d1aa4ccde4a21ed7033d64aff30b944e6558a8815383790c
|
| 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.1-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
| Download URL | proxy_watch-0.2.1-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 |
0dc52bf1961f503c825772c9114282d394f6feafd06e734fecbb197d0e2a675e
|
|
BLAKE2b-256 checksum How to use checksums |
4ffacf7e544123a7513f2844e761cfc87e524678e4eabe6bfac3cd1803768bab
|
| 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.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | proxy_watch-0.2.1-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 |
340c2aaacf0c9e0e394a17f747f1854a4e983c4917e3c1c0f46f569b565dc9d0
|
|
BLAKE2b-256 checksum How to use checksums |
7dd9823d9fc1678168c304e679adf6a60a8dc81c06ea4e8d04bc569c202b5e03
|
| 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.1-cp310-abi3-macosx_11_0_x86_64.whl
| Download URL | proxy_watch-0.2.1-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 |
71edb69c54c3bb39cf0cc153a6c05e8440e5b9d3640bd9d34628505d1bfec91e
|
|
BLAKE2b-256 checksum How to use checksums |
0c87478adae7edf4fc159f37a10cecc78691e46825033c00b22cef9af46288c8
|
| 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.1-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | proxy_watch-0.2.1-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 |
17a7f65a579efea2d54707111ada02f3495ba3d37c454394c68742a922ed34d6
|
|
BLAKE2b-256 checksum How to use checksums |
7a574fa37e0200b481bff6de70929aef347808417f3cc7a86940bb3ca4465ee4
|
| 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}
|