Skip to main content

client for the Mirador image moderation API. (mirador.im)

Project description

The Mirador client to our Image Moderation API provides functionality for the simple moderation of image files and publically-accessible image URLs, along with integration into popular web and application frameworks. Basic usage:

#!/usr/bin/env python
from mirador import MiradorClient

client = MiradorClient('your_api_key')

for id, result in client.classify_files({ 'nsfw': 'nsfw.jpg', 'sfw': 'sfw.jpg'}):
    print "{id}: {safe}, {value}".format(**result.__dict__)

# you can classify a single file or url
result = client.classify_url('http://static.mirador.im/nsfw.jpg')
other = client.classify_file('images/test.png')

# if you have a buffer (e.g., from a file upload), you can work directly with that:
res = client.classify_buffers(open('test.jpg', 'r').read(), open('mypix.jpg', 'r').read())

# you can also classify data URIs
data_uri = client.classify_data_uri(my_uri='data:image/jpg;base64,faefae3ro3irhreafer30024rfafe==')

# kwargs lets you set IDs for request/results
data_uri = client.classify_data_uri(another_example=request['data_uri'])

print data_uri.id # "another_example"

Full Documentation/More Info

For more information please see the github: http://github.com/mirador-cv/mirador-py And our website: http://mirador.im/documentation

Project details


Release history Release notifications

History Node

0.3.3

History Node

0.3.2

This version
History Node

0.3.1

History Node

0.3.0

History Node

0.2.3

History Node

0.2.2

History Node

0.2.1

History Node

0.2.0

History Node

0.1.5

History Node

0.1.4

History Node

0.1.3

History Node

0.1.2

History Node

0.1.1

History Node

0.1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
Mirador-0.3.1.tar.gz (9.6 kB) Copy SHA256 hash SHA256 Source None Aug 6, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page