Skip to content

Latest commit

 

History

History
73 lines (49 loc) · 1.61 KB

README.rst

File metadata and controls

73 lines (49 loc) · 1.61 KB
reverse-mx-py license reverse-mx-py release reverse-mx-py build

Overview

The client library for Reverse MX API in Python language.

The minimum Python version is 3.6.

Installation

pip install reverse-mx

Examples

Full API documentation available here

Create a new client

from reversemx import *

client = Client('Your API key')

Make basic requests

# Get the number of domains.
result = client.data('aspmx.l.google.com')
print(result.size)

# Get raw API response
raw_result = client.raw_data(
    "aspmx.l.google.com",
    response_format=Client.XML_FORMAT
)

Advanced usage

Extra request parameters

result = client.data("aspmx.l.google.com", search_from="9")

resp = client.data("aspmx.l.google.com")
if resp.has_next():
    next_page = client.next_page("aspmx.l.google.com", resp)

for page in client.iterate_pages("aspmx.l.google.com"):
    print(page)