Skip to main content

A package for interacting with the Perspective API

Project description

perspective

perspective is an API wrapper for Google's Perspective API

Installation

To install, use pip install perspective

Usage

A simple example:

from perspective import PerspectiveAPI
p = Perspective("API_KEY")
result = p.score("This is a comment")
print("Toxicity score: " + result["TOXICITY"])

More complex

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

perspective-1.0.3.tar.gz (6.1 kB view hashes)

Uploaded source

Built Distribution

perspective-1.0.3-py3-none-any.whl (7.0 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page