LittleDemon WebShell


Linux in-mum-web1499.main-hosting.eu 5.14.0-503.40.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Mon May 5 06:06:04 EDT 2025 x86_64
Path : /opt/alt/python311/lib/python3.11/site-packages/pydig-0.4.0.dist-info/
File Upload :
Command :
Current File : //opt/alt/python311/lib/python3.11/site-packages/pydig-0.4.0.dist-info/METADATA

Metadata-Version: 2.1
Name: pydig
Version: 0.4.0
Summary: Python wrapper library for the 'dig' command line tool
Home-page: https://github.com/leonsmith/pydig
License: GPL-3.0
Keywords: dig,dns,pydig,resolver,lookup
Author: Leon Smith
Author-email: _@leonmarksmith.com
Requires-Python: >=3.5,<4.0
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Internet :: Name Service (DNS)
Classifier: Topic :: System :: Monitoring
Classifier: Topic :: Utilities
Project-URL: Repository, https://github.com/leonsmith/pydig
Description-Content-Type: text/markdown

# pydig

pydig is a python wrapper library for the 'dig' command line tool.

[![Build Status](https://travis-ci.org/leonsmith/pydig.svg?branch=master)](https://travis-ci.org/leonsmith/pydig)
[![Python Versions](https://img.shields.io/pypi/pyversions/pydig.svg)](https://pypi.org/project/pydig/)
[![License](https://img.shields.io/pypi/l/pydig.svg?color=informational)](https://pypi.org/project/pydig/)

## Versioning

pydig follows [SemVer](https://semver.org/) (MAJOR.MINOR.PATCH) to track what is in each release.

* Major version number will be bumped when there is an incompatible API change
* Minor version number will be bumped when there is functionality added in a backwards-compatible manner.
* Patch version number will be bumped when there is backwards-compatible bug fixes.

Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.


## Installation

Installation the package from pypi with your tool of choice `pip`, `poetry`
or `pipenv`.

```bash
pip install pydig
```

## Usage

To use the default resolver you can call `pydig.query` this resolver will use
the `dig` command found in your `$PATH`.
```
>>> import pydig
>>> pydig.query('example.com', 'A')
['93.184.216.34']
>>> pydig.query('www.github.com', 'CNAME')
['github.com.']
>>> pydig.query('example.com', 'NS')
['a.iana-servers.net.', 'b.iana-servers.net.']
```

If your want to adjust the executable location, the nameservers to dig will
query against or would like to pass additional arguments/flags, you can
configure your own instance of a resolver. and call the `query` method of your
custom resolver.

```
>>> import pydig
>>> resolver = pydig.Resolver(
...     executable='/usr/bin/dig',
...     nameservers=[
...         '1.1.1.1',
...         '1.0.0.1',
...     ],
...     additional_args=[
...         '+time=10',
...     ]
... )
>>> resolver.query('example.com', 'A')
>>> ['93.184.216.34']
```

## Documentation

The code is 150~ lines with 100% test coverage

https://github.com/leonsmith/pydig/tree/master/pydig


LittleDemon - FACEBOOK
[ KELUAR ]