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.10.0.tar.gz
(287.4 kB
view details)
Built Distribution
File details
Details for the file google-events-0.10.0.tar.gz
.
File metadata
- Download URL: google-events-0.10.0.tar.gz
- Upload date:
- Size: 287.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23287068581f6f11cacd1c3b92626146b1896ae112d03d88110f9cb3ff1c5426 |
|
MD5 | a76840c71e301908347fe419b4c3e964 |
|
BLAKE2b-256 | 0c49ae4e06435c98afb62ca8713fad13574a90478d9cfc93a3298f4ba910d4b3 |
File details
Details for the file google_events-0.10.0-py3-none-any.whl
.
File metadata
- Download URL: google_events-0.10.0-py3-none-any.whl
- Upload date:
- Size: 459.6 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 | 420f5a3ce55e161d90c0c01c301a77d18c4d93e58ee455f6e32557e4577c684a |
|
MD5 | bb58a62c9443d03834172f6492e9b582 |
|
BLAKE2b-256 | 83665ba7c44b415e6d5dbe737df753b2dee454e3e45115288fdee20635b6199d |