%global _empty_manifest_terminate_build 0 Name: python-pydig Version: 0.4.0 Release: 1 Summary: Python wrapper library for the 'dig' command line tool License: GPL-3.0 URL: https://github.com/leonsmith/pydig Source0: https://mirrors.nju.edu.cn/pypi/web/packages/f3/4d/312bbd4eb8bbea9215eac2980a75bad67d0cb38be7b8bce2d23354276ff8/pydig-0.4.0.tar.gz BuildArch: noarch %description # 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 %package -n python3-pydig Summary: Python wrapper library for the 'dig' command line tool Provides: python-pydig BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-pydig # 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 %package help Summary: Development documents and examples for pydig Provides: python3-pydig-doc %description help # 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 %prep %autosetup -n pydig-0.4.0 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-pydig -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Fri May 05 2023 Python_Bot - 0.4.0-1 - Package Spec generated