{"id":16974581,"url":"https://github.com/item4/aiohttp-doh","last_synced_at":"2025-06-26T01:36:17.295Z","repository":{"id":57408910,"uuid":"133159959","full_name":"item4/aiohttp-doh","owner":"item4","description":"DNS over HTTPS with aiohttp","archived":false,"fork":false,"pushed_at":"2020-09-12T05:44:15.000Z","size":9,"stargazers_count":12,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-12T16:54:19.395Z","etag":null,"topics":["aiohttp","asyncio","dns-over-https","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/item4.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-12T15:45:12.000Z","updated_at":"2025-05-05T11:09:29.000Z","dependencies_parsed_at":"2022-09-26T17:11:05.767Z","dependency_job_id":null,"html_url":"https://github.com/item4/aiohttp-doh","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/item4/aiohttp-doh","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/item4%2Faiohttp-doh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/item4%2Faiohttp-doh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/item4%2Faiohttp-doh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/item4%2Faiohttp-doh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/item4","download_url":"https://codeload.github.com/item4/aiohttp-doh/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/item4%2Faiohttp-doh/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259838210,"owners_count":22919541,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aiohttp","asyncio","dns-over-https","python"],"created_at":"2024-10-14T01:07:07.980Z","updated_at":"2025-06-26T01:36:17.265Z","avatar_url":"https://github.com/item4.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"aiohttp-doh\n===========\n\nDNS over HTTPS reslover for aiohttp\n\n\nInstallation\n------------\n\n.. code-block:: bash\n\n   $ pip install aiohttp-doh\n\n\nManual Usage\n------------\n\nIf you want use manualy, you must import ``ClientSession`` in ``aiohttp.client``\nmodule and ``TCPConnector`` in ``aiohttp.connector`` module and ``DNSOverHTTPSResolver``\nin ``aiohttp_doh`` package.\n\n.. code-block:: python3\n\n   from aiohttp.client import ClientSession\n   from aiohttp.connector import TCPConnector\n\n   from aiohttp_doh import DNSOverHTTPSResolver\n\n   def my_client_session(*args, **kwargs):\n       resolver = DNSOverHTTPSResolver(endpoints=[\n           'https://cloudflare-dns.com/dns-query',\n       ])\n       connector = TCPConnector(resolver=resolver)\n       return ClientSession(*args, **kwargs, connector=connector)\n\n    async def main():\n       async with my_client_session() as session:\n           async with session.get('http://example.com') as resp:\n               data = await resp.text()\n\n       print(data)\n\n\nShortcut\n--------\n\nManual usage is too board. So I make shortcut to use easily.\nYou just replace ``aiohttp.ClientSession`` to ``aiohttp_doh.ClientSession``.\n\n.. code-block:: python3\n\n   from aiohttp_doh import ClientSession\n\n   async def main():\n       async with ClientSession() as session:\n           async with session.get('http://example.com') as resp:\n               data = await resp.text()\n\n       print(data)\n\n\nOptions\n-------\n\nYou can pass below parameter for configuration.\n\nendpoints\n  List of str. DNS over HTTPS endpoints.\n  Shortcut use `'https://dns.google.com/resolve'`\n  and `'https://cloudflare-dns.com/dns-query'` both in default.\n  You can also use others instead.\n\njson_loads\n  Function for loads json. default is Python builtin json module's one.\n  You can use third-party json library like simplejson or ujson.\n\nresolver_class\n  Internal DNS resolver class. Using for connect to endpoint.\n  default is aiohttp default.\n\n\nLicense\n-------\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitem4%2Faiohttp-doh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitem4%2Faiohttp-doh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitem4%2Faiohttp-doh/lists"}