This topic describes the sample code of the OSS Python SDK in various use cases.

Source code

For the source code of the OSS Python SDK, visit GitHub.

Sample code

The OSS Python SDK provides a variety of sample code for your reference or use. The following table describes the sample code provided.

Sample file Content Quick start, including creating a bucket and uploading, downloading, listing, and deleting objects Upload and manage objects, including Manage Object Meta, Copy objects, and Append upload Upload objects, including Resumable upload and Multipart upload Download objects, including Streaming download, Range download, and Resumable download Data verification methods during uploads and downloads, including MD5 and CRC Upload progress bars and Download progress bars Upload callback after an object is uploaded Operations related to Simple upload How to use STS, including obtaining a temporary user key by assuming RAM roles and using the obtained key to access OSS Operations related to LiveChannel Operations related to Image processing Bucket, including creating, deleting, and listing buckets, Static website hosting, and Manage lifecycle rules Enable the Enable pay-by-requester mode Configure Single-connection bandwidth throttling