Skip to main content

SQLAlchemy extension for attaching images to entity objects

Project description

PyPI Read the Docs Build Status Coverage Status

SQLAlchemy-ImageAttach is a SQLAlchemy extension for attaching images to entity objects. It provides the following features:

Storage backend interface

You can use file system backend on your local development box, and switch it to AWS S3 when it’s deployed to the production box. Or you can add a new backend implementation by yourself.

Maintaining multiple image sizes

Any size of thumbnails can be generated from the original size without assuming the fixed set of sizes. You can generate a thumbnail of a particular size if it doesn’t exist yet when the size is requested. Use RRS (Reduced Redundancy Storage) for reproducible thumbnails on S3.

Every image has its URL

Attached images can be exposed as a URL.

SQLAlchemy transaction aware

Saved file are removed when the ongoing transaction has been rolled back.

Tested on various environments
  • Python versions: Python 2.7, 3.3 or higher, PyPy

  • DBMS: PostgreSQL, MySQL, SQLite

  • SQLAlchemy: 0.9 or higher (tested on 0.9 to 1.1; see CI as well)


It’s available on PyPI:

$ pip install SQLAlchemy-ImageAttach

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

SQLAlchemy-ImageAttach-1.1.0.tar.gz (29.0 kB view hashes)

Uploaded Source

Built Distribution

SQLAlchemy_ImageAttach-1.1.0-py2.py3-none-any.whl (34.7 kB view hashes)

Uploaded Python 2 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