Skip to content

Commit 59a1e5e

Browse files
committed
Updated comments and identation
1 parent eb15c56 commit 59a1e5e

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

gcloudfunctiongcsevent/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ It handles a Google Cloud Function that sends information to the function log ab
88

99
* You must have a [Google Cloud Platform (GCP)](http://cloud.google.com/) account.
1010

11-
* The code was written for Python 3 and Google Cloud Python Client Library.
11+
* The code was written for Python 3.
1212

1313
## Using the code
1414

gcloudfunctiongcsevent/main.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
# It handles a Google Cloud Funtion that sends information to the log about an object when it appears in a Cloud Storage bucket.
55

66
def gcs_event(event, context):
7-
"""Triggered by a change to a Cloud Storage bucket.
8-
Args:
9-
event (dict): Event payload.
10-
context (google.cloud.functions.Context): Metadata for the event.
11-
"""
12-
13-
file = event
14-
print(f"Bucket: {file['bucket']}.")
15-
print(f"Object: {file['name']}.")
16-
print(f"Object size: {file['size']}.")
7+
"""Triggered by a change to a Cloud Storage bucket.
8+
Args:
9+
event (dict): Event payload.
10+
context (google.cloud.functions.Context): Metadata for the event.
11+
"""
12+
13+
file = event
14+
print(f"Bucket: {file['bucket']}.")
15+
print(f"Object: {file['name']}.")
16+
print(f"Object size: {file['size']}.")

0 commit comments

Comments
 (0)