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.7.0.tar.gz
(158.6 kB
view details)
Built Distribution
google_events-0.7.0-py3-none-any.whl
(285.7 kB
view details)
File details
Details for the file google-events-0.7.0.tar.gz
.
File metadata
- Download URL: google-events-0.7.0.tar.gz
- Upload date:
- Size: 158.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b42aef38bbdd43861235238647deba5664f7db81c7a4553efb21ec38ea58ed62 |
|
MD5 | 378daf09a6168d73fa04fb50b87326c4 |
|
BLAKE2b-256 | a8c92c229f32b05756904fe4265c60a123a6c44bfdad5e610a4fbbe22fcfeb88 |
File details
Details for the file google_events-0.7.0-py3-none-any.whl
.
File metadata
- Download URL: google_events-0.7.0-py3-none-any.whl
- Upload date:
- Size: 285.7 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 | 714a1dfc116ca7771bbb0857bb7ca2dc0d075997dd40b08b1a6948d4456e1c94 |
|
MD5 | 15b9f08b425c3ad36b542494cff3cd9b |
|
BLAKE2b-256 | b3cdae387cf1f7f10d6eef5cfa52cc0a9b8eba2c86fb3b0c9eb39874b446335c |