Python client library for Website Categorization API.
Project description
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
Release history Release notifications | RSS feed
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
File details
Details for the file website_categorization-1.1.2-py3-none-any.whl
.
File metadata
- Download URL: website_categorization-1.1.2-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3feb03029b786770a0df1ceef09379ee00c2652cbfbce83dbecb84f70a97faf9 |
|
MD5 | ee687d54ed4e92835c3a99d70ad5752e |
|
BLAKE2b-256 | 465a9685f130981b1918ca4988d7c75ffaca0c704274ad3ab4a76a25955f0730 |