Skip to main content

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

Metadata

Release files for Mirador 0.3.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Mirador 0.3.3
File Size Uploaded Provenance
Mirador-0.3.3.tar.gz 9.9 kB Without provenance Details

Release files / Mirador-0.3.3.tar.gz

Download URL Mirador-0.3.3.tar.gz
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
59c2d56a7ed6d9146ac5eea56e2380857eea84a625403834be721eb6c2cd48a7
BLAKE2b-256 checksum
How to use checksums
df92c1cc9cf4c3ddfdfca50c48e38f7fd1238abc71ffad7d91d48474fafb442b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for Mirador 0.3.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page