Skip to main content

Python client library for accessing PicPurify moderation API

Project description

picpurify-python-client

Python client library for accessing PicPurify moderation API.

Before starting

Please make sure you have created an account on https://www.picpurify.com/signup.html to collect your personal API key.

Your personnal API key can be found in your dashboard in the "API keys" tab: https://www.picpurify.com/apikey.html

Installation

pip install picpurify

Usage

from picpurify.api import PicPurifyImage, PicPurifyException

image_client = PicPurifyImage('YOUR_PERSONAL_API_KEY', ['porn_moderation', 'gore_moderation', 'obscene_gesture_moderation'])

try:
    response = image_client.analyse('https://s3-eu-west-1.amazonaws.com/site-picpurify/images/porn-accepted-example.jpg')
    if response['final_decision'] == 'OK':
        print('Image Accepted')
    else:
        print('Image Rejected')
        print('Reject criteria: %s' % (','.join(response['reject_criteria'])))
except PicPurifyException as e:
    print(e)

Documentation

API documentation can be found at https://www.picpurify.com/api-services.html.

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

picpurify-1.0.4.tar.gz (4.8 kB view details)

Uploaded Source

File details

Details for the file picpurify-1.0.4.tar.gz.

File metadata

  • Download URL: picpurify-1.0.4.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.10

File hashes

Hashes for picpurify-1.0.4.tar.gz
Algorithm Hash digest
SHA256 1f26c4142348ceba5991fbd33ca704f4fb4f7bfb4e120238144af70735955f16
MD5 c2c43e8eb89c3418a1fa83f3d604bfa8
BLAKE2b-256 f3fee71b68e0ca3cb320a25f37a1ce19c37b6bd6b388074054aad501d891f2fe

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page