# pydoh

> Zero-dependency DNS-over-HTTPS resolver for Python. Ships a simple resolve() function and an optional socket.getaddrinfo patch that makes any existing Python networking code (requests, aiohttp, anything on sockets) resolve over DoH transparently.

Pure standard library, uses http.client and ssl for the HTTPS leg. Falls back across Cloudflare, Google, and Quad9 if one is unreachable. Typed (py.typed), supports Python 3.10 through 3.13.

## Docs

- [README](https://github.com/ImSavsis/pydoh/blob/master/README.md): install, usage, feature list
- [src/pydoh/resolver.py](https://github.com/ImSavsis/pydoh/blob/master/src/pydoh/resolver.py): core resolve logic with provider fallback and caching
- [src/pydoh/patch.py](https://github.com/ImSavsis/pydoh/blob/master/src/pydoh/patch.py): socket.getaddrinfo monkeypatch
- [src/pydoh/wire.py](https://github.com/ImSavsis/pydoh/blob/master/src/pydoh/wire.py): minimal DNS wire format encode/decode

## Notes

- No DNSSEC validation
- Assumes DNS responses fit in a single HTTPS body, no multi-message TCP-style fragmentation handling
