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.8.0.tar.gz
(287.5 kB
view details)
Built Distribution
google_events-0.8.0-py3-none-any.whl
(459.4 kB
view details)
File details
Details for the file google-events-0.8.0.tar.gz
.
File metadata
- Download URL: google-events-0.8.0.tar.gz
- Upload date:
- Size: 287.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37edd0abfcb0c8a8a70c66497cd7014565c4651f2703fd3cc6d0e979ae1902db |
|
MD5 | 504b4bc5cd788dcf11c33f68e5442139 |
|
BLAKE2b-256 | 8fc3e9cc13cbfc930a23c7bcc33f53c18a730a690bc9684fc0d384b27d98dbfa |
File details
Details for the file google_events-0.8.0-py3-none-any.whl
.
File metadata
- Download URL: google_events-0.8.0-py3-none-any.whl
- Upload date:
- Size: 459.4 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 | d3d191d0e7408433a0092b797194179ed1f95829516be868b052bc69350e445c |
|
MD5 | d9630da8826067ce75954db9987729a7 |
|
BLAKE2b-256 | a9c2e4f84bcb744a497728e69f0d4590f30c4379bdd7b49e4b278f89fe5c4816 |