pydig
pydig is a python wrapper library for the 'dig' command line tool.
Versioning
pydig follows SemVer (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.
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
Metadata
Release files for pydig 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pydig-0.4.0.tar.gz | 15.8 kB | Without provenance | Details for pydig-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pydig-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for pydig-0.4.0-py3-none-any.whl |
Total release size: 32.0 kB
Release files / pydig-0.4.0.tar.gz
| Download URL | pydig-0.4.0.tar.gz |
|---|---|
| Size | 15.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
57c127ab2d2e6afb58d7bab9c9592c074cb5ccc0d2e5c0817e344ac6e140333a
|
|
BLAKE2b-256 checksum How to use checksums |
f34d312bbd4eb8bbea9215eac2980a75bad67d0cb38be7b8bce2d23354276ff8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.4 CPython/3.7.5 Darwin/19.6.0
|
Release files / pydig-0.4.0-py3-none-any.whl
| Download URL | pydig-0.4.0-py3-none-any.whl |
|---|---|
| Size | 16.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eddb17778268d58c93db21b2044f420640ade70096875608a2880b3e5935ccd4
|
|
BLAKE2b-256 checksum How to use checksums |
4cee6b942922ecbda33ba9d34393f4cec5f107bea665b6f107a81410cb94019d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.4 CPython/3.7.5 Darwin/19.6.0
|
Security for pydig 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.