Google Cloudevents library
Project description
Google CloudEvents - Python
This library provides classes of common event types used with Google services, as defined in the Google Cloudevents repository.
Installation and Usage
Note: This library requires Python 3.7+.
To install this package, run
pip install --upgrade google-events
To use an event class, see the snippet below:
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"
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
google-events-0.3.4.tar.gz
(115.1 kB
view details)
Built Distribution
google_events-0.3.4-py3-none-any.whl
(230.3 kB
view details)
File details
Details for the file google-events-0.3.4.tar.gz
.
File metadata
- Download URL: google-events-0.3.4.tar.gz
- Upload date:
- Size: 115.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1941bf8527adf021718679a77e80843ce5098a32755fc4d1f4d5c6cd56dbf5d7 |
|
MD5 | 9ee15bc88fd9b55032c64c90537e860e |
|
BLAKE2b-256 | ef0fa2c57c7946fa392299895ac268b6ea6b7ca7bd3d25c3a62ef02b3e06df0e |
File details
Details for the file google_events-0.3.4-py3-none-any.whl
.
File metadata
- Download URL: google_events-0.3.4-py3-none-any.whl
- Upload date:
- Size: 230.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a8aeb722bec10005a40d76e148f3e9af5a46684dad4c11374efb0fabf2a2b83 |
|
MD5 | d6c3b3daf640d3a93919343e5452a76e |
|
BLAKE2b-256 | 0b622be2bdc50c6b2e035f7c27c4ec8d3ba6c39b697a206a9d1610d0eb57230d |