Introduction
This module provides an aiohttp resolver that supports mDNS, which uses the zeroconf library to resolve mDNS queries.
For full documentation please read https://aiohttp-asyncmdnsresolver.readthedocs.io.
Installation
$ pip install aiohttp-asyncmdnsresolver
Quick start
import asyncio
import aiohttp
from aiohttp_asyncmdnsresolver.api import AsyncMDNSResolver
async def main():
resolver = AsyncMDNSResolver()
# aiohttp does not own a resolver passed to TCPConnector, so close it here.
try:
connector = aiohttp.TCPConnector(resolver=resolver)
async with aiohttp.ClientSession(connector=connector) as session:
async with session.get('http://example.com') as response:
print(response.status)
async with session.get('http://xxx.local.') as response:
print(response.status)
finally:
await resolver.close()
asyncio.run(main())
Resolving with both mDNS and DNS
AsyncDualMDNSResolver is a variant that resolves .local names over mDNS and regular DNS concurrently, returning the first successful result. Use it when a .local name may be served by a unicast DNS server as well as mDNS.
import asyncio
import aiohttp
from aiohttp_asyncmdnsresolver.api import AsyncDualMDNSResolver
async def main():
resolver = AsyncDualMDNSResolver()
# aiohttp does not own a resolver passed to TCPConnector, so close it here.
try:
connector = aiohttp.TCPConnector(resolver=resolver)
async with aiohttp.ClientSession(connector=connector) as session:
async with session.get('http://printer.local.') as response:
print(response.status)
finally:
await resolver.close()
asyncio.run(main())
API documentation
The documentation is located at https://aiohttp-asyncmdnsresolver.readthedocs.io.
Source code
The project is hosted on GitHub
Please file an issue on the bug tracker if you have found a bug or have some suggestion in order to improve the library.
Metadata
Release files for aiohttp-asyncmdnsresolver 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aiohttp_asyncmdnsresolver-0.2.0.tar.gz | 37.7 kB | With provenance | Details for aiohttp_asyncmdnsresolver-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aiohttp_asyncmdnsresolver-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for aiohttp_asyncmdnsresolver-0.2.0-py3-none-any.whl |
Total release size: 48.5 kB
Release files / aiohttp_asyncmdnsresolver-0.2.0.tar.gz
| Download URL | aiohttp_asyncmdnsresolver-0.2.0.tar.gz |
|---|---|
| Size | 37.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aab2cef7ef8ae45b94abf1fc92aa9f4d70cbef7ac0a3d495a86fb96fce357262
|
|
BLAKE2b-256 checksum How to use checksums |
c1861b94f5669df188f5267e26d48c4cc734b704310e53d695af5f39ee1af67d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 20, 2026.
Transparency logRelease files / aiohttp_asyncmdnsresolver-0.2.0-py3-none-any.whl
| Download URL | aiohttp_asyncmdnsresolver-0.2.0-py3-none-any.whl |
|---|---|
| Size | 10.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1e6dc01719dc563346ae051122fa7dc3a757317e3e6bf4ef8b23cfd034089c22
|
|
BLAKE2b-256 checksum How to use checksums |
1ed5c08b4e242d50d2aded314a16105ee708946fa3dfd37b837b1ca625d26397
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 20, 2026.
Transparency logSecurity for aiohttp-asyncmdnsresolver 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for aiohttp_asyncmdnsresolver-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 20, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.