- Documentation
Torch Object Storage
SDK Reference
Python
Data security (Python SDK)
Python
Data security (Python SDK)
Data security (Python SDK)
TOS Python SDK supports data security by verifying checksums on the server during upload and on the client after upload.
server verification during upload
During upload, server verification allows setting a content-md5 checksum in the request parameters. If the server-calculated MD5 does not match the one provided, the server returns a 4xx error and the upload fails.
tip
The put_object, append_object, and upload_part interfaces all support setting an MD5 checksum in the request parameters.
client verification after upload
Client verification after upload can be enabled by setting the enable_crc parameter when initializing the client. This verification relies on the server's Crc64 feature. After the request completes, the server returns the Crc64 value of the uploaded data. The client compares this with the locally calculated Crc64 and throws a TosClientError exception if they do not match.
tip
The put_object, append_object, and upload_part interfaces all support Crc64 verification.
Last updated: 2025.09.17 18:22:09