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.12.0.tar.gz
(319.9 kB
view hashes)
Built Distribution
google_events-0.12.0-py3-none-any.whl
(504.4 kB
view hashes)
Close
Hashes for google_events-0.12.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a9af33b6bedc78c2f8008ae638c01f4fead9bd2fef97abcd499b38f3ac0e89a |
|
MD5 | d4a116a11d0f6d83152236c9af559c23 |
|
BLAKE2b-256 | 56a751b88e93d9dd60609573c7ce98ac11550a2ede1d35dc0311ce6bb62addf0 |