Skip to content

Latest commit

 

History

History
74 lines (51 loc) · 1.81 KB

README.rst

File metadata and controls

74 lines (51 loc) · 1.81 KB
domain-availability-py license domain-availability-py release domain-availability-py build

Overview

The client library for Domain Availability API in Python language.

The minimum Python version is 3.6.

Installation

pip install domain-availability

Examples

Full API documentation available here

Create a new client

from domainavailability import *

client = Client('Your API key')

Make basic requests

# Get parsed records as a model instance.
result = client.data('whoisxmlapi.com')
print(result.domain_availability)
if result.is_available() is True:
    print('This domain name is available.')

# Get raw API response
raw_result = client.raw_data('whoisxmlapi.com')

Advanced usage

Extra request parameters

result = client.data(
    'whoisxmlapi.com',
    mode=Client.DNS_AND_WHOIS_MODE,
    credits_type=Client.DOMAIN_AVAILABILITY_CREDITS)

raw_result = client.raw_data(
    'whoisxmlapi.com',
    mode=Client.DNS_ONLY_MODE,
    credits_type=Client.WHOIS_CREDITS,
    output_format=Client.XML_FORMAT)