All Products
Search
Document Center

Object Storage Service:OSS SDK for Python

Last Updated:Dec 03, 2024

This topic provides the sample code of Object Storage Service (OSS) SDK for Python in various use cases.

Source code

For more information about the source code of OSS SDK for Python, visit GitHub.

Sample code

OSS SDK for Python provides various sample code files for your reference or use. The following table describes the sample code files provided by OSS SDK for Python.

Sample code file

Content

bucket.py

bucket_cname.py

Map custom domain names

bucket_cors.py

CORS

bucket_inventory.py

Bucket inventories

bucket_logging.py

Logging

bucket_meta_query.py

Data indexing

bucket_policy.py

Bucket policies

bucket_referer.py

Hotlink protection

bucket_replication.py

Data replication

bucket_symlink.py

Manage symbolic links

bucket_tagging.py

Bucket tagging

bucket_transfer_acceleration.py

Transfer acceleration

bucket_versioning.py

Manage versioning

bucket_website.py

Static website hosting (mirroring-based back-to-origin)

bucket_worm.py

Retention policies

download.py

image.py

IMG

object_basic.py

object_callback.py

Upload callback

object_check.py

Data verification

object_crypto.py

Client-side encryption

object_extra.py

Manage object metadata

object_forbid_overwrite.py

Prevent overwrites of same-name objects

object_operation.py

object_post.py

Form upload

object_progress.py

object_request_payment.py

Pay-by-requester

object_restore.py

Restore objects

server_side_encryption.py

Server-side encryption

object_storage_type.py

Convert the storage classes of objects

sts.py

Authorize access

object_tagging.py

select_csv.py

Query objects

traffic_limit.py

Single-connection bandwidth throttling

upload.py

References