This topic describes the sample code of the OSS Python SDK in various use cases.
For the source code of the OSS Python SDK, visit GitHub.
The OSS Python SDK provides a variety of sample code for your reference or use. The following table describes the sample code provided.
|object_basic.py||Quick start, including creating a bucket and uploading, downloading, listing, and deleting objects|
|object_extra.py||Upload and manage objects, including Manage Object Meta, Copy objects, and Append upload|
|upload.py||Upload objects, including Resumable upload and Multipart upload|
|download.py||Download objects, including Streaming download, Range download, and Resumable download|
|object_check.py||Data verification methods during uploads and downloads, including MD5 and CRC|
|object_progress.py||Upload progress bars and Download progress bars|
|object_callback.py||Upload callback after an object is uploaded|
|object_post.py||Operations related to Simple upload|
|sts.py||How to use STS, including obtaining a temporary user key by assuming RAM roles and using the obtained key to access OSS|
|live_channel.py||Operations related to LiveChannel|
|image.py||Operations related to Image processing|
|bucket.py||Bucket, including creating, deleting, and listing buckets, Static website hosting, and Manage lifecycle rules|
|object_request_payment.py||Enable the Enable pay-by-requester mode|
|traffic_limit.py||Configure Single-connection bandwidth throttling|