Code in Action
The Code in Action videos for this book can be viewed at http://bit.ly/2OQfDum.
Download the color images
We also provide a PDF file that has color images of the screenshots and diagrams used in this book. You can download it here: http://packt.link/gbp/9781836646617.
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: “Python’s threading reading module is wrapped by the multiprocessing.dummy module to offer an API-level compatible Pool subclass (ThreadPool) that implements parallelization work by using threads instead of processes.”
A block of code is set as follows:
class Author(Model):
id = fields.IntField(pk=True)
name = fields.CharField(max_length=255)
books: fields.ReverseRelation["Book"]
def __str__(self):
return self.name
class Meta:
ordering = ["name"]
Any command-line input or output is written as follows:
$ python3 -m venv .env
$ source .env/bin/activate
$ pip install -r requirements.txt
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: “ CPython, includes a mechanism – known as the global interpreter lock or GIL – to ensure that there is only one thread executing Python code in a process.”
Warnings or important notes appear like this.
Tips and tricks appear like this.