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

Uploaded Source

Built Distribution

google_events-0.11.0-py3-none-any.whl (459.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

Hashes for google-events-0.11.0.tar.gz
Algorithm Hash digest
SHA256 9a5de975daff308f49da2188cd503876723f0fc952afaabf243a1347e85ccdea
MD5 dfcad5754042d82d45df33244b41c496
BLAKE2b-256 230f4b2469e0c5bcbb9f5ab75f40bf06f42f6e29bc65b40381b411e318f720f7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for google_events-0.11.0-py3-none-any.whl
Algorithm Hash digest
SHA256 35e8393b3b81bfd5e01017f822dd7aadc4c700f6ec9f4eac2a4062a7f6113b68
MD5 79b31a8ee35d713ad23761db04aab077
BLAKE2b-256 f24495308ef5ac2d5fe39bba7359fa56aa74ffc013ead46f63505c8f4a66fde6

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