This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Scope

keepluggable is an open source, (MIT licensed), highly configurable Python library to manage storage of images and other documents (any kind of file, really), with metadata.

The file metadata can be stored in a different place than the file payload. This is recommended because many operations, such as listing files, do not involve actual file content, so you should avoid loading it. Also, payloads should be optimized for serving and metadata should be optimized for querying.

For file payloads, we currently have implemented one backend that stores them in Amazon S3. There is also a very simple backend that stores files in the local filesystem (useful during development).

For (optionally) storing the metadata we currently provide a base SQLAlchemy backend for you to subclass.

In both cases, you can easily write other storage backends.

Using this library you can more easily have your user upload images (or any kind of file) and enter metadata about them, such as name, description, date, place, alt text, title attribute etc.

Some of the metadata is automatically found, such as file size, mime type, image size, aspect ratio, MD5 checksum etc.

The code is highly decoupled so you can tweak the behaviour easily.

The business rules are implemented in a separate layer (isolated from any of the storage strategies and any UI), called an “action” layer. (This is commonly known as a “service” layer, but we call it “action”.) This makes it possible for us to have any storage backends and use any web frameworks or other UI frameworks.

Each application has its own business rules, therefore it is likely that you will subclass the provided action layer to tweak the workflow for your purposes.

One such “action” is the pluggable policy for uploaded image treatment. For instance, the default policy converts the original uploaded image to the JPEG format (so it will never store an unecessarily large BMP), optionally stores the original image in whatever size it is, then creates configurable smaller versions of it.

Some cameras do not rotate the photo, they just add orientation metadata to the image file, so keepluggable rotates it for you, before creating the thumbnails.

Get started with keepluggable!

Future

We want the experience to be as convenient as possible for the user:

  • CSRF protection
  • Read EXIF data to fill in date and location, hopefully before the user types these
  • Read other EXIF, IPTC, and XMP metadata in photo files
  • Detect whether an image is already in the store and let the user edit it
  • Allow the user to draw a square on the image to generate the thumbnail
  • Configure what kinds of files are accepted (e. g. only images)
  • generate image tag with alt, title (maybe legend) etc.
  • trigger an event when image is uploaded
  • search images to edit or remove them
  • http caching
  • tags
  • Integrate with Celery to create image versions in a background task

Collaboration

We want your help. We are open to bug reports, feature requests, suggestions and (especially) pull requests. Reach us at https://github.com/nandoflorestan/keepluggable/issues

Release History

Release History

0.3.0

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0a0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
keepluggable-0.3.0.tar.gz (20.8 kB) Copy SHA256 Checksum SHA256 Source Mar 25, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting