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.6.

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:
        if cat.tier1:
            print("Tier1 cat: " + str(cat.tier1.name))
        if cat.tier2:
            print("Tier2 cat: " + str(cat.tier2.name))

Advanced usage

Extra request parameters

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

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

Changelog

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 Distribution

website-categorization-1.0.0.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

website_categorization-1.0.0-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file website-categorization-1.0.0.tar.gz.

File metadata

  • Download URL: website-categorization-1.0.0.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.10

File hashes

Hashes for website-categorization-1.0.0.tar.gz
Algorithm Hash digest
SHA256 602aaf7ba9af562b21eb0d2926aa41cd5c9d7b9837a417a4327209ef0a61e2aa
MD5 f3effd937810e623bbbe4b403808c1a2
BLAKE2b-256 947e65b87b50ffdf140cd4e748d94c75d96aada61978414a333abbb799fa6ba8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: website_categorization-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.10

File hashes

Hashes for website_categorization-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8f160e6176a2fde0251f24ce7995d132073039be8d474c6de553cb6b598e0747
MD5 004f954d9f829f2b633f84aee517f62b
BLAKE2b-256 cfc0870de1130bbcb3487c8e63cab7fca6216db4661f67e44dfe93ff7592f721

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