Getting started with Flask 3

Goal

Flask is a great web framework for creating server-side web applications with Python; if you do not have knowledge of using server web frameworks with Python, Flask is a good candidate to start with; being a microframework, which means that initially it comes with the minimum necessary to be able to function, you can see little by little how the framework works without giving rise to confusion with files, directory structure or modules that you have not placed, as happens with others. more robust frameworks like Django, which when creating a project in Django, has many files and folders.

Although Flask is a microframework does not mean that it should be used for small projects, since it has a large number of extensions that you can configure for the project based on its needs; for example, if you need to send emails, there are already extensions, as well as if you want to log in socially, connect via ftp, user modules, etc.

This book is mostly practical, we will learn the fundamentals of Flask, knowing its main characteristics based on a small application that we will expand chapter after chapter.

Who is this book for?

This book is aimed at anyone who wants to learn how to develop their first applications in Flask and learn about one of the most famous frameworks for developing web applications with Python.

For those people who know how to program in Python or other web frameworks.

For those people who want to learn something new.

For people who want to improve a skill and who want to grow as a developer and who want to continue climbing their path in application development with Python.

Topics of the book

This book consists of 20 chapters, with which we will learn in detail the most important and basic features of Flask:

  1. 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.
  2. Chapter 2: In this chapter we will give an introduction to Python, knowing its basic characteristics and functionalities such as variables, data types, functions, classes, among others.
  3. Chapter 3: 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.
  4. Chapter 4: 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.
  5. Chapter 5: 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.
  6. Chapter 6: 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.
  7. Chapter 7: 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.
  8. Chapter 8: In this chapter we will see how to use one-to-one, one-to-many and many-to-many relationships in Flask with SQLAlchemy.
  9. Chapter 9: In this chapter we will see how to use flash messages useful to inform the user about the operations carried out.
  10. Chapter 10: In this chapter we will use Flask Login to create an authentication system and protect drivers.
  11. Chapter 11: In this chapter we will see how to implement a Rest Api using the Restful Flash package, generate access tokens and make test connections.
  12. Chapter 12: In this chapter we will see how to implement unit tests that are part of the development of any application. To do this, we will use the Pytest package available for Python.
  13. Chapter 13: In this chapter we will integrate the Bootstrap 5 web framework to our project in Flask, in this way, we will see how to use both technologies together and we will apply styles to the forms, lists, navigation menu, among others.
  14. Chapter 14: In this chapter we will use Flask Babel to add a multilanguage system to the application, to give the application the ability to use more than one language.
  15. Chapter 15: In this chapter we will learn about several Flask extensions that we have not used until this chapter, such as cache, CLI, a debug banner, email, among others.
  16. Chapter 16: In this chapter we will learn how to create custom decorators to use in controllers.
  17. Chapter 17: In this chapter we will integrate a role system into the application, in addition to this, we will enhance the user profile with several options such as the option to change the password, social networks, address, preferred language, among others.
  18. Chapter 18: In this chapter we are going to learn about some operations on the database using SQLAlchemy, in addition to knowing how to use the Flask shell.
  19. Chapter 19: In this chapter we are going to learn how to use files to manage environment variables in Flask.
  20. Chapter 20: In this chapter we are going to create our first experiment which will be a filter to filter by search term, category and tag.

The book is currently in development…

- Andrés Cruz

En español

Andrés Cruz

Desarrollo con Laravel, Django, Flask, CodeIgniter, HTML5, CSS3, MySQL, JavaScript, Vue, Android, iOS, Flutter

Andrés Cruz En Udemy

Acepto recibir anuncios de interes sobre este Blog.

!Cursos desde!

10$

En Udemy

Quedan 0d 00:54!


Udemy

!Cursos desde!

4$

En Academia

Ver los cursos

!Libros desde!

1$

Ver los libros
¡Hazte afiliado en Gumroad!