Skip to main content
https://travis-ci.org/ZhukovAlexander/aio-doh.svg?branch=master

aio-doh

Is a tiny asynchronous client for Google’s Public DNS-over-HTTPS service. It is built on top of asyncio and aiohttp

Installation

pip install aio-doh

Example usage

>>> from doh import DOHClient
>>> from asyncio import get_event_loop
>>>
>>> loop = get_event_loop()
>>> client = DOHClient(loop)
>>> loop.run_until_complete(client.resolve('example.com'))
['93.184.216.34']
>>>

API

The API is simple and small

DOHClient.query(hostname, type, dnssec)

hostname - name of a target host; type - DNS record type for a query; dnssec - enable DNSSEC validation. Returns a complete DNS response as a python dictionary.

DOHClient.resolve(hostname, type, dnssec)

hostname - name of a target host; type - DNS record type for a query; dnssec - enable DNSSEC validation. Returns a list of IP adresses.

DOHClient.gethostbyname(hostname, type, dnssec)

hostname - name of a target host; type - DNS record type for a query; dnssec - enable DNSSEC validation. Returns the first IP adress found if any or raises an error.

Documentation

TODO

Contributing

File and issue or create a pull request.

Metadata

Release files for aio-doh 0.0.4

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

Source distribution (sdist)

Source distribution for aio-doh 0.0.4
File Size Uploaded
aio-doh-0.0.4.tar.gz 8.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aio-doh 0.0.4
File Interpreter ABI Platform
aio_doh-0.0.4-py3.6.egg Legacy Egg format - - Details

Total release size: 15.9 kB

Release files / aio-doh-0.0.4.tar.gz

Download URL aio-doh-0.0.4.tar.gz
Size 8.6 kB
Tags Source
SHA-256 checksum
How to use checksums
08acd3a10b33a1e47a600634dfd0a8dba9c5928f4f770c590c962059fb356b07
BLAKE2b-256 checksum
How to use checksums
00180ea989df937960ab7e0921354b65762c2d924f5c30f832a67e981fc10c7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / aio_doh-0.0.4-py3.6.egg

Download URL aio_doh-0.0.4-py3.6.egg
Size 7.2 kB
Tags Egg
SHA-256 checksum
How to use checksums
75ca607ef03139b487ee8a9966fbd44b8c8ea7f6870ada3475ae5a2f491500b5
BLAKE2b-256 checksum
How to use checksums
c6c48f5d8e0245bd8b0db9d6919309a40a295093fb5a3751217d9b3b3189aa65
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 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