No project description provided
Project description
腾讯云对象存储与 Dagster 集成
该 Dagster 集成是为了更便捷的调用腾讯云对象存储,集成提供了一个 Dagster Resource,和一个 Op 。
安装
要安装库,请使用 pip 。
pip install dagster-qcloud-cos==0.1.0-alpha -U
Resource
QcloudCosResource
该资源返回一个 CosS3Client 类,该类是腾讯云官方 Python SDK 的类,可以查看 https://cloud.tencent.com/document/product/436/12269 了解使用方法。
OP
上传 5G 大小以内的文件并获取预签名的临时链接
from dagster_qcloud_cos import cos_op, QcloudCosResource
from dagster import job, Definitions
@job
def upload_file():
etag, presigned_url = cos_op.op_upload_file()
defs = Definitions(
jobs=[upload_file],
resources={"dingtalk_webhook": QcloudCosResource()}
)
输入说明:
key: str, 上传文件KEYfile: bytes, 文件字节数据expired: int, 预签名下载链接的过期时间,0 为不获取,默认为 0bucket: str, bucket_id,默认为资源设置的bucket_id
输出说明:
etagpresigned_url: 预签名下载链接,或空字符串
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 dagster_qcloud_cos-0.1.0a0.tar.gz.
File metadata
- Download URL: dagster_qcloud_cos-0.1.0a0.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.12.7 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d628a5307f47c5566d09496eb60d6dfaf7acb081997746faa70eb5769006201
|
|
| MD5 |
87b0c5e0699efa3c476a7f39b775adf0
|
|
| BLAKE2b-256 |
0b66192f8bf17dc61d40400bd8160196c86e5589fb59077c9fa141945d38d411
|
File details
Details for the file dagster_qcloud_cos-0.1.0a0-py3-none-any.whl.
File metadata
- Download URL: dagster_qcloud_cos-0.1.0a0-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.12.7 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2fe770e43d6c4c9c4f0a2a1302af6a830f03d6de7825fb0f2ac9416f46d8dbf6
|
|
| MD5 |
29b873b38e4889c6ec55d407f2ee838b
|
|
| BLAKE2b-256 |
7d3ddcbea6331e8c039d9285c0fcf1520db94ab50f97241dcf15a028982a096a
|