Skip to content

Commit 69d7e3e

Browse files
committed
Update README
1 parent ed77824 commit 69d7e3e

File tree

1 file changed

+4
-32
lines changed

1 file changed

+4
-32
lines changed

README.rst

Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ Simple DNS resolver for asyncio
55
.. image:: https://secure.travis-ci.org/saghul/aiodns.png?branch=master
66
:target: http://travis-ci.org/saghul/aiodns
77

8-
aiodns provides a simple way for doing asynchronous DNS resolutions
9-
with a synchronous looking interface by using `pycares <https://github.com/saghul/pycares>`_.
8+
aiodns provides a simple way for doing asynchronous DNS resolutions using `pycares <https://github.com/saghul/pycares>`_.
109

1110

1211
Example
@@ -17,22 +16,6 @@ Example
1716
import asyncio
1817
import aiodns
1918

20-
loop = asyncio.get_event_loop()
21-
resolver = aiodns.DNSResolver(loop=loop)
22-
f = resolver.query('google.com','A')
23-
result = loop.run_until_complete(f)
24-
print(result)
25-
26-
27-
The following query types are supported: A, AAAA, CNAME, MX, NAPTR, NS, PTR, SOA, SRV, TXT.
28-
29-
The library supports both *asyncio* and *Trollius*.
30-
31-
If you use use Python 3.5+, you can use the `async` and `await` statements::
32-
33-
import asyncio
34-
import aiodns
35-
3619
loop = asyncio.get_event_loop()
3720
resolver = aiodns.DNSResolver(loop=loop)
3821

@@ -43,18 +26,8 @@ If you use use Python 3.5+, you can use the `async` and `await` statements::
4326
result = loop.run_until_complete(coro)
4427

4528

29+
The following query types are supported: A, AAAA, ANY, CNAME, MX, NAPTR, NS, PTR, SOA, SRV, TXT.
4630

47-
If you use Python 3.3/3.4 you may use `yield from` statement::
48-
49-
@asyncio.coroutine
50-
def func():
51-
result = yield from resolver.query('google.com','A')
52-
53-
For Trollius you should use another syntax like::
54-
55-
@trollius.coroutine
56-
def func():
57-
result = yield trollius.From(resolver.query('google.com','A'))
5831

5932
API
6033
===
@@ -81,7 +54,7 @@ The API is pretty simple, three functions are provided in the ``DNSResolver`` cl
8154
Running the test suite
8255
======================
8356

84-
To run the test suite: ``python test_aiodns.py``
57+
To run the test suite: ``python tests.py``
8558

8659

8760
Author
@@ -99,8 +72,7 @@ aiodns uses the MIT license, check LICENSE file.
9972
Python versions
10073
===============
10174

102-
Python >= 3.4 is natively supported. Python 3.3 supported using the `asyncio package <https://pypi.python.org/pypi/asyncio>`_.
103-
Older Python versions(2.6 - 3.2) are supported using `trollius <https://pypi.python.org/pypi/trollius>`_.
75+
Python >= 3.5 are supported.
10476

10577

10678
Contributing

0 commit comments

Comments
 (0)