Skip to main content

SuperDuper Pillow is a plugin for SuperDuper that provides support for Pillow.

Project description

superduper_pillow

SuperDuper Pillow is a plugin for SuperDuper that provides support for Pillow.

Installation

pip install superduper_pillow

API

Class Description

Examples

We can use the pil_image field type to store images in a database.

from superduper import superduper
from superduper import Table, Schema
from superduper_pillow import pil_image
from PIL import Image

table = Table("image", schema=Schema(identifier="image", fields={"img": pil_image}))
db = superduper('mongomock://test')
db.apply(table)

# Inserting an image
db["image"].insert([{"img": Image.open("test/material/data/1x1.png")}]).execute()

# Selecting an image
list(db["image"].select().execute())

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

superduper_pillow-0.0.5.tar.gz (12.2 kB view hashes)

Uploaded Source

Built Distribution

superduper_pillow-0.0.5-py3-none-any.whl (11.4 kB view hashes)

Uploaded Python 3

Supported by

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