asyncwhois
Async-compatible Python module for retrieving WHOIS information of domains. Based on richardpenman/pywhois_
Installation
.. code-block:: bash
pip install asyncwhois
Examples
asyncio
.. code-block:: python
import asyncio
import time
import asyncwhois
async def main():
urls = [
'https://www.google.co.uk',
'en.wikipedia.org/wiki/Pi',
'https://www.urbandictionary.com/define.php?term=async',
'twitch.tv',
'reuters.com',
'https://www.pcpartpicker.com',
'https://packaging.python.org/',
'imgur.com'
]
tasks = []
for url in urls:
awaitable = asyncwhois.lookup(url)
tasks.append(awaitable)
await asyncio.gather(*tasks)
if __name__ == '__main__':
start = time.time()
asyncio.run(main())
print(f'Done! [{round(time.time() - start, 4)}] seconds.')
aiohttp
.. code-block:: python
from aiohttp import web
import asyncwhois
async def whois(request):
domain = request.match_info.get('domain', 'google.com')
result = await asyncwhois.lookup(domain)
return web.Response(text=f'WhoIs parsed:\n{result}')
app = web.Application()
app.add_routes([web.get('/whois/{domain}', whois)])
web.run_app(app)
.. _richardpenman/pywhois: https://github.com/richardpenman/pywhois
Metadata
Release files for asyncwhois 0.1.1
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 |
|---|---|---|---|---|
| asyncwhois-0.1.1.tar.gz | 88.4 kB | Without provenance | Details for asyncwhois-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| asyncwhois-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for asyncwhois-0.1.1-py3-none-any.whl |
Total release size: 178.4 kB
Release files / asyncwhois-0.1.1.tar.gz
| Download URL | asyncwhois-0.1.1.tar.gz |
|---|---|
| Size | 88.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
50288a3872aa249e9a82d69f5958602111ca758362fe9322e2b736cd6008c4f6
|
|
BLAKE2b-256 checksum How to use checksums |
66e61dc4b31eb344808077b930a849f63242ea372fa482f999ea9a27277efc5e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
|
Release files / asyncwhois-0.1.1-py3-none-any.whl
| Download URL | asyncwhois-0.1.1-py3-none-any.whl |
|---|---|
| Size | 90.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
473dda23c8e4b1a989c4839d23bfa559641bf2115f0acbca7bfa548a2600941b
|
|
BLAKE2b-256 checksum How to use checksums |
948cfd819b7826aa94b803229496b7001bdc57dad9ec7037fbfbbc90e32fafe2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
|
Security for asyncwhois 0.1.1
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.