Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

A django rest framework (DRF) policy sign for aliyun oss

Project description


This package is to provide aliyun oss policy and sign from the backend to clients such as Android, iOS devices and specially mini programs on Weixin.

Many examples and demos even on the official page put access key and secrets directly in the clients, which can be very dangerous since all the code are actually not encrypted.

This package obtain policy and its encrypted sign in the backend, which is then passed by a request


The package is based on django restframework, so both django and django rest framework should be installed.

If not, you can import from 'oss_poly_sign.generators' to generate the policy code and auth.

How to Use

  1. Step 1: pip install oss-policy-sign
  2. Added the following settings in your
OSS_TIMEOUT = 60 # 60 minutes, an hour
OSS_MAXSIZE = 10 # 10M
  1. Added the following to your
  from oss_policy_sign.views import OssAuthViewSet
  urlpatterns = [
        #  ...
        url(r'^oss/auth/', OssAuthViewSet),
  1. test it by making a request

Project details

Download files

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

Files for oss-policy-sign, version 1.2
Filename, size File type Python version Upload date Hashes
Filename, size oss_policy_sign-1.2-py3-none-any.whl (8.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size oss_policy_sign-1.2.tar.gz (2.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page