|  | 
|  | 1 | +Looking for new maintainers | 
|  | 2 | +=========================== | 
|  | 3 | + | 
|  | 4 | +https://github.com/saghul/pycares/issues/139 | 
|  | 5 | + | 
|  | 6 | +pycares: Python interface for c-ares | 
|  | 7 | +==================================== | 
|  | 8 | + | 
|  | 9 | +pycares is a Python module which provides an interface to c-ares. | 
|  | 10 | +`c-ares <https://c-ares.org>`_ is a C library that performs | 
|  | 11 | +DNS requests and name resolutions asynchronously. | 
|  | 12 | + | 
|  | 13 | + | 
|  | 14 | +Documentation | 
|  | 15 | +------------- | 
|  | 16 | + | 
|  | 17 | +http://readthedocs.org/docs/pycares/ | 
|  | 18 | + | 
|  | 19 | + | 
|  | 20 | +Bundled c-ares | 
|  | 21 | +-------------- | 
|  | 22 | + | 
|  | 23 | +pycares currently bundles c-ares as a submodule for ease of building. Using the system | 
|  | 24 | +provided c-ares is possible if the ``PYCARES_USE_SYSTEM_LIB`` environment variable is | 
|  | 25 | +set to ``1`` when building. | 
|  | 26 | + | 
|  | 27 | +NOTE: Versions prior to 4.0.0 used to embed a modified c-ares with extended TTL support. | 
|  | 28 | +That is no longer the case and as a result only A and AAAA records will have TTL information. | 
|  | 29 | +Follow this PR in uppstream c-ares, looks like TTLs will be added: https://github.com/c-ares/c-ares/pull/393 | 
|  | 30 | + | 
|  | 31 | + | 
|  | 32 | +Installation | 
|  | 33 | +------------ | 
|  | 34 | + | 
|  | 35 | +GNU/Linux, macOS, Windows, others: | 
|  | 36 | + | 
|  | 37 | +:: | 
|  | 38 | + | 
|  | 39 | +    pip install pycares | 
|  | 40 | + | 
|  | 41 | +FreeBSD: | 
|  | 42 | + | 
|  | 43 | +:: | 
|  | 44 | + | 
|  | 45 | +    cd /usr/ports/dns/py-pycares && make install | 
|  | 46 | + | 
|  | 47 | + | 
|  | 48 | +IDNA 2008 support | 
|  | 49 | +^^^^^^^^^^^^^^^^^ | 
|  | 50 | + | 
|  | 51 | +If the ``idna`` package is installed, pycares will support IDNA 2008 encoding otherwise the builtin idna codec will be used, | 
|  | 52 | +which provides IDNA 2003 support. | 
|  | 53 | + | 
|  | 54 | +You can force this at installation time as follows: | 
|  | 55 | + | 
|  | 56 | +:: | 
|  | 57 | + | 
|  | 58 | +   pip install pycares[idna] | 
|  | 59 | + | 
|  | 60 | + | 
|  | 61 | +Running the test suite | 
|  | 62 | +---------------------- | 
|  | 63 | + | 
|  | 64 | +There are several ways of running the test suite: | 
|  | 65 | + | 
|  | 66 | +- Run the test with the current Python interpreter: | 
|  | 67 | + | 
|  | 68 | +  From the toplevel directory, run: ``python tests/tests.py`` | 
|  | 69 | + | 
|  | 70 | +- Use Tox to run the test suite in several virtualenvs with several interpreters | 
|  | 71 | + | 
|  | 72 | +  From the toplevel directory, run: ``tox -e py36,py37,py38,py39`` this will run the test suite | 
|  | 73 | +  on Python 3.6 through 3.9 (you'll need to have them installed beforehand) | 
|  | 74 | + | 
|  | 75 | + | 
|  | 76 | +Using it from the cli, a la dig | 
|  | 77 | +------------------------------- | 
|  | 78 | + | 
|  | 79 | +This module can be used directly from the command line in a similar fashion to dig (limited, of course): | 
|  | 80 | + | 
|  | 81 | +:: | 
|  | 82 | + | 
|  | 83 | +   $ python -m pycares google.com | 
|  | 84 | +   ;; QUESTION SECTION: | 
|  | 85 | +   ;google.com			IN	A | 
|  | 86 | + | 
|  | 87 | +   ;; ANSWER SECTION: | 
|  | 88 | +   google.com		300	IN	A	172.217.17.142 | 
|  | 89 | + | 
|  | 90 | +   $ python -m pycares mx google.com | 
|  | 91 | +   ;; QUESTION SECTION: | 
|  | 92 | +   ;google.com			IN	MX | 
|  | 93 | + | 
|  | 94 | +   ;; ANSWER SECTION: | 
|  | 95 | +   google.com		600	IN	MX	50 alt4.aspmx.l.google.com | 
|  | 96 | +   google.com		600	IN	MX	10 aspmx.l.google.com | 
|  | 97 | +   google.com		600	IN	MX	40 alt3.aspmx.l.google.com | 
|  | 98 | +   google.com		600	IN	MX	20 alt1.aspmx.l.google.com | 
|  | 99 | +   google.com		600	IN	MX	30 alt2.aspmx.l.google.com | 
|  | 100 | + | 
|  | 101 | + | 
|  | 102 | +Author | 
|  | 103 | +------ | 
|  | 104 | + | 
|  | 105 | +Saúl Ibarra Corretgé <[email protected] > | 
|  | 106 | + | 
|  | 107 | + | 
|  | 108 | +License | 
|  | 109 | +------- | 
|  | 110 | + | 
|  | 111 | +Unless stated otherwise on-file pycares uses the MIT license, check LICENSE file. | 
|  | 112 | + | 
|  | 113 | + | 
|  | 114 | +Supported Python versions | 
|  | 115 | +------------------------- | 
|  | 116 | + | 
|  | 117 | +Python >= 3.6 are supported. Both CPython and PyPy are supported. | 
|  | 118 | + | 
|  | 119 | + | 
|  | 120 | +Contributing | 
|  | 121 | +------------ | 
|  | 122 | + | 
|  | 123 | +If you'd like to contribute, fork the project, make a patch and send a pull | 
|  | 124 | +request. Have a look at the surrounding code and please, make yours look | 
|  | 125 | +alike :-) | 
0 commit comments