aiodns provides a simple way for doing asynchronous DNS resolutions with a synchronous looking interface by using pycares.
Usage
Example:
import asyncio
import aiodns
loop = asyncio.get_event_loop()
resolver = aiodns.DNSResolver(loop=loop)
f = resolver.query('google.com','A')
result = loop.run_until_complete(f)
print(result)
The following query types are supported: A, AAAA, CNAME, MX, NAPTR, NS, PTR, SOA, SRV, TXT.
Running the test suite
To run the test suite: python test_aiodns.py
License
aiodns uses the MIT license, check LICENSE file.
Python versions
Python 3.4 is natively supported. Python 3.3 supported using the asyncio package. Older Python versions(2.6 - 3.2) are supported using trollius.
Contributing
If you’d like to contribute, fork the project, make a patch and send a pull request. Have a look at the surrounding code and please, make yours look alike :-)
Metadata
Release files for aiodns 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 | |
|---|---|---|---|
| aiodns-0.2.0.tar.gz | 3.9 kB | Details |
Release files / aiodns-0.2.0.tar.gz
| Download URL | aiodns-0.2.0.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5517af5c61781f78275d4bb8b63adea0aa70a43ba2d86651a08cf99ab0746ff1
|
|
BLAKE2b-256 checksum How to use checksums |
95ae8f3361b7c547283ebfd1338db36b443d82844acc365fc6dad02108f8fa80
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |