Skip to main content

# Django Aliyun OSS2 Storage

### Django storage for [阿里云 OSS2](https://www.aliyun.com/product/oss/?spm=5176.383338.201.42.WB7sGd)

## Install

pip install django-aliyun-oss2-storage

## Configurations

Django Aliyun OSS2 Storage 需要以下几个配置才能正常工作。这些配置通过可以环境变量或 settings.py 来设置。环境变量的优先级要高于 settings.py 。BUCKET_NAME`是Bucket的名字,如果该bucket不存在,程序会自动创建。`BUCKET_ACL_TYPE`用于设置Bucket的权限,可以设置为`private, public-read`和 `public-read-write。

`python ACCESS_KEY_ID = "40ZhE1HyuWdllpMh" ACCESS_KEY_SECRET = "KbxtlKSvKyuyuymTiQvrxhsYFMguXy" END_POINT = "oss-us-west-1.aliyuncs.com" BUCKET_NAME = "XXXX" BUCKET_ACL_TYPE = "private" # private, public-read, public-read-write `

## Usage

在 settings.py 里设置 DEFAULT_FILE_STORAGE :

`python # mediafile将自动上传 DEFAULT_FILE_STORAGE = 'aliyun_oss2_storage.backends.AliyunMediaStorage' # staticfile将自动上传 STATICFILES_STORAGE = 'aliyun_oss2_storage.backends.AliyunStaticStorage' `

## License

基于MIT许可证发布

Metadata

Release files for django-aliyun-oss2-storage 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-aliyun-oss2-storage 0.1.4
File Size Uploaded Provenance
django-aliyun-oss2-storage-0.1.4.tar.gz 5.3 kB Without provenance Details

Release files / django-aliyun-oss2-storage-0.1.4.tar.gz

Download URL django-aliyun-oss2-storage-0.1.4.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e9cc695fa45aabfbe418d84ca94898cf817432890bf6072bcef7fb7b5f79d605
BLAKE2b-256 checksum
How to use checksums
1df0438a0ac02c4b3ddca88d7b3932d02d414af900fa01f1d9e34dbc2e83ad69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for django-aliyun-oss2-storage 0.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page