
Python Web Development with Sanic
An in-depth guide for Python web developers to improve the speed and scalability of web applications
Packt Publishing
Published on 28. March 2022
Book
Paperback/Softback
504 pages
978-1-80181-441-6 (ISBN)
Description
Build a performant and scalable web application using Sanic, along with maintaining clean code to fit your unique challenges and business requirements
Key Features
Expand your knowledge of web application architecture for building scalable web apps
Learn the core philosophies of performance and scalability from one of the creators of Sanic
Create a complete Python web app from scratch and learn to translate the knowledge you gain across various use cases
Book DescriptionToday's developers need something more powerful and customizable when it comes to web app development. They require effective tools to build something unique to meet their specific needs, and not simply glue a bunch of things together built by others. This is where Sanic comes into the picture. Built to be unopinionated and scalable, Sanic is a next-generation Python framework and server tuned for high performance.
This Sanic guide starts by helping you understand Sanic's purpose, significance, and use cases. You'll learn how to spot different issues when building web applications, and how to choose, create, and adapt the right solution to meet your requirements. As you progress, you'll understand how to use listeners, middleware, and background tasks to customize your application. The book will also take you through real-world examples, so you will walk away with practical knowledge and not just code snippets.
By the end of this web development book, you'll 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
Understand the difference between WSGI, Async, and ASGI servers
Discover how Sanic organizes incoming data, why it does it, and how to make the most of it
Implement best practices for building reliable, performant, and secure web apps
Explore useful techniques for successfully testing and deploying a Sanic web app
Create effective solutions for the modern web, including task management, bot integration, and GraphQL
Identify security concerns and understand how to deal with them in your Sanic apps
Who this book is forThis book is for Python web developers who have basic to intermediate-level knowledge of how web technologies work and are looking to take their applications to the next level using the power of the Sanic framework. Working knowledge of Python web development along with frameworks such as Django and/or Flask will be helpful but is not 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 will also be beneficial.
Key Features
Expand your knowledge of web application architecture for building scalable web apps
Learn the core philosophies of performance and scalability from one of the creators of Sanic
Create a complete Python web app from scratch and learn to translate the knowledge you gain across various use cases
Book DescriptionToday's developers need something more powerful and customizable when it comes to web app development. They require effective tools to build something unique to meet their specific needs, and not simply glue a bunch of things together built by others. This is where Sanic comes into the picture. Built to be unopinionated and scalable, Sanic is a next-generation Python framework and server tuned for high performance.
This Sanic guide starts by helping you understand Sanic's purpose, significance, and use cases. You'll learn how to spot different issues when building web applications, and how to choose, create, and adapt the right solution to meet your requirements. As you progress, you'll understand how to use listeners, middleware, and background tasks to customize your application. The book will also take you through real-world examples, so you will walk away with practical knowledge and not just code snippets.
By the end of this web development book, you'll 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
Understand the difference between WSGI, Async, and ASGI servers
Discover how Sanic organizes incoming data, why it does it, and how to make the most of it
Implement best practices for building reliable, performant, and secure web apps
Explore useful techniques for successfully testing and deploying a Sanic web app
Create effective solutions for the modern web, including task management, bot integration, and GraphQL
Identify security concerns and understand how to deal with them in your Sanic apps
Who this book is forThis book is for Python web developers who have basic to intermediate-level knowledge of how web technologies work and are looking to take their applications to the next level using the power of the Sanic framework. Working knowledge of Python web development along with frameworks such as Django and/or Flask will be helpful but is not 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 will also be beneficial.
More details
Language
English
Place of publication
Birmingham
United Kingdom
Target group
Professional and scholarly
US School Grade: College Graduate Student
Dimensions
Height: 235 mm
Width: 191 mm
Thickness: 27 mm
Weight
931 gr
ISBN-13
978-1-80181-441-6 (9781801814416)
Copyright in bibliographic data and cover images is held by Nielsen Book Services Limited or by the publishers or by their respective licensors: all rights reserved.
Schweitzer Classification
Other editions
Additional editions

Stephen Sadowski | Adam Hopkins
Python Web Development with Sanic
An in-depth guide for Python web developers to improve the speed and scalability of web applications
E-Book
09/2024
Packt Publishing
from
€31.19
Available for download
Persons
Stephen Sadowski is a core developer and steering council member for the Sanic project. He has been involved with Sanic since 2017, first as an early adopter, and subsequently helping Adam Hopkins revitalize the project in 2018.
Outside of the Sanic community, Stephen is the vice president of professional services and DevOps and modernization practice lead for Uturn Data Solutions. He enjoys cooking, reading, and spending time with his wife, Jamie, and their two Portuguese Water Dogs, King and Prince. Adam Hopkins is a self-taught programmer. He started programming in high school and has been using Python and building websites for more than 25 years. He is a licensed attorney and practiced law before transitioning into software engineering as a second career.
Adam is the core developer and project maintainer of Sanic, a popular asynchronous Python framework and web server. Currently, he is a software engineering manager at PacketFabric, where he leads a team building backend web services. He is passionate about open source contributions and helping other developers to grow and learn. Adam lives in his desert home in the south of Israel with his wife and five children.
Outside of the Sanic community, Stephen is the vice president of professional services and DevOps and modernization practice lead for Uturn Data Solutions. He enjoys cooking, reading, and spending time with his wife, Jamie, and their two Portuguese Water Dogs, King and Prince. Adam Hopkins is a self-taught programmer. He started programming in high school and has been using Python and building websites for more than 25 years. He is a licensed attorney and practiced law before transitioning into software engineering as a second career.
Adam is the core developer and project maintainer of Sanic, a popular asynchronous Python framework and web server. Currently, he is a software engineering manager at PacketFabric, where he leads a team building backend web services. He is passionate about open source contributions and helping other developers to grow and learn. Adam lives in his desert home in the south of Israel with his wife and five children.
Content
Table of Contents
Introduction to Sanic and Async Frameworks
Organizing a Project
Routing and Intaking HTTP Requests
Ingesting HTTP Data
Building Response Handlers
Operating Outside the Response Handler
Dealing with Security Concerns
Running a Sanic Server
Best Practices to Improve Your Web Applications
Implementing Common Use Cases with Sanic
A Complete Real-World Example
Introduction to Sanic and Async Frameworks
Organizing a Project
Routing and Intaking HTTP Requests
Ingesting HTTP Data
Building Response Handlers
Operating Outside the Response Handler
Dealing with Security Concerns
Running a Sanic Server
Best Practices to Improve Your Web Applications
Implementing Common Use Cases with Sanic
A Complete Real-World Example