Skip to main content

Google Cloudevents library

Project description

Google CloudEvents - Python

PyPI version

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


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.4.0.tar.gz (115.1 kB view details)

Uploaded Source

Built Distribution

google_events-0.4.0-py3-none-any.whl (230.5 kB view details)

Uploaded Python 3

File details

Details for the file google-events-0.4.0.tar.gz.

File metadata

  • Download URL: google-events-0.4.0.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

Hashes for google-events-0.4.0.tar.gz
Algorithm Hash digest
SHA256 c3ca15f2d3e05b75731ffc736d84dcedcc408ba1c2c2b92f74365b254bafc34c
MD5 584c740a7540163e39c631bdace5e2e0
BLAKE2b-256 d6fe3c0210edfc02586d48640d2e07e6f00696e49164d757c249ae191dc0cd4f

See more details on using hashes here.

File details

Details for the file google_events-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for google_events-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bee46acf0f83526bcab51e4c36ff73ff5525bc68c14858ef9e47734e84397b84
MD5 f9924c124e437eaa7b461c09187cf75b
BLAKE2b-256 1c1d4881eeaf2e229132e8f54802923dad34101651d0c04419d7202d72c697d2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page