google-events


Namegoogle-events JSON
Version 0.14.0 PyPI version JSON
download
home_pagehttps://github.com/googleapis/google-cloudevents-python/
SummaryGoogle Cloudevents library
upload_time2024-12-05 23:20:11
maintainerNone
docs_urlNone
authorGoogle LLC
requires_python>=3.7
licenseApache License 2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Google CloudEvents - Python

[![PyPI version](https://badge.fury.io/py/google-events.svg)](https://badge.fury.io/py/google-events)

This library provides classes of common event types used with Google services,
as defined in the [Google Cloudevents repository](https://github.com/googleapis/google-cloudevents).

## Installation and Usage

**Note**: This library requires Python 3.7+.

To install this package, run

``` sh
pip install --upgrade google-events
```

To use an event class, see the snippet below:

``` python
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"
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/googleapis/google-cloudevents-python/",
    "name": "google-events",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": null,
    "author": "Google LLC",
    "author_email": "googleapis-packages@google.com",
    "download_url": "https://files.pythonhosted.org/packages/26/e3/1d92e712339cec272ec454bdc525ab65ce3fb6ea1d1c442fa25d412007b4/google_events-0.14.0.tar.gz",
    "platform": "Posix",
    "description": "# Google CloudEvents - Python\n\n[![PyPI version](https://badge.fury.io/py/google-events.svg)](https://badge.fury.io/py/google-events)\n\nThis library provides classes of common event types used with Google services,\nas defined in the [Google Cloudevents repository](https://github.com/googleapis/google-cloudevents).\n\n## Installation and Usage\n\n**Note**: This library requires Python 3.7+.\n\nTo install this package, run\n\n``` sh\npip install --upgrade google-events\n```\n\nTo use an event class, see the snippet below:\n\n``` python\nfrom google.events.cloud import storage\n\n# Parses a json string containing an event payload\n# The json payload may be from an HTTP request received by a Cloud Run\n# service with event triggers.\n\ndef handle_event_trigger(json_payload):\n    event = storage.StorageObjectData.from_json(json_payload)\n    print(f\"{event.bucket}/{event.name} had event\")\n    return \"OK\"\n```\n",
    "bugtrack_url": null,
    "license": "Apache License 2.0",
    "summary": "Google Cloudevents library",
    "version": "0.14.0",
    "project_urls": {
        "Homepage": "https://github.com/googleapis/google-cloudevents-python/"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5f7b0abf9dc76bbac80f68a6429e68397e98bf235b99e65e4c1f4b0d8ab59c44",
                "md5": "5839af347e8eb173c60187b074c73e3b",
                "sha256": "60fad72e86536471c931f93c57d2ee36e4e0aca6047abf92c51512c68a8cd944"
            },
            "downloads": -1,
            "filename": "google_events-0.14.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5839af347e8eb173c60187b074c73e3b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 561537,
            "upload_time": "2024-12-05T23:20:09",
            "upload_time_iso_8601": "2024-12-05T23:20:09.697061Z",
            "url": "https://files.pythonhosted.org/packages/5f/7b/0abf9dc76bbac80f68a6429e68397e98bf235b99e65e4c1f4b0d8ab59c44/google_events-0.14.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "26e31d92e712339cec272ec454bdc525ab65ce3fb6ea1d1c442fa25d412007b4",
                "md5": "69eeb340fdb8714738909cbb99003c17",
                "sha256": "85ec5d4e190d6eb305a99f8657dd5a665931fa4f12734df810c077af59ef732d"
            },
            "downloads": -1,
            "filename": "google_events-0.14.0.tar.gz",
            "has_sig": false,
            "md5_digest": "69eeb340fdb8714738909cbb99003c17",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 359476,
            "upload_time": "2024-12-05T23:20:11",
            "upload_time_iso_8601": "2024-12-05T23:20:11.710942Z",
            "url": "https://files.pythonhosted.org/packages/26/e3/1d92e712339cec272ec454bdc525ab65ce3fb6ea1d1c442fa25d412007b4/google_events-0.14.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-05 23:20:11",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "googleapis",
    "github_project": "google-cloudevents-python",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "google-events"
}
        
Elapsed time: 0.50798s