Ebook: Python Web Development with Sanic: An in-depth guide for Python web developers to improve the speed and scalability of web applications
Author: Adam Hopkins
- Year: 2022
- Publisher: Packt Publishing - ebooks Account
- Language: English
- epub
Follow along with author Adam Hopkins and build a performant and scalable web application using Sanic, along with maintaining clean code to fit your unique challenges and business requirements
Key Features
- Use the power of Sanic to build a scalable and high-performant web application
- Analyze and implement Sanic in common use cases
- Create a complete web application from scratch using the latest features of the Sanic framework
Book Description
Today’s developers need something more powerful and customizable when it comes to web app development. They want the tools to build something, and not simply glue a bunch of things together built by others. This is where Sanic comes into the picture. It’s a next-generation Python framework and server tuned for high performance and built to be unopinionated and scalable.
You’ll start by understanding Sanic’s purpose, significance, and use cases. Next, you’ll learn to spot different issues when building web applications, and how to choose, create, and adapt the right solution to meet your needs. As you progress, you’ll understand how to use listeners, middleware, and background tasks to customize your application. The book will take you through real-world examples, so you walk away with practical knowledge and not just code snippets.
By the end of this web development book, you will have gained the knowledge you need to design, build, and deploy high-performance, scalable, and maintainable web applications with the Sanic framework.
What you will learn
- Strengthen your knowledge of web application architecture
- Explore the difference between WSGI, Async, and ASGI servers
- Understand the core philosophies of performance, scalability, and unopinionated
- Focus on how Sanic organizes incoming data, why it does it, and how to make the most of it
- Implement best practices for reliable, performant, and secure web apps
- Understand useful techniques for successfully deploying a Sanic web app
- Create an effective custom task manager within Sanic
- Discover security concerns and how to deal with them in your Sanic apps
Who This Book Is For
This book is for Python web developers who have knowledge of how web technologies work and are looking to enhance their skills by taking their applications to the next level using the power of the Sanic framework. Working knowledge of Django and/or Flask is required. A basic to intermediate-level understanding of Python 3, HTTP, RESTful API patterns, and modern development practices and tools, such as type annotations, pytest, and virtual environments is also assumed.
Table of Contents
- An Introduction to Sanic and Async Frameworks
- Organizing a Project
- Routing and Intaking HTTP Requests
- Ingesting HTTP Data
- Handling and Responding Views
- Outside the Response Cycle
- Dealing with Security Concerns
- Running a Server
- Best Practices to Improve Your Web Applications
- Implementing Sanic in Common Use Cases
- A Complete Real-World Example