Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (
Help us improve Python packaging - Donate today!

Django AWS S3 Signed Requests API with Django Rest Framework

Project Description

Django rest framework views to get a S3 signed url to PUT or GET to AWS S3


This views doesn’t provide any authentication nor permission classes. This means that ANYONE can have access to them if your API is public. It’s highly recomended to add authentication_classes and permission_classes.


import djassr

class MyS3PUTSignatureAPIView(djassr.GetPUTSignature):
    authentication_classes = (TokenAuthentication, )
    permission_classes = (IsAuthenticated,)


File names are replaced by a uuid.uuid4 + the extension. For example “myfile.png” will become “7afad9bc-00d3-46ed-86bf-5ccc52eebd50.png”.


The duration of the link is by default 60 seconds. To change this you can overwrite the get_valid method for the signature class. It must return an integer wich is the time in seconds the link will be valid.


$ pip install djassr



url('^put_signed_url/$', djassr.views.GetPUTSignature.as_view()),


You can look at and run the demo project.

pip install -r requirements-dev.txt
pip install -e ../
cd demop
python migrate
python runserver

Go to http://localhost:8000/api/

Release History

This version
History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Hash SHA256 Hash Help Version File Type Upload Date
(2.4 kB) Copy SHA256 Hash SHA256
Source Jul 1, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS 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