Nowadays, most of the database applications are used to allow users to upload and attach files of various types to ORM models.
Handling those jobs is not simple if you have to care about Security, High-Availability, Scalability, CDN and more things you may have already been concerned. Accepting a file from public space, analysing, validating, processing(Normalizing) and making it available to public space again is the main goal of this project.
Sql-Alchemy is the best platform for implementing this stuff. It has the SqlAlchemy Mutable types facility to manipulate the objects with any type in-place. why not ?
The main idea comes from dahlia’s SQLAlchemy-ImageAttach.
- Storing and locating any file, tracking it by sqlalchemy models.
- Storage layer is completely separated from data model, with a simple api: (put, delete, open, locate)
- Using any SqlAlchemy data type which interfaces Python dictionary. This is achieved by using the SqlAlchemy Type Decorators and SqlAlchemy Mutable.
delete_orphanflag to automatically delete files which orphaned via attribute set or delete from collections, or objects leaved in memory alone! by setting it’s last pointer to None.
- Attaching files from Url, LocalFileSystem and Streams.
- Extracting the file’s mimetype from the backend stream if possible, using
- Limiting file size(min, max), to prevent DOS attacks.
- Adding timestamp in url to help caching.
- Auto generating thumbnails, using
- Analyzing files & images using
- Automatically resize & reformat images before store.
- Image & Thumbnails
- Playing with Analyzers and Validators
- API Reference
- attachments Module
- descriptors Module
- stores Module
- processors Module
- exceptions Module
- Other Modules