Getting started with Flask 3
Getting started with Flask 3
Here you continue your journey in developing web applications in Python with Flask
About the Book
This guide is intended to take your first steps with Flask using Python; with this, we are going to propose two things:
It is not a book that aims to know Flask 100%, or from zero to expert, since it would be too big an objective for the scope of this guide, otherwise, to know what it offers us and create the first web applications with Flask , know its extensions, create an API, use Jinja2 among others...
It is assumed that the reader has at least basic knowledge of Python development.
This book has a practical approach, knowing the key aspects of the technology and moving into practice, gradually implementing small features of an application that has real scope.
To follow this book you need to have a computer with Windows, Linux or MacOS.
The book is currently in development.
This book consists of 11 chapters, with which we will learn in detail the most important and basic features of Flask:
Chapter 1: In this chapter we are going to present the software necessary to create projects in Flask, what happens from Python, to preparing the environment, the editor that we will use, VSC and a web browser.
Chapter 2: We present some essential commands to develop in Flask, we will prepare the environment and give an introduction to the framework, we will create a structure for the project in Flask and we will get a basic understanding of the routing for the controllers.
Chapter 3: In this chapter we will see how to use the template engine par excellence in Flask, which is Jinja, with which we can return responses in HTML format and customize the page with embedded Python code with which we can customize using blocks, filters, macros, among others.
Chapter 4: In this chapter we will see how to connect an application in Flask to a relational database such as MySQL using SQLAlchemy; We will see how to configure a database, connection through the models, generation of automatic migrations based on the models and basic CRUD operations to manipulate the database.
Chapter 5: In this chapter we will install the Flask Migrate extension to configure a migration system for the project and in this way be able to customize the tables and have a robust schema to be able to make changes to the database in a practical and scalable way, in addition to be able to create a trace with these changes.
Chapter 6: In this chapter we will use the Form WTF extension to create forms, apply validations, initial values and later dump this data into the database, these forms are classes with the aforementioned attributes and in this way we can apply the same schema for server and client side data manipulation.
Chapter 7: In this chapter we will see how to use one-to-one, one-to-many and many-to-many relationships in Flask with SQLAlchemy.
Chapter 8: In this chapter we will see how to use flash messages useful to inform the user about the operations carried out.
Chapter 9: In this chapter we will use Flask Login to create an authentication system and protect drivers.
Chapter 10: In this chapter we will see how to implement a Rest Api using the Restful Flash package, generate access tokens and make test connections.
Chapter 11: In this chapter we will see how to implement unit tests.
The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.
You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!
So, there's no reason not to click the Add to Cart button, is there?
See full terms...
80% Royalties. Earn $16 on a $20 book.
We pay 80% royalties. That's not a typo: you earn $16 on a $20 sale. If we sell 5000 non-refunded copies of your book or course for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
In fact, authors have earnedover $12 millionwriting, publishing and selling on Leanpub.
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.