{"id":32331686,"url":"https://github.com/tresni/dnspython-dnscrypt","last_synced_at":"2025-10-23T19:54:25.751Z","repository":{"id":57423133,"uuid":"115190145","full_name":"tresni/dnspython-dnscrypt","owner":"tresni","description":"DNSCrypt library for use with dnspython","archived":false,"fork":false,"pushed_at":"2020-02-05T00:00:29.000Z","size":15,"stargazers_count":8,"open_issues_count":1,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-02T15:40:47.716Z","etag":null,"topics":["dns","dnscrypt","dnspython","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tresni.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-23T11:08:22.000Z","updated_at":"2025-01-16T11:10:34.000Z","dependencies_parsed_at":"2022-09-01T05:01:29.715Z","dependency_job_id":null,"html_url":"https://github.com/tresni/dnspython-dnscrypt","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/tresni/dnspython-dnscrypt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tresni%2Fdnspython-dnscrypt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tresni%2Fdnspython-dnscrypt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tresni%2Fdnspython-dnscrypt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tresni%2Fdnspython-dnscrypt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tresni","download_url":"https://codeload.github.com/tresni/dnspython-dnscrypt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tresni%2Fdnspython-dnscrypt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280683814,"owners_count":26372970,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-23T02:00:06.710Z","response_time":142,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dns","dnscrypt","dnspython","python"],"created_at":"2025-10-23T19:54:20.128Z","updated_at":"2025-10-23T19:54:25.742Z","avatar_url":"https://github.com/tresni.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"##################\ndnspython-dnscrypt\n##################\n\nThis library is designed to make using DNSCrypt in Python easy and compatible\nwith dnspython_.  It provides a ``dns.resolver.Resolver``-style interface which\nmixes-in the ``dns.query.udp`` and ``dns.query.tcp`` functions.\n\n\u003e\u003e\u003e import dnscrypt\n\u003e\u003e\u003e r = dnscrypt.Resolver('208.67.222.222', '2.dnscrypt-cert.opendns.com',\n... 'B735:1140:206F:225D:3E2B:D822:D7FD:691E:A1C3:3CC8:D666:8D0C:BE04:BFAB:CA43:FB79',\n... port=53, timeout=5)\n\u003e\u003e\u003e print r.query('www.google.com')\n\u003cdns.resolver.Answer object at 0x103b6f450\u003e\n\u003e\u003e\u003e import dns.message\n\u003e\u003e\u003e r.udp(dns.message.make_query('google.com', 'A'))\n\u003cDNS message, ID 16075\u003e\n\nClass Methods\n=============\n\n``__init__(self, address, provider_name, provider_pk, private_key=None, port=53, timeout=5)``\n---------------------------------------------------------------------------------------------\n\naddress\n    The IP address of the DNSCrypt resolver\nport\n    The port to use for communication with the DNSCrypt resolver\nprovider_name\n    The provider name for the DNSCrypt resolver.  Takes the format ``\u003cversion\u003e.dnscrypt-cert.\u003czone\u003e``.\nprovider_pk\n    The provider's hex-encoded public key or DNS hostname where to retreive the public key\nprivate_key\n    A hex-encoded private key if you want to reuse a key you already have.  Otherwise,\n    a new key will be generated for each Resolver instance.\ntimeout\n    Timeout in seconds for DNS lookups\n\n\n``address``, ``provider_name``, and ``provider_pk`` are required.  All other\narguments are optional.\n\n``query(qname, rdtype=1, rdclass=1, tcp=False, source=None, raise_on_no_answer=True, source_port=0)``\n-----------------------------------------------------------------------------------------------------\n\nAnalogous to dns.resolver.Resolver.query_ for dnspython_.\n\n``tcp(self, query, timeout=None, af=None, source=None, source_port=0, one_rr_per_rrset=False)``\n-----------------------------------------------------------------------------------------------\n\nAnalogous to dns.query.tcp_ for dnspython_.  There is no ``where`` argument,\nbut is otherwise identical in function/form.\n\n``udp(self, query, timeout=None, af=None, source=None, source_port=0, ignore_unexpected=False, one_rr_per_rrset=False)``\n------------------------------------------------------------------------------------------------------------------------\n\nAnalogous to dns.query.udp_ for dnspython_.  There is no ``where`` argument,\nbut is otherwise identical in function/form.\n\nDifferences from dnspython\n==========================\n\nThe biggest thing is that this is a very basic implementation of\n``dns.resolver.Resolver``.  While it's designed to look/feel the same, it is not a\ndrop in replacement. (e.g. I did not implement the\n``use_tsig``/``use_edns``/``set_flags`` functions, instead use\n``dns.message.Message`` and ``dnscrypt.resolver.tcp`` or\n``dnscrypt.resolver.udp``.)\n\n.. _dnspython: http://www.dnspython.org\n.. _dns.resolver.Resolver.query: http://www.dnspython.org/docs/1.15.0/dns.resolver.Resolver-class.html#query\n.. _dns.query.tcp: http://www.dnspython.org/docs/1.15.0/dns.query-module.html#tcp\n.. _dns.query.udp: http://www.dnspython.org/docs/1.15.0/dns.query-module.html#udp\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftresni%2Fdnspython-dnscrypt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftresni%2Fdnspython-dnscrypt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftresni%2Fdnspython-dnscrypt/lists"}