A simple tos decrator to download file,process and upload
Project description
Simple decrator of tos download,process and upload
Usage:
from PIL import Image
@tos_process_decorator()
def process_data(local_file_path, *args, **kwargs):
# 这里进行数据处理
# 假设处理后的数据保存在临时文件中
test_png = Image.open(local_file_path)
return test_png
# 调用装饰过的函数
object_key = 'rendering/cam15/02a5ac47db6e09d5235bea600068dd0cdad7682dfa265d7052c247e3d21abf88/View5_SceneDepth.png'
tos_prefix = 'rendering/cam15/02a5ac47db6e09d5235bea600068dd0cdad7682dfa265d7052c247e3d21abf88/'
output_key = 'View5_SceneDepth_test.png'
suffix = '.png'
process_data(object_key=object_key,suffix=suffix, tos_prefix=tos_prefix, output_key=output_key)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tos_decrator-0.1.tar.gz
(2.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tos_decrator-0.1.tar.gz.
File metadata
- Download URL: tos_decrator-0.1.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec5c0192c5639746c3551c8b48fd68188faa6e1839427958f65b0ed63b698c80
|
|
| MD5 |
ecbafdf1c2c28c8b6dc67e4def1c85b5
|
|
| BLAKE2b-256 |
cd373d3ebde0a095832994ae38ea0e949bce1da9a57bfee3e23f81fbd71d3842
|
File details
Details for the file tos_decrator-0.1-py3-none-any.whl.
File metadata
- Download URL: tos_decrator-0.1-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9832e65f2c44457f749a33d2596ff66ab9c0d33101e54f5b8b880f20692f841a
|
|
| MD5 |
51034db9c652fdf9a8810092e61c06b5
|
|
| BLAKE2b-256 |
5cabe31b3e8bb7dd1ccf00f882383f342db8becd6a0b1cb730cde6d083e95ec0
|