Conventions used
There are a number of text conventions used throughout this book.
Code in text
: 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: “Now we are ready for testing, and the four files have been copied to the same working directory: app.yaml
, favicon.ico
, main.py,
and requirements.txt
.”
A block of code is set as follows:
DEFAULT_TEMPLATE = "english.html" @app.route('/') def get(): template = request.args.get('template', DEFAULT_TEMPLATE) name = request.args.get('name', None) company = request.args.get('company', None) resume_html = return_resume(template, name, company) return resume_html # This is only used when running locally. When running live, # gunicorn runs the application. if __name__ == '__main__': app.run(host='127.0.0.1', port=8080, debug=True)
Any command-line input or output is written as follows:
/home/<user>/.local/bin/gunicorn -b :8080 main:app &
Bold: Indicates a new term, an important word, or words that you see onscreen. For instance, words in menus or dialog boxes appear in bold. Here is an example: “The Testing tab can be useful for fast tests since it will help us quickly build a payload and trigger our Cloud Function, so we can then switch back to the Logs tab and check that everything works as expected.”
Tips or important notes
Appear like this.