{"id":16987723,"url":"https://github.com/trolldbois/python3-adns","last_synced_at":"2025-08-25T13:15:09.665Z","repository":{"id":11917041,"uuid":"14482802","full_name":"trolldbois/python3-adns","owner":"trolldbois","description":"adns-python port to python3","archived":false,"fork":false,"pushed_at":"2024-01-14T19:11:31.000Z","size":51,"stargazers_count":6,"open_issues_count":1,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-01T19:19:43.384Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trolldbois.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"trolldbois"}},"created_at":"2013-11-18T04:38:49.000Z","updated_at":"2024-02-13T17:40:27.000Z","dependencies_parsed_at":"2024-10-14T02:50:41.514Z","dependency_job_id":"dcb932e7-bbe4-4470-9643-c3bb8f042cd0","html_url":"https://github.com/trolldbois/python3-adns","commit_stats":{"total_commits":8,"total_committers":1,"mean_commits":8.0,"dds":0.0,"last_synced_commit":"20f4bb5bd414e8bf335315e5852de2b43380c286"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trolldbois%2Fpython3-adns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trolldbois%2Fpython3-adns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trolldbois%2Fpython3-adns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trolldbois%2Fpython3-adns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trolldbois","download_url":"https://codeload.github.com/trolldbois/python3-adns/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248512652,"owners_count":21116653,"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","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":[],"created_at":"2024-10-14T02:50:37.209Z","updated_at":"2025-04-12T03:31:28.104Z","avatar_url":"https://github.com/trolldbois.png","language":"C","funding_links":["https://github.com/sponsors/trolldbois"],"categories":[],"sub_categories":[],"readme":"Installation Instructions\n==================\n\nInstall the ADNS library and development files.\n\n    # sudo apt install libadns1-dev\n\nInstall the python package\n\n    $ (venv) pip install adns\n\nYou are set.\n\n\nUsage\n=====\n\nSee the included test programs for examples. A simple interactive\nexample that uses synchronous queries::\n\n    \u003e\u003e\u003e import adns\n    \u003e\u003e\u003e s=adns.init()\n    \u003e\u003e\u003e s.synchronous('python.org',adns.rr.MX)\n    (0, None, 1107034862, ((50, ('mail.python.org', 0,\n    ((2, '194.109.207.14'),))),))\n\nResults are generally returned as a 4-tuple: status, CNAME, expires, answer\n\nstatus is the adns status, enumerated in adns.status.\n\nCNAME is the CNAME of the answer, if any (None if the query target is not a\nCNAME)\n\nexpires is the time (in ticks) that the answer's TTL expires.\n\nanswer is what you really want. Since queries generally can return more than\none answer, answer is returned as an n-tuple. The format of each item in the\ntuple depends on what type of RR was requested.::\n\n    \u003e\u003e\u003e s.synchronous('python.org',adns.rr.MXraw)\n    (0, None, 1107034862, ((50, 'mail.python.org'),))\n\nIn this case, MXraw returns only the MX data (priority and hostname). MX\ndoes further expansions upon the hostname, returning a tuple of hostname,\nstatus for the following data, and then a tuple of rr.ADDR answers, which\nare the address class and the IP address, i.e.::\n\n    \u003e\u003e\u003e s.synchronous('mail.python.org',adns.rr.ADDR)\n    (0, None, 1107034862, ((2, '194.109.207.14'),))\n\nand compare to::\n\n    \u003e\u003e\u003e s.synchronous('mail.python.org',adns.rr.A)\n    (0, None, 1107034862, ('194.109.207.14',))\n\nPrefer to use exceptions to processing status codes? adns.exception(status)\nwill raise an appropriate exception. Sometimes you need to have the result,\neven when there is an exceptional condition. The exceptions are:\n\n* Error\n\n  * NotReadyError\n  * LocalError\n  * RemoteError\n\n    * RemoteConfigError\n    * RemoteFailureError\n    * RemoteTempError\n\n  * QueryError\n  * PermanentError\n\n    * NXDomain\n    * NoData\n\nFor asynchronous examples, see ADNS.py, hostmx.py, and DNSBL.py.\nDNSBL.py is very outdated in terms of actual working blacklists,\nbut may still be instructive.\n\nadns-python-1.2.0 and newer *requires* at least adns-1.2. For adns-1.1\nand older, use adns-python-1.1.1.\n\n:Author:\n\tAndy Dustman \u003cfarcepest@gmail.com\u003e\n:Date:\n\tJanuary 27, 2007\n\n\n\nBuild Instructions\n==================\n\nFirst, you gotta have the adns_ libraries installed somewhere. Maybe\nyour OS vendor has it packaged already.\n\n.. _adns: http://www.chiark.greenend.org.uk/~ian/adns/\n\n    # sudo apt install libadns1-dev\n\nFor adns-python-1.2.0 and newer, you *must* have at least adns-1.2.\n\nSecond, you gotta have Distutils_, which comes in Python 1.6 and up. If you\nhave Python 1.5.2, *upgrade already*!\n\n.. _Distutils: http://www.python.org/sigs/distutils-sig/download.html\n\nThen, you can build and install::\n\n    # try to builds the C extension\n    $ python setup.py build\n\n    # We do not distribute wheels. But this is how. Does build the C extension\n    # $ python -m build -w\n\n    # so we use a sdist instead\n    $ python setup.py sdist\n\n    # or build a sdist package with build. Does not validate the C extension.\n    $ python  -m build -s\n\n\nRTFM for Distutils for more options.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrolldbois%2Fpython3-adns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrolldbois%2Fpython3-adns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrolldbois%2Fpython3-adns/lists"}