Skip to main content

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, 上传文件KEY
  • file: bytes, 文件字节数据
  • expired: int, 预签名下载链接的过期时间,0 为不获取,默认为 0
  • bucket: str, bucket_id,默认为资源设置的bucket_id
输出说明:
  • etag
  • presigned_url: 预签名下载链接,或空字符串

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

dagster_qcloud_cos-0.1.0a2.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dagster_qcloud_cos-0.1.0a2-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file dagster_qcloud_cos-0.1.0a2.tar.gz.

File metadata

  • Download URL: dagster_qcloud_cos-0.1.0a2.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

Hashes for dagster_qcloud_cos-0.1.0a2.tar.gz
Algorithm Hash digest
SHA256 b7203845d2b0cfaef772cbf1b30740584f668a207a3246bbc5534c9439e5a2ec
MD5 1d8181bed6f77037feb354b60b4331e4
BLAKE2b-256 6e5a63520c8d3761dd49c4af8fe806591401878a0ebb285b6601e8c6b24e3b1d

See more details on using hashes here.

File details

Details for the file dagster_qcloud_cos-0.1.0a2-py3-none-any.whl.

File metadata

File hashes

Hashes for dagster_qcloud_cos-0.1.0a2-py3-none-any.whl
Algorithm Hash digest
SHA256 edbac551306b6029e9bd37cda3646898b0ee799ccc09601b438ab93223b48fd0
MD5 670d3171ce0f90fcbebb19c9ad991b73
BLAKE2b-256 6b1d2f5f485e6d5be11d024ab7a33fa2d76f0274384bb930eb23f2373022afa3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page