Metadata-Version: 2.1
Name: pypdns
Version: 2.2.3
Summary: Python API for PDNS.
Home-page: https://github.com/CIRCL/PyPDNS
License: GPL-3.0+
Author: Raphaël Vinot
Author-email: raphael.vinot@circl.lu
Requires-Python: >=3.8,<4.0
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Telecommunications Industry
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Internet
Classifier: Topic :: Security
Provides-Extra: docs
Requires-Dist: Sphinx (<7.2) ; (python_version < "3.9") and (extra == "docs")
Requires-Dist: Sphinx (>=7.2,<8.0) ; (python_version >= "3.9") and (extra == "docs")
Requires-Dist: dnspython (>=2.6.1,<3.0.0)
Requires-Dist: requests-cache (>=1.2.0,<2.0.0)
Project-URL: Bug Tracker, https://github.com/CIRCL/PyPDNS/issues
Project-URL: Documentation, https://github.com/CIRCL/PyPDNS
Project-URL: Repository, https://github.com/CIRCL/PyPDNS
Description-Content-Type: text/markdown

[![Documentation Status](https://readthedocs.org/projects/pypdns/badge/?version=latest)](https://pypdns.readthedocs.io/en/latest/?badge=latest)

Client API for PDNS
===================

Client API to query any Passive DNS implementation following the Passive DNS - Common Output Format.

* https://datatracker.ietf.org/doc/draft-dulaunoy-dnsop-passive-dns-cof/

## Installation

```bash
pip install pypdns
```

## Usage

### Command line

You can use the `pdns` command to trigger a request.

```bash
usage: pdns [-h] --username USERNAME --password PASSWORD --query QUERY [--rrtype RRTYPE]

Triggers a request againse CIRCL Passive DNS.

options:
  -h, --help           show this help message and exit
  --username USERNAME  The username of you account.
  --password PASSWORD  The password of you account.
  --query QUERY        The query, can be an IP. domain, hostname, TLD.
  --rrtype RRTYPE      Filter the request based on the RR Type.
```

### Library

See [API Reference](https://pypdns.readthedocs.io/en/latest/api_reference.html)


Example
=======

~~~~
import pypdns
import json
x = pypdns.PyPDNS(basic_auth=('username','yourpassword'))

for record in x.iter_query(q='circl.lu', filter_rrtype='A'):
    print(json.dumps(record.record, indent=2))
~~~~

Passive DNS Services
====================

* (default) [CIRCL Passive DNS](http://www.circl.lu/services/passive-dns/)



