Skip to main content

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)

Source distribution for asyncwhois 0.1.1
File Size Uploaded
asyncwhois-0.1.1.tar.gz 88.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for asyncwhois 0.1.1
File Interpreter ABI Platform
asyncwhois-0.1.1-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

1.1.14

2 release files

1.1.13

2 release files

1.1.12

2 release files

1.1.11

2 release files

1.1.9

2 release files

1.1.8

2 release files

1.1.7

2 release files

1.1.6

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.10

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

1 release file

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.7

2 release files

0.1.2

2 release files

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page