--- title: "Download Object" url: https://docs.catalyst.zoho.com/en/sdk/python/v1/cloud-scale/stratus/download-object/ description: "This page lists the Python SDK method to download objects from a bucket." last_updated: 2026-09-08T11:07:33Z service: Cloud Scale type: general related_links: - name: "Stratus Component Help Documentation" url: /en/cloud-scale/help/stratus/introduction - name: "Java SDK" url: /en/sdk/java/v1/cloud-scale/stratus/download-object/ - name: "JavaScript SDK Documentation" url: /en/sdk/javascript/v1/cloudscale/stratus/download-object/ - name: "iOS SDK" url: /en/sdk/ios/v2/cloud-scale/stratus/download-object/ - name: "Android SDK" url: /en/sdk/android/v2/cloud-scale/stratus/download-object/ - name: "Flutter SDK" url: /en/sdk/flutter/v2/cloud-scale/stratus/download-object/ - name: "REST API" url: /en/api/code-reference/cloud-scale/stratus/get-all-buckets/#GetAllBuckets --- # Download Object ### Download an Object The SDKs present in the section will allow you to [download a particular object](https://docs.catalyst.zoho.com/en/cloud-scale/help/stratus/objects/manage-object/download-object/), multiple objects, or version of the object. The Bucket reference used in the below code snippet is the [component instance](https://docs.catalyst.zoho.com/en/sdk/nodejs/v2/cloud-scale/stratus/create-bucket-instance/). The first step of the download operation is a `GET` operation that retrieves the required object from the bucket. To be able to download an object, the requester must have `READ` access permissions. However, owners of the bucket do have the option to grant `READ` access permissions to users, allowing them to download the object without using the required response headers. If [Versioning](https://docs.catalyst.zoho.com/en/cloud-scale/help/stratus/stratus-config/general-settings/#versioning) is enabled for your bucket, you need to pass the `versionId` to download the particular version of the object. If no `versionId` is passed, then by default, the latest version of the object will be downloaded. If *Versioning* was enabled for a bucket, then disabled. By default, the principal first object will be downloaded. To ensure you download the latest version of this object, you need to pass the `versionId` param with the value "`topVersion`". ```python res = bucket.get_object("sam/out/sample.txt") # download the object to local machine file = open('file_path','wb') file.write(res) ``` ### Download a Portion of the Object The following SDK method is used with the `range` parameter. The range parameter allows you to download a specific `range` of bytes of an object. ```python options = { 'version_id': '01hx66f1383jm48w9sa4z20kve', # download the object with given version Id 'range': '0-200' # start and end range of an object } res = bucket.get_object('"sam/out/sample.txt", options) # download the object to local machine file = open('file_path','wb') file.write(res) ``` ### Download an Object Using Transfer Manager In this section, we are going to go over SDK methods that will allow you to successfully download large objects from Stratus to your local system using **Transfer Manager** technique. Transfer Manager is an operation where the large object is split into multiple byte ranges using the start and end bytes range of the object. Each of the object's parts is then returned as a stream, and they are downloaded to your local system. #### Get Transfer Manager Instance To perform transfer manager operations, you need to get a transfer manager object instance. We will refer to this component instance in various code snippets where we work with transfer manager operations being performed on objects stored in a bucket in Stratus. **Parameter Used** `bucket`: This is the bucket instance you need to have initialized earlier using this [SDK method](https://docs.catalyst.zoho.com/en/sdk/nodejs/v2/cloud-scale/stratus/create-bucket-instance/). **Ensure the following packages are imported** ```python from zcatalyst_sdk.stratus.transfer_manager import TransferManager ``` ```python transfer_manager = TranferManager(bucket) ``` #### Get Iterable Object It return the iterable object parts. User can write these parts to our local machine using iterator. > **Note:** Use single file to write because it return iterable parts not whole object. If you write in individual files, you need to combine them in to one. > **Info:** Ensure you provide `part_size` in **Mb**. ```python res = transfer_manager.get_iterable_object("sam/out/sample.txt", 20) file = open('file_path','wb') # store the object to local machine for chunk in res: file.write(chunk) ``` #### Generate Object Part Downloaders When a user needs to download a large file (example: 10 GB file), using the `get_object()` method is not practical. Instead, the user can opt for this SDK method. By calling the `generate_part_downloaders()` method with the parameters `key(str)` and `part_size(Long)`, the user can obtain transfer manager functions. These functions, returned in ascending order, each download a specific part of the object. The parts are determined based on the specified part size. ```python res = transfer_manager.generate_part_downloaders("sam/out/sample.txt",20) file = open('file_path','wb') for part in res: file.write(part()) ``` > **Info:** The file must be uploaded via the API or SDK to enable partial downloads. The part_size should be greater than 5 MB and less than 100 MB. ### Generate Presigned URL to Download an Object Presigned URLs are secure URLs that authenticated users can share to their non-authenticated users. This URL will provide non-authenticated users with temporary authorization to access objects. The Bucket reference used in the below code snippet is the [component instance](https://docs.catalyst.zoho.com/en/sdk/python/v1/cloud-scale/stratus/create-bucket-instance/). > **Info:** To use this SDK method, you need intialize it with **Admin** scope. You can learn more about this requirement from this [section](https://docs.catalyst.zoho.com/en/sdk/nodejs/v2/overview/#initialize-sdk-with-scopes) **Parameters Used**
| Parameter Name | Data Type | Definition |
|---|---|---|
| `key` | **String** | A **Mandatory** parameter. Will hold the complete name of the object along with it's [path](https://docs.catalyst.zoho.com/en/cloud-scale/help/stratus/objects/introduction/#path). |
| `url_action` | **Request Method** | A **Mandatory** parameter. This is the parameter that will allow you to generate a presigned URL for a download(GET) action.
|
| `expiry` | **String** | This is an **Optional** parameter. The URL validity time in seconds.
|
| `active_from` | **String** | This is an **Optional** parameter. This param will contain the time after which the URL is valid. Maximum value is **7 days**. URLs are made active as soon as they are generated by default. |