Metadata-Version: 2.1
Name: brand-alert
Version: 1.0.0
Summary: Python client library for Brand Alert API.
Home-page: https://github.com/whois-api-llc/brand-alert-py
Author: WHOIS API, Inc
Author-email: support@whoisxmlapi.com
License: MIT
Keywords: brand,alert,domain,api,whoisxmlapi
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: Unix
Classifier: Operating System :: POSIX
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Utilities
Requires-Python: >=3.6
Requires-Dist: requests
Provides-Extra: dev
Requires-Dist: tox ; extra == 'dev'
Requires-Dist: flake8 ; extra == 'dev'

.. image:: https://img.shields.io/badge/License-MIT-green.svg
    :alt: brand-alert-py license
    :target: https://opensource.org/licenses/MIT

.. image:: https://img.shields.io/pypi/v/brand-alert.svg
    :alt: brand-alert-py release
    :target: https://pypi.org/project/brand-alert

.. image:: https://github.com/whois-api-llc/brand-alert-py/workflows/Build/badge.svg
    :alt: brand-alert-py build
    :target: https://github.com/whois-api-llc/brand-alert-py/actions

========
Overview
========

The client library for
`Brand Alert API <https://brand-alert.whoisxmlapi.com/>`_
in Python language.

The minimum Python version is 3.6.

Installation
============

.. code-block:: shell

    pip install brand-alert

Examples
========

Full API documentation available `here <https://brand-alert.whoisxmlapi.com/api/documentation/making-requests>`_

Create a new client
-------------------

.. code-block:: python

    from brandalert import *

    client = Client('Your API key')

Make basic requests
-------------------

.. code-block:: python

    # Get the number of domains.
    result = client.preview(['google'])
    print(result.domains_count)

    # Get raw API response
    raw_result = client.raw_data(
        ['google'],
        response_format=Client.XML_FORMAT,
        mode=Client.PREVIEW_MODE)

    # Get list of recently registered/dropped domains (up to 10,000)
    result = client.purchase(['google'])

Advanced usage
-------------------

Extra request parameters

.. code-block:: python

    today = datetime.date.today()
    delta = datetime.timedelta(days=10)
    result = client.purchase(
        ['google'],
        exclude_terms=['blog'],
        since_date=today - delta,
        with_typos=True,
        punycode=False)

    raw_result = client.raw_data(
        ['google'],
        exclude_terms=['blog'],
        since_date=today - delta,
        with_typos=True,
        punycode=False,
        mode=Client.PURCHASE_MODE,
        response_format=Client.JSON_FORMAT)


Changelog
=========

1.0.0 (2021-05-04)
------------------

* First release

