https://github.com/whois-api-llc/website-categorization-py
Website Categorization API client library for Python
https://github.com/whois-api-llc/website-categorization-py
categorization category-api python website-categorization whoisxmlapi
Last synced: about 1 year ago
JSON representation
Website Categorization API client library for Python
- Host: GitHub
- URL: https://github.com/whois-api-llc/website-categorization-py
- Owner: whois-api-llc
- License: mit
- Created: 2021-07-06T17:39:00.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-11-30T08:44:02.000Z (over 2 years ago)
- Last Synced: 2025-02-26T01:45:40.304Z (about 1 year ago)
- Topics: categorization, category-api, python, website-categorization, whoisxmlapi
- Language: Python
- Homepage: https://website-categorization.whoisxmlapi.com/api
- Size: 17.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG.rst
- License: LICENSE
- Authors: AUTHORS.rst
Awesome Lists containing this project
README
.. image:: https://img.shields.io/badge/License-MIT-green.svg
:alt: website-categorization-py license
:target: https://opensource.org/licenses/MIT
.. image:: https://img.shields.io/pypi/v/website-categorization.svg
:alt: website-categorizations-py release
:target: https://pypi.org/project/website-categorization
.. image:: https://github.com/whois-api-llc/website-categorization-py/workflows/Build/badge.svg
:alt: website-categorization-py build
:target: https://github.com/whois-api-llc/website-categorization-py/actions
========
Overview
========
The client library for
`Website Categorization API `_
in Python language.
The minimum Python version is 3.7.
Installation
============
.. code-block:: shell
pip install website-categorization
Examples
========
Full API documentation available `here `_
Create a new client
-------------------
.. code-block:: python
from websitecategorization import *
client = Client('Your API key')
Make basic requests
-------------------
.. code-block:: python
# 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
.. code-block:: python
# 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)