Skip to main content

Python client library for Reverse IP/DNS API.

Project description

reverse-ip-py license reverse-ip-py release reverse-ip-py build

Overview

The client library for Reverse IP/DNS API in Python language.

The minimum Python version is 3.6.

Installation

pip install reverse-ip

Examples

Full API documentation available here

Create a new client

from reverseip import *

client = Client('Your API key')

Make basic requests

# Get parsed records as a model instance.
result = client.data('8.8.8.8')
print(result.size)
for record in result.result:
    print("Domain: {}, visited: {}".format(
            record.name, record.last_visit))

# Get raw API response
resp_str = client.raw_data('1.1.1.1')

Advanced usage

Pagination

for response in client.iterate_over('1.1.1.1'):
    # Working with the current page
    print(response.size)
    for record in response.result:
        print(record.name)


# Alternative way
try:
    response = client.data('1.1.1.1')
    # processing
    # ...
    while response.has_next:
        response = client.next_page('1.1.1.1', response)
        # processing
        # ...
except ReverseIpApiError as error:
    print(error.message)

Get raw data in XML

raw = client.raw_data('1.1.1.1', output_format='xml')
print(raw)

Changelog

1.1.0 (2021-04-22)

  • Minor fixes
  • UnparsableApiResponse error class was renamed to UnparsableApiResponseError

1.0.1 (2021-04-21)

  • README update.

1.0.0 (2021-04-20)

  • 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-ip-1.1.0.tar.gz (8.9 kB view hashes)

Uploaded source

Built Distribution

reverse_ip-1.1.0-py3-none-any.whl (9.2 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page