Google Cloudevents库
项目描述
Google CloudEvents - Python
此库提供了与Google服务一起使用的常用事件类型的类,如Google Cloudevents存储库中定义的。
安装和使用
注意:此库需要Python 3.7+。
要安装此包,请运行
pip install --upgrade google-events
要使用事件类,请参阅下面的代码片段
from google.events.cloud import storage
# Parses a json string containing an event payload
# The json payload may be from an HTTP request received by a Cloud Run
# service with event triggers.
def handle_event_trigger(json_payload):
event = storage.StorageObjectData.from_json(json_payload)
print(f"{event.bucket}/{event.name} had event")
return "OK"
项目详情
下载文件
下载适用于您平台的文件。如果您不确定该选择哪个,请了解更多关于安装包的信息。
源代码发行版
google_events-0.13.0.tar.gz (359.2 kB 查看哈希值)
构建发行版
google_events-0.13.0-py3-none-any.whl (561.3 kB 查看哈希值)
关闭
google_events-0.13.0.tar.gz的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | bd267e39865f7ca1a120993dc00c65dcb2770ee13ae95a34f76d816957e297d8 |
|
MD5 | 58e6242b03068111817953027b835a52 |
|
BLAKE2b-256 | 773757993f165349188d7f1dbeab3f5fceb035a74586221dd00f4c93f373df04 |
关闭
google_events-0.13.0-py3-none-any.whl的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | a17e9a54aa27b06fdca3defdc81bd3e07e685734e90b6dd9c297f0898004b74c |
|
MD5 | 4514f2a5cda510a0dd90c472fd8f322f |
|
BLAKE2b-256 | bf3a812ad95928236bfe2f654df9f2f9cf02d5122029a4d04dbfb1dc365b2cb4 |