Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Asynchronous Programming in Python
  • Table Of Contents Toc
  • Feedback & Rating feedback
Asynchronous Programming in Python

Asynchronous Programming in Python

By : Nicolas Bohorquez
close
close
Asynchronous Programming in Python

Asynchronous Programming in Python

By: Nicolas Bohorquez

Overview of this book

Asynchronous programming is one of the most effective but often misunderstood techniques for building fast, scalable, and responsive systems in Python. While it can significantly improve performance, efficiency, and sustainability, using async without a clear understanding of its trade-offs can lead to fragile designs and hard-to-debug issues. This book offers a structured approach to applying asynchronous programming in Python. It begins with a conceptual framework to help you distinguish between synchronous and asynchronous execution models, and shows how async relates to other concurrency strategies such as multithreading and multiprocessing. From there, you will explore the core tools available for building async applications in Python. You will also learn how to measure the impact of async programming in practical scenarios, profile and debug asynchronous code, and evaluate performance improvements using real-world metrics. The final chapters focus on applying async techniques to common cloud-based systems, such as web frameworks, database interactions, and data-pipelines tools. Designed for developers looking to apply async programming with confidence, this book blends real-world examples with core concepts to help you write efficient, maintainable Python code.
Table of Contents (14 chapters)
close
close
12
Other Books You May Enjoy
13
Index

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.

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Asynchronous Programming in Python
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon