Toolkit for storing files and attachments in web applications
Project description
DEPOT - File Storage Made Easy
DEPOT is a framework for easily storing and serving files in web applications on Python2.6+ and Python3.2+.
Installing
Installing DEPOT can be done from PyPi itself by installing the filedepot distribution:
$ pip install filedepot
Getting Started
To start using Depot refer to Documentation
DEPOT was presented at PyConUK and PyConFR in 2014
Here is a simple example of using depot standalone to store files on MongoDB:
from depot.manager import DepotManager # Configure a *default* depot to store files on MongoDB GridFS DepotManager.configure('default', { 'depot.backend': 'depot.io.gridfs.GridFSStorage', 'depot.mongouri': 'mongodb://localhost/db' }) depot = DepotManager.get() # Save the file and get the fileid fileid = depot.create(open('/tmp/file.png')) # Get the file back stored_file = depot.get(fileid) print stored_file.filename print stored_file.content_type
ChangeLog
0.1.2
It is now possible to use multiple WithThumbnailFilter to generate multiple thumbnails with different resolutions.
Better documentation for MongoDB UploadedFileProperty
0.1.1
Fixed a bug with Ming support when acessing UploadedFileProperty as a class property
Improved support for DEPOT inside TurboGears admin when using MongoDB
0.1.0
Added DepotManager.alias to configure aliases to storage. This allows easy migration from one storage to another by switching where the alias points.
Now UploadedFileField permits to specify upload_storage to link a Model Column to a specific storage.
Added policy and encrypt_key options to S3Storage to upload private and encrypted files.
0.0.6
Added host option to S3Storage to allow using providers different from AWS.
0.0.5
Added FileIntent to explicitly provide content_type and filename to uploaded content.
0.0.4
Added Content-Disposition header with original filename in WSGI middleware
0.0.3
Work-Around for issue with wsgi.file_wrapper provided by Waitress WSGI Server
0.0.2
Official Support for AWS S3 on Python3
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file filedepot-0.1.2.tar.gz
.
File metadata
- Download URL: filedepot-0.1.2.tar.gz
- Upload date:
- Size: 18.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49bccbaa088a57c269d5232540d98e47b1e6344d9bba0843a5d1321f9b5b7e19 |
|
MD5 | f039b5d6bc9a8ef151a126af5762de0d |
|
BLAKE2b-256 | 406e2d245715b1f1651ef3cc50023bcbb266068ac64d5551f044d540a226dec9 |