{ "info": { "author": "SuHun Han", "author_email": "ssut@ssut.me", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": ".. class:: center\n\n =========\n PublicDNS\n =========\n\n\nPublicDNS is a high-perfmrnace, secure, reliable python DNS client `over HTTP/2 and TLS`__.\n\n__ https://developers.google.com/speed/public-dns/docs/dns-over-https\n\nAs written in Google DNS-over-HTTPS guide, this offers a variety of features as follows:\n\n- support all RRs\n- support DNSSEC validation\n- support for IPv4 and IPv6\n- can insure against `privacy concerns`__\n\n__ https://https.cio.gov/everything/\n\nPerformance\n===========\n\nWhile tranditional DNS client does not support `put multiple questions into a single call`__,\nPublicDNS has advantage that it's much faster when dealing with multiple questions, `a big advantage of HTTP/2`__.\nBecause Google servers also run over QUIC, this also means that performance will be much better if it is implemented.\n\nI recently benchmarked with a small amount of domains, take a look at the result:\n\n .. code-block:: console\n\n - dns.resolver\n 100%|\u2588\u2588\u2588| 100/100 [00:32<00:00, 3.97s/it]\n dns.resolver * 100 - took 32.5060371872969s\n - PublicDNS\n 100%|\u2588\u2588\u2588| 100/100 [00:13<00:00, 12.8it/s]\n PublicDNS * 100 - took 13.507565873209387s\n\n__ https://groups.google.com/d/msg/comp.protocols.dns.bind/uOWxNkm7AVg/wKtsmudkY1UJ\n__ https://istlsfastyet.com/#faq\n\nInstallation\n============\n\nInstall PublicDNS using easy_setup or pip:\n\n .. code-block:: console\n\n pip install publicdns\n\nExample\n=======\n\n .. code-block:: python\n\n from publicdns.client import PublicDNS\n\n client = PublicDNS()\n result = client.query('www.google.com', 'A')\n ip = client.resolve('www.google.com')\n\nTo see more usage, just dive into the ``tests`` directory.\n\nAPI\n===\n\nThe public API is really simple, totaling only 2 API calls:\n\n* ``query(host, type='A', dnssec=True)``: Do a DNS resolution of the given type for the given hostname. It returns an\n instance of ``publicdns.models.DNSResponse``.\n* ``resolve(host, type='A', dnssec=True)``: Do a DNS resolution of the given type for the given hostname. While\n ``query()`` returns an instance of ``publicdns.models.DNSResponse``, ``resolve()`` only return a list of data\n like ``['8.8.8.8']``.\n\n\nPatching\n--------\n\nReplace some functions of the standard socket object with publicdns's implementation.\n\n .. code-block:: python\n\n from publicdns.monkey import patch_socket\n patch_socket()\n\nDocumentation\n=============\n\nUntil the project is properly documented you will have to rely on the source code. It is rather undocumented now, but\nbetter documentation is under way. On the other hand, the code is quite extensively tested.\n\nQuery Limitation\n----------------\n\nGoogle can limit the number of API requests. Please follow `Rate-limiting queries`__ section.\n\n__ https://developers.google.com/speed/public-dns/docs/security#rate_limit\n\nRunning tests\n=============\n\nPublicDNS has tests. These tests ensure that the code is in a working state. You have to install some external packages to run tests, listed in ``test_requirements.txt``:\n\n .. code-block:: console\n\n $ pip install -r test_requirements.txt\n\nthen:\n\n .. code-block:: console\n\n $ py.test\n\nAlternatively, to run them in every supported Python version do:\n\n .. code-block:: console\n\n $ tox\n\nContributing\n===========\n\n1. Create an issue and describe your idea\n2. Fork this repo\n3. Create your feature branch (``git checkout -b my-new-feature``)\n4. Run tests\n5. Add a test for your feature\n6. Run step 4 again\n7. Commit your changes (``git commit -am 'Add some feature'``)\n8. Publish the branch (``git push origin my-new-feature``)\n9. Create a new Pull Request\n\n\nLicense\n=======\n\nPublicDNS is released under the `MIT License`__.\n\n__ http://www.opensource.org/licenses/MIT\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ssut/publicdns", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "publicdns", "package_url": "https://pypi.org/project/publicdns/", "platform": "", "project_url": "https://pypi.org/project/publicdns/", "project_urls": { "Homepage": "https://github.com/ssut/publicdns" }, "release_url": "https://pypi.org/project/publicdns/0.1.0/", "requires_dist": null, "requires_python": "", "summary": "", "version": "0.1.0" }, "last_serial": 2651581, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "a0fd0301e4f4ff6ce188b13a03580892", "sha256": "1d9f69f734cdf30e8f73b67523fa2a4c3d0a34134d81a827e7eab064e7ba171b" }, "downloads": -1, "filename": "publicdns-0.1.0.tar.gz", "has_sig": false, "md5_digest": "a0fd0301e4f4ff6ce188b13a03580892", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7390, "upload_time": "2017-02-18T14:38:35", "url": "https://files.pythonhosted.org/packages/ed/16/726958106e6a15161af2a6ca3b0c066116e9b7e9a88893b1b26446036b2d/publicdns-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a0fd0301e4f4ff6ce188b13a03580892", "sha256": "1d9f69f734cdf30e8f73b67523fa2a4c3d0a34134d81a827e7eab064e7ba171b" }, "downloads": -1, "filename": "publicdns-0.1.0.tar.gz", "has_sig": false, "md5_digest": "a0fd0301e4f4ff6ce188b13a03580892", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7390, "upload_time": "2017-02-18T14:38:35", "url": "https://files.pythonhosted.org/packages/ed/16/726958106e6a15161af2a6ca3b0c066116e9b7e9a88893b1b26446036b2d/publicdns-0.1.0.tar.gz" } ] }