51 return metrics
52
53def main(handler):
54 """ Gets system metrics and updates the device shadow suing the aws_shadow_updater helper library.55 """
56 payload = get_metrics()
57 print("On device:", payload)
18 return root_ca_cert, device_cert, device_private_key
19
20def get_shadow_handler(device_id):
21 """22 Given a device_id, creates a configuration for connecting to AWS IoT, creates and returns a device_shadow_handler.
23 """
24 # Get certificates for AWS IoT
If a docstring fits in a single line (72 characters according to PEP8), it is recommended to have the quotes on the same line.
def foo():
"""
Runs bar and returns baz.
"""
baz = bar()
return baz
def foo():
"""Runs bar and returns baz."""
baz = bar()
return baz