Skip to main content

Python client library for Reverse Whois API.

Project description

reverse-whois-py license reverse-whois-py release reverse-whois-py build

Overview

The client library for Reverse Whois API in Python language.

The minimum Python version is 3.6.

Installation

pip install reverse-whois

Examples

Full API documentation available here

Create a new client

from reversewhois import *

client = Client('Your API key')

Make basic requests

# Get the number of domains.
terms = {
    'include': ['blog']
}
result = client.preview(basic_terms=terms)
print(result.domains_count)

# Get raw API response
raw_result = client.raw_data(
    basic_terms=terms,
    response_format=Client.XML_FORMAT,
    mode=Client.PREVIEW_MODE)

# Get list of registered/dropped domains (up to 10,000)
result = client.purchase(
    basic_terms=terms
)

Advanced usage

Extra request parameters

advanced_terms = [{
    'field': Fields.domain_name,
    'term': "whoisxmlapi.*"
}]
updated_date = datetime.date(2020, 1, 1)
result = client.purchase(
    advanced_terms=advanced_terms,
    updated_date_from=updated_date,
    include_audit_dates=True,
    punycode=False)

#Next page
response = client.purchase(
    basic_terms=terms
)
if response.has_next():
    next_page = client.next_page(
        current_page=response,
        basic_terms=terms
    )

#Iterating
for page in client.iterate_pages(basic_terms=terms):
    print(page)

Changelog

1.0.0 (2021-05-25)

  • First release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reverse-whois-1.0.0.tar.gz (11.9 kB view hashes)

Uploaded Source

Built Distribution

reverse_whois-1.0.0-py3-none-any.whl (12.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page