diff options
| author | CoprDistGit <infra@openeuler.org> | 2023-05-10 04:41:35 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2023-05-10 04:41:35 +0000 |
| commit | d1e7e01076a6043826ca54f5c295f8e50afe2bcc (patch) | |
| tree | 9ec6c0561e753ef431dc1f24064fe7ce484144ab | |
| parent | 0c2752ee62f20fb9ff955a8ab74dd8884e2189be (diff) | |
automatic import of python-whodapopeneuler20.03
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | python-whodap.spec | 653 | ||||
| -rw-r--r-- | sources | 1 |
3 files changed, 655 insertions, 0 deletions
@@ -0,0 +1 @@ +/whodap-0.1.8.tar.gz diff --git a/python-whodap.spec b/python-whodap.spec new file mode 100644 index 0000000..e608ce5 --- /dev/null +++ b/python-whodap.spec @@ -0,0 +1,653 @@ +%global _empty_manifest_terminate_build 0 +Name: python-whodap +Version: 0.1.8 +Release: 1 +Summary: Simple RDAP Utility for Python +License: MIT License +URL: https://github.com/pogzyb/whodap +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/29/06/e8bccfd04e68c4215e3c913ff700e38a3621beb675e1de3fec91c557ef8e/whodap-0.1.8.tar.gz +BuildArch: noarch + +Requires: python3-httpx +Requires: python3-async-generator + +%description +## whodap + +[](https://badge.fury.io/py/whodap) + +[](https://codecov.io/gh/pogzyb/whodap) +[](https://github.com/psf/black) + +`whodap` | Simple RDAP Utility for Python + +- Support for asyncio HTTP requests ([`httpx`](https://www.python-httpx.org/)) +- Leverages the [`SimpleNamespace`](https://docs.python.org/3/library/types.html#types.SimpleNamespace) type for cleaner RDAP Response traversal +- Keeps the familiar look of WHOIS via the `to_whois_dict` method for DNS lookups + +#### Quickstart + +```python +import asyncio +from pprint import pprint + +import whodap + +# Looking up a domain name +response = whodap.lookup_domain(domain='bitcoin', tld='org') +# Equivalent asyncio call +loop = asyncio.get_event_loop() +response = loop.run_until_complete(whodap.aio_lookup_domain(domain='bitcoin', tld='org')) +# "response" is a DomainResponse object. It contains the output from the RDAP lookup. +print(response) +# Traverse the DomainResponse via "dot" notation +print(response.events) +""" +[{ + "eventAction": "last update of RDAP database", + "eventDate": "2021-04-23T21:50:03" +}, + { + "eventAction": "registration", + "eventDate": "2008-08-18T13:19:55" +}, ... ] +""" +# Retrieving the registration date from above: +print(response.events[1].eventDate) +""" +2008-08-18 13:19:55 +""" +# Don't want "dot" notation? Use `to_dict` to get the RDAP response as a dictionary +pprint(response.to_dict()) +# Use `to_whois_dict` for the familiar look of WHOIS output +pprint(response.to_whois_dict()) +""" +{abuse_email: 'abuse@namecheap.com', + abuse_phone: 'tel:+1.6613102107', + admin_address: 'P.O. Box 0823-03411, Panama, Panama, PA', + admin_email: '2603423f6ed44178a3b9d728827aa19a.protect@whoisguard.com', + admin_fax: 'fax:+51.17057182', + admin_name: 'WhoisGuard Protected', + admin_organization: 'WhoisGuard, Inc.', + admin_phone: 'tel:+507.8365503', + billing_address: None, + billing_email: None, + billing_fax: None, + billing_name: None, + billing_organization: None, + billing_phone: None, + created_date: datetime.datetime(2008, 8, 18, 13, 19, 55), + domain_name: 'bitcoin.org', + expires_date: datetime.datetime(2029, 8, 18, 13, 19, 55), + nameservers: ['dns1.registrar-servers.com', 'dns2.registrar-servers.com'], + registrant_address: 'P.O. Box 0823-03411, Panama, Panama, PA', + registrant_email: '2603423f6ed44178a3b9d728827aa19a.protect@whoisguard.com', + registrant_fax: 'fax:+51.17057182', + registrant_name: 'WhoisGuard Protected', + registrant_organization: None, + registrant_phone: 'tel:+507.8365503', + registrar_address: '4600 E Washington St #305, Phoenix, Arizona, 85034', + registrar_email: 'support@namecheap.com', + registrar_fax: None, + registrar_name: 'NAMECHEAP INC', + registrar_phone: 'tel:+1.6613102107', + status: ['client transfer prohibited'], + technical_address: 'P.O. Box 0823-03411, Panama, Panama, PA', + technical_email: '2603423f6ed44178a3b9d728827aa19a.protect@whoisguard.com', + technical_fax: 'fax:+51.17057182', + technical_name: 'WhoisGuard Protected', + technical_organization: 'WhoisGuard, Inc.', + technical_phone: 'tel:+507.8365503', + updated_date: datetime.datetime(2019, 11, 24, 13, 58, 35)} +""" +``` + +#### Exported Functions and Classes + +| Object | Description | +| ----------- | ----------- | +| `lookup_domain` | Performs an RDAP query for the given Domain and TLD | +| `lookup_ipv4` | Performs an RDAP query for the given IPv4 address | +| `lookup_ipv6` | Performs an RDAP query for the given IPv6 address | +| `lookup_asn` | Performs an RDAP query for the Autonomous System with the given Number | +| `aio_lookup_domain` | async counterpart to `lookup_domain` | +| `aio_lookup_ipv4` | async counterpart to `lookup_ipv4` | +| `aio_lookup_ipv6` | async counterpart to `lookup_ipv6` | +| `aio_lookup_asn` | async counterpart to `lookup_asn` | +| `DNSClient` | Reusable client for RDAP DNS queries | +| `IPv4Client` | Reusable client for RDAP IPv4 queries | +| `IPv6Client` | Reusable client for RDAP IPv6 queries | +| `ASNClient` | Reusable client for RDAP ASN queries | + + +#### Common Usage Patterns + +- Using the DNSClient: +```python +import whodap + +# Initialize an instance of DNSClient using classmethods: `new_client` or `new_aio_client` +dns_client = whodap.DNSClient.new_client() +for domain, tld in [('google', 'com'), ('google', 'buzz')]: + response = dns_client.lookup(domain, tld) + +# Equivalent asyncio call +dns_client = await whodap.DNSClient.new_aio_client() +for domain, tld in [('google', 'com'), ('google', 'buzz')]: + response = await dns_client.aio_lookup(domain, tld) + +# Use the DNSClient contextmanagers: `new_client_context` or `new_aio_client_context` +with whodap.DNSClient.new_client_context() as dns_client: + for domain, tld in [('google', 'com'), ('google', 'buzz')]: + response = dns_client.lookup(domain, tld) + +# Equivalent asyncio call +async with whodap.DNSClient.new_aio_client_context() as dns_client: + for domain, tld in [('google', 'com'), ('google', 'buzz')]: + response = await dns_client.aio_lookup(domain, tld) +``` + +- Configurable `httpx` client: + +```python +import asyncio + +import httpx +import whodap + +# Initialize a custom, pre-configured httpx client ... +httpx_client = httpx.Client(proxies=httpx.Proxy('https://user:pw@proxy_url.net')) +# ... or an async client +aio_httpx_client = httpx.AsyncClient(proxies=httpx.Proxy('http://user:pw@proxy_url.net')) + +# Three common methods for leveraging httpx clients are outlined below: + +# 1) Pass the httpx client directly into the convenience functions: `lookup_domain` or `aio_lookup_domain` +# Important: In this scenario, you are responsible for closing the httpx client. +# In this example, the given httpx client is used as a contextmanager; ensuring it is "closed" when finished. +async with aio_httpx_client: + futures = [] + for domain, tld in [('google', 'com'), ('google', 'buzz')]: + task = whodap.aio_lookup_domain(domain, tld, httpx_client=aio_httpx_client) + futures.append(task) + await asyncio.gather(*futures) + +# 2) Pass the httpx_client into the DNSClient classmethod: `new_client` or `new_aio_client` +aio_dns_client = await whodap.DNSClient.new_aio_client(aio_httpx_client) +result = await aio_dns_client.aio_lookup('google', 'buzz') +await aio_httpx_client.aclose() + +# 3) Pass the httpx_client into the DNSClient contextmanagers: `new_client_context` or `new_aio_client_context` +# This method ensures the underlying httpx_client is closed when exiting the "with" block. +async with whodap.DNSClient.new_aio_client_context(aio_httpx_client) as dns_client: + for domain, tld in [('google', 'com'), ('google', 'buzz')]: + response = await dns_client.aio_lookup(domain, tld) +``` + +#### Contributions +- Interested in contributing? +- Have any questions or comments? +- Anything that you'd like to see? +- Anything that doesn't look right? + +Please post a question or comment. + +#### Roadmap + +[alpha] 0.1.X Release: +- ~~Support for RDAP "domain" queries~~ +- ~~Support for RDAP "ipv4" and "ipv6" queries~~ +- ~~Support for RDAP ASN queries~~ +- Abstract the HTTP Client (`httpx` is the defacto client for now) +- Add parser utils/helpers for IPv4, IPv6, and ASN Responses (if someone shows interest) + +#### RDAP Resources: +- https://rdap.org/ +- https://tools.ietf.org/html/rfc7483 +- https://tools.ietf.org/html/rfc6350 + + +%package -n python3-whodap +Summary: Simple RDAP Utility for Python +Provides: python-whodap +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-whodap +## whodap + +[](https://badge.fury.io/py/whodap) + +[](https://codecov.io/gh/pogzyb/whodap) +[](https://github.com/psf/black) + +`whodap` | Simple RDAP Utility for Python + +- Support for asyncio HTTP requests ([`httpx`](https://www.python-httpx.org/)) +- Leverages the [`SimpleNamespace`](https://docs.python.org/3/library/types.html#types.SimpleNamespace) type for cleaner RDAP Response traversal +- Keeps the familiar look of WHOIS via the `to_whois_dict` method for DNS lookups + +#### Quickstart + +```python +import asyncio +from pprint import pprint + +import whodap + +# Looking up a domain name +response = whodap.lookup_domain(domain='bitcoin', tld='org') +# Equivalent asyncio call +loop = asyncio.get_event_loop() +response = loop.run_until_complete(whodap.aio_lookup_domain(domain='bitcoin', tld='org')) +# "response" is a DomainResponse object. It contains the output from the RDAP lookup. +print(response) +# Traverse the DomainResponse via "dot" notation +print(response.events) +""" +[{ + "eventAction": "last update of RDAP database", + "eventDate": "2021-04-23T21:50:03" +}, + { + "eventAction": "registration", + "eventDate": "2008-08-18T13:19:55" +}, ... ] +""" +# Retrieving the registration date from above: +print(response.events[1].eventDate) +""" +2008-08-18 13:19:55 +""" +# Don't want "dot" notation? Use `to_dict` to get the RDAP response as a dictionary +pprint(response.to_dict()) +# Use `to_whois_dict` for the familiar look of WHOIS output +pprint(response.to_whois_dict()) +""" +{abuse_email: 'abuse@namecheap.com', + abuse_phone: 'tel:+1.6613102107', + admin_address: 'P.O. Box 0823-03411, Panama, Panama, PA', + admin_email: '2603423f6ed44178a3b9d728827aa19a.protect@whoisguard.com', + admin_fax: 'fax:+51.17057182', + admin_name: 'WhoisGuard Protected', + admin_organization: 'WhoisGuard, Inc.', + admin_phone: 'tel:+507.8365503', + billing_address: None, + billing_email: None, + billing_fax: None, + billing_name: None, + billing_organization: None, + billing_phone: None, + created_date: datetime.datetime(2008, 8, 18, 13, 19, 55), + domain_name: 'bitcoin.org', + expires_date: datetime.datetime(2029, 8, 18, 13, 19, 55), + nameservers: ['dns1.registrar-servers.com', 'dns2.registrar-servers.com'], + registrant_address: 'P.O. Box 0823-03411, Panama, Panama, PA', + registrant_email: '2603423f6ed44178a3b9d728827aa19a.protect@whoisguard.com', + registrant_fax: 'fax:+51.17057182', + registrant_name: 'WhoisGuard Protected', + registrant_organization: None, + registrant_phone: 'tel:+507.8365503', + registrar_address: '4600 E Washington St #305, Phoenix, Arizona, 85034', + registrar_email: 'support@namecheap.com', + registrar_fax: None, + registrar_name: 'NAMECHEAP INC', + registrar_phone: 'tel:+1.6613102107', + status: ['client transfer prohibited'], + technical_address: 'P.O. Box 0823-03411, Panama, Panama, PA', + technical_email: '2603423f6ed44178a3b9d728827aa19a.protect@whoisguard.com', + technical_fax: 'fax:+51.17057182', + technical_name: 'WhoisGuard Protected', + technical_organization: 'WhoisGuard, Inc.', + technical_phone: 'tel:+507.8365503', + updated_date: datetime.datetime(2019, 11, 24, 13, 58, 35)} +""" +``` + +#### Exported Functions and Classes + +| Object | Description | +| ----------- | ----------- | +| `lookup_domain` | Performs an RDAP query for the given Domain and TLD | +| `lookup_ipv4` | Performs an RDAP query for the given IPv4 address | +| `lookup_ipv6` | Performs an RDAP query for the given IPv6 address | +| `lookup_asn` | Performs an RDAP query for the Autonomous System with the given Number | +| `aio_lookup_domain` | async counterpart to `lookup_domain` | +| `aio_lookup_ipv4` | async counterpart to `lookup_ipv4` | +| `aio_lookup_ipv6` | async counterpart to `lookup_ipv6` | +| `aio_lookup_asn` | async counterpart to `lookup_asn` | +| `DNSClient` | Reusable client for RDAP DNS queries | +| `IPv4Client` | Reusable client for RDAP IPv4 queries | +| `IPv6Client` | Reusable client for RDAP IPv6 queries | +| `ASNClient` | Reusable client for RDAP ASN queries | + + +#### Common Usage Patterns + +- Using the DNSClient: +```python +import whodap + +# Initialize an instance of DNSClient using classmethods: `new_client` or `new_aio_client` +dns_client = whodap.DNSClient.new_client() +for domain, tld in [('google', 'com'), ('google', 'buzz')]: + response = dns_client.lookup(domain, tld) + +# Equivalent asyncio call +dns_client = await whodap.DNSClient.new_aio_client() +for domain, tld in [('google', 'com'), ('google', 'buzz')]: + response = await dns_client.aio_lookup(domain, tld) + +# Use the DNSClient contextmanagers: `new_client_context` or `new_aio_client_context` +with whodap.DNSClient.new_client_context() as dns_client: + for domain, tld in [('google', 'com'), ('google', 'buzz')]: + response = dns_client.lookup(domain, tld) + +# Equivalent asyncio call +async with whodap.DNSClient.new_aio_client_context() as dns_client: + for domain, tld in [('google', 'com'), ('google', 'buzz')]: + response = await dns_client.aio_lookup(domain, tld) +``` + +- Configurable `httpx` client: + +```python +import asyncio + +import httpx +import whodap + +# Initialize a custom, pre-configured httpx client ... +httpx_client = httpx.Client(proxies=httpx.Proxy('https://user:pw@proxy_url.net')) +# ... or an async client +aio_httpx_client = httpx.AsyncClient(proxies=httpx.Proxy('http://user:pw@proxy_url.net')) + +# Three common methods for leveraging httpx clients are outlined below: + +# 1) Pass the httpx client directly into the convenience functions: `lookup_domain` or `aio_lookup_domain` +# Important: In this scenario, you are responsible for closing the httpx client. +# In this example, the given httpx client is used as a contextmanager; ensuring it is "closed" when finished. +async with aio_httpx_client: + futures = [] + for domain, tld in [('google', 'com'), ('google', 'buzz')]: + task = whodap.aio_lookup_domain(domain, tld, httpx_client=aio_httpx_client) + futures.append(task) + await asyncio.gather(*futures) + +# 2) Pass the httpx_client into the DNSClient classmethod: `new_client` or `new_aio_client` +aio_dns_client = await whodap.DNSClient.new_aio_client(aio_httpx_client) +result = await aio_dns_client.aio_lookup('google', 'buzz') +await aio_httpx_client.aclose() + +# 3) Pass the httpx_client into the DNSClient contextmanagers: `new_client_context` or `new_aio_client_context` +# This method ensures the underlying httpx_client is closed when exiting the "with" block. +async with whodap.DNSClient.new_aio_client_context(aio_httpx_client) as dns_client: + for domain, tld in [('google', 'com'), ('google', 'buzz')]: + response = await dns_client.aio_lookup(domain, tld) +``` + +#### Contributions +- Interested in contributing? +- Have any questions or comments? +- Anything that you'd like to see? +- Anything that doesn't look right? + +Please post a question or comment. + +#### Roadmap + +[alpha] 0.1.X Release: +- ~~Support for RDAP "domain" queries~~ +- ~~Support for RDAP "ipv4" and "ipv6" queries~~ +- ~~Support for RDAP ASN queries~~ +- Abstract the HTTP Client (`httpx` is the defacto client for now) +- Add parser utils/helpers for IPv4, IPv6, and ASN Responses (if someone shows interest) + +#### RDAP Resources: +- https://rdap.org/ +- https://tools.ietf.org/html/rfc7483 +- https://tools.ietf.org/html/rfc6350 + + +%package help +Summary: Development documents and examples for whodap +Provides: python3-whodap-doc +%description help +## whodap + +[](https://badge.fury.io/py/whodap) + +[](https://codecov.io/gh/pogzyb/whodap) +[](https://github.com/psf/black) + +`whodap` | Simple RDAP Utility for Python + +- Support for asyncio HTTP requests ([`httpx`](https://www.python-httpx.org/)) +- Leverages the [`SimpleNamespace`](https://docs.python.org/3/library/types.html#types.SimpleNamespace) type for cleaner RDAP Response traversal +- Keeps the familiar look of WHOIS via the `to_whois_dict` method for DNS lookups + +#### Quickstart + +```python +import asyncio +from pprint import pprint + +import whodap + +# Looking up a domain name +response = whodap.lookup_domain(domain='bitcoin', tld='org') +# Equivalent asyncio call +loop = asyncio.get_event_loop() +response = loop.run_until_complete(whodap.aio_lookup_domain(domain='bitcoin', tld='org')) +# "response" is a DomainResponse object. It contains the output from the RDAP lookup. +print(response) +# Traverse the DomainResponse via "dot" notation +print(response.events) +""" +[{ + "eventAction": "last update of RDAP database", + "eventDate": "2021-04-23T21:50:03" +}, + { + "eventAction": "registration", + "eventDate": "2008-08-18T13:19:55" +}, ... ] +""" +# Retrieving the registration date from above: +print(response.events[1].eventDate) +""" +2008-08-18 13:19:55 +""" +# Don't want "dot" notation? Use `to_dict` to get the RDAP response as a dictionary +pprint(response.to_dict()) +# Use `to_whois_dict` for the familiar look of WHOIS output +pprint(response.to_whois_dict()) +""" +{abuse_email: 'abuse@namecheap.com', + abuse_phone: 'tel:+1.6613102107', + admin_address: 'P.O. Box 0823-03411, Panama, Panama, PA', + admin_email: '2603423f6ed44178a3b9d728827aa19a.protect@whoisguard.com', + admin_fax: 'fax:+51.17057182', + admin_name: 'WhoisGuard Protected', + admin_organization: 'WhoisGuard, Inc.', + admin_phone: 'tel:+507.8365503', + billing_address: None, + billing_email: None, + billing_fax: None, + billing_name: None, + billing_organization: None, + billing_phone: None, + created_date: datetime.datetime(2008, 8, 18, 13, 19, 55), + domain_name: 'bitcoin.org', + expires_date: datetime.datetime(2029, 8, 18, 13, 19, 55), + nameservers: ['dns1.registrar-servers.com', 'dns2.registrar-servers.com'], + registrant_address: 'P.O. Box 0823-03411, Panama, Panama, PA', + registrant_email: '2603423f6ed44178a3b9d728827aa19a.protect@whoisguard.com', + registrant_fax: 'fax:+51.17057182', + registrant_name: 'WhoisGuard Protected', + registrant_organization: None, + registrant_phone: 'tel:+507.8365503', + registrar_address: '4600 E Washington St #305, Phoenix, Arizona, 85034', + registrar_email: 'support@namecheap.com', + registrar_fax: None, + registrar_name: 'NAMECHEAP INC', + registrar_phone: 'tel:+1.6613102107', + status: ['client transfer prohibited'], + technical_address: 'P.O. Box 0823-03411, Panama, Panama, PA', + technical_email: '2603423f6ed44178a3b9d728827aa19a.protect@whoisguard.com', + technical_fax: 'fax:+51.17057182', + technical_name: 'WhoisGuard Protected', + technical_organization: 'WhoisGuard, Inc.', + technical_phone: 'tel:+507.8365503', + updated_date: datetime.datetime(2019, 11, 24, 13, 58, 35)} +""" +``` + +#### Exported Functions and Classes + +| Object | Description | +| ----------- | ----------- | +| `lookup_domain` | Performs an RDAP query for the given Domain and TLD | +| `lookup_ipv4` | Performs an RDAP query for the given IPv4 address | +| `lookup_ipv6` | Performs an RDAP query for the given IPv6 address | +| `lookup_asn` | Performs an RDAP query for the Autonomous System with the given Number | +| `aio_lookup_domain` | async counterpart to `lookup_domain` | +| `aio_lookup_ipv4` | async counterpart to `lookup_ipv4` | +| `aio_lookup_ipv6` | async counterpart to `lookup_ipv6` | +| `aio_lookup_asn` | async counterpart to `lookup_asn` | +| `DNSClient` | Reusable client for RDAP DNS queries | +| `IPv4Client` | Reusable client for RDAP IPv4 queries | +| `IPv6Client` | Reusable client for RDAP IPv6 queries | +| `ASNClient` | Reusable client for RDAP ASN queries | + + +#### Common Usage Patterns + +- Using the DNSClient: +```python +import whodap + +# Initialize an instance of DNSClient using classmethods: `new_client` or `new_aio_client` +dns_client = whodap.DNSClient.new_client() +for domain, tld in [('google', 'com'), ('google', 'buzz')]: + response = dns_client.lookup(domain, tld) + +# Equivalent asyncio call +dns_client = await whodap.DNSClient.new_aio_client() +for domain, tld in [('google', 'com'), ('google', 'buzz')]: + response = await dns_client.aio_lookup(domain, tld) + +# Use the DNSClient contextmanagers: `new_client_context` or `new_aio_client_context` +with whodap.DNSClient.new_client_context() as dns_client: + for domain, tld in [('google', 'com'), ('google', 'buzz')]: + response = dns_client.lookup(domain, tld) + +# Equivalent asyncio call +async with whodap.DNSClient.new_aio_client_context() as dns_client: + for domain, tld in [('google', 'com'), ('google', 'buzz')]: + response = await dns_client.aio_lookup(domain, tld) +``` + +- Configurable `httpx` client: + +```python +import asyncio + +import httpx +import whodap + +# Initialize a custom, pre-configured httpx client ... +httpx_client = httpx.Client(proxies=httpx.Proxy('https://user:pw@proxy_url.net')) +# ... or an async client +aio_httpx_client = httpx.AsyncClient(proxies=httpx.Proxy('http://user:pw@proxy_url.net')) + +# Three common methods for leveraging httpx clients are outlined below: + +# 1) Pass the httpx client directly into the convenience functions: `lookup_domain` or `aio_lookup_domain` +# Important: In this scenario, you are responsible for closing the httpx client. +# In this example, the given httpx client is used as a contextmanager; ensuring it is "closed" when finished. +async with aio_httpx_client: + futures = [] + for domain, tld in [('google', 'com'), ('google', 'buzz')]: + task = whodap.aio_lookup_domain(domain, tld, httpx_client=aio_httpx_client) + futures.append(task) + await asyncio.gather(*futures) + +# 2) Pass the httpx_client into the DNSClient classmethod: `new_client` or `new_aio_client` +aio_dns_client = await whodap.DNSClient.new_aio_client(aio_httpx_client) +result = await aio_dns_client.aio_lookup('google', 'buzz') +await aio_httpx_client.aclose() + +# 3) Pass the httpx_client into the DNSClient contextmanagers: `new_client_context` or `new_aio_client_context` +# This method ensures the underlying httpx_client is closed when exiting the "with" block. +async with whodap.DNSClient.new_aio_client_context(aio_httpx_client) as dns_client: + for domain, tld in [('google', 'com'), ('google', 'buzz')]: + response = await dns_client.aio_lookup(domain, tld) +``` + +#### Contributions +- Interested in contributing? +- Have any questions or comments? +- Anything that you'd like to see? +- Anything that doesn't look right? + +Please post a question or comment. + +#### Roadmap + +[alpha] 0.1.X Release: +- ~~Support for RDAP "domain" queries~~ +- ~~Support for RDAP "ipv4" and "ipv6" queries~~ +- ~~Support for RDAP ASN queries~~ +- Abstract the HTTP Client (`httpx` is the defacto client for now) +- Add parser utils/helpers for IPv4, IPv6, and ASN Responses (if someone shows interest) + +#### RDAP Resources: +- https://rdap.org/ +- https://tools.ietf.org/html/rfc7483 +- https://tools.ietf.org/html/rfc6350 + + +%prep +%autosetup -n whodap-0.1.8 + +%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-whodap -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Wed May 10 2023 Python_Bot <Python_Bot@openeuler.org> - 0.1.8-1 +- Package Spec generated @@ -0,0 +1 @@ +f4b16a162be703f2864165ce70406a27 whodap-0.1.8.tar.gz |
