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 details)

Uploaded Python 3

File details

Details for the file website_categorization-1.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for website_categorization-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3feb03029b786770a0df1ceef09379ee00c2652cbfbce83dbecb84f70a97faf9
MD5 ee687d54ed4e92835c3a99d70ad5752e
BLAKE2b-256 465a9685f130981b1918ca4988d7c75ffaca0c704274ad3ab4a76a25955f0730

See more details on using hashes here.

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