Skip to main content

Python client library for Website Categorization API.

Project description

website-categorization-py license website-categorizations-py release website-categorization-py build

Overview

The client library for Website Categorization API in Python language.

The minimum Python version is 3.7.

Installation

pip install website-categorization

Examples

Full API documentation available here

Create a new client

from websitecategorization import *

client = Client('Your API key')

Make basic requests

# Get categories for a domain name.
response = client.data('whoisxmlapi.com')
print("Responded? " + "Yes" if response.website_responded else "No")
if response.website_responded:
    for cat in response.categories:
        print("Cat: " + str(cat.name))

Advanced usage

Extra request parameters

# Specifying minimal level of confidence
response = client.data('whoisxmlapi.com', 0.75)

# Getting raw API response in XML
xml = client.raw_data('whoisxmlapi.com', output_format=Client.XML_FORMAT)

Changelog

1.1.2 (2023-11-30)

  • Add list categories method

  • Minimum Python version is now 3.7

1.1.1 (2023-10-30)

  • Migrate to Website Categorization API v3

1.0.0 (2021-07-08)

  • 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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

website_categorization-1.1.2-py3-none-any.whl (10.2 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