官术网_书友最值得收藏!

Conventions used

There are a number of text conventions used throughout this book.

CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "To test this, we need to set the timeout of the divide function to 4 seconds and put a time.sleep(3) in the middle of the application code."

A block of code is set as follows:

def divide(event, context):
params = event.get('queryStringParameters') or {}
numerator = int(params.get('numerator', 10))
denominator = int(params.get('denominator', 2))
body = {
"message": "Results of %s / %s = %s" % (
numerator,
denominator,
numerator // denominator,
)
}

response = {
"statusCode": 200,
"body": json.dumps(body)
}

return response

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

from raven_python_lambda import RavenLambdaWrapper

@RavenLambdaWrapper()
from raven_python_lambda import RavenLambdaWrapper

@RavenLambdaWrapper()
def divide(event, context):
# Code

Any command-line input or output is written as follows:

$ curl "https://5gj9zthyv1.execute-api.us-west-2.amazonaws.com/dev?numerator=12&denominator=3"
{"message": "Results of 12 / 3 = 4"}

Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "The following screenshot shows Invocation errors from the AWS Lambda monitoring page for the divide function:"

Warnings or important notes appear like this.
Tips and tricks appear like this.
主站蜘蛛池模板: 河间市| 上虞市| 平山县| 楚雄市| 合水县| 安仁县| 卢氏县| 沐川县| 高邮市| 定兴县| 鹤岗市| 江永县| 信阳市| 揭东县| 新余市| 蚌埠市| 高邮市| 赣州市| 同心县| 三穗县| 江山市| 灵台县| 南通市| 商洛市| 方城县| 资中县| 邯郸县| 徐州市| 竹溪县| 全州县| 朝阳市| 武陟县| 邯郸市| 拉孜县| 晋江市| 九龙城区| 台北县| 建阳市| 绩溪县| 卓尼县| 龙南县|