Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Full-Stack Flask and React
Full-Stack Flask and React

Full-Stack Flask and React: Learn, code, and deploy powerful web applications with Flask 2 and React 18

eBook
€15.99 €23.99
Paperback
€29.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Full-Stack Flask and React

Getting Full Stack Ready with React and Flask

The creator of the first website, Sir Tim Berners-Lee, envisaged the web as an open platform that would allow internet users to share information, access opportunities, and collaborate without geographic and cultural restrictions. Interestingly, software developers are innovatively driving the realization of this mission.

As developers, we enable feature-rich web applications that make positive impacts on individuals and businesses around the world. Apart from sharing information, the web has drastically changed from mere static web pages to dynamic and database-driven web applications. Web technologists are coming up with new tools and techniques to make access to information on the internet hassle-free and natively convenient.

By the end of this chapter, you’ll have a better understanding of full stack web development in the context of client-server architectures. We’ll discuss major interactions that exist between the frontend of web applications and a database-driven backend.

Having these skill sets will usher you into the hall of fame of full stack web developers. This comes with complete knowledge of what it takes to start a web application development project from scratch and transform it into a full-blown web application. Whether you are a lone developer or a developer functioning in a collaborative team role, knowledge of full stack web development will boost your confidence to perform efficiently. In addition, you’ll have the flexibility to fit any assigned role in a team setting.

Further, we’ll dive into the reasons to use React, a UI library for building the user-facing end of web applications. You’ll briefly be introduced to the world of React and the reasons why React is essential to build complex modern web application interface components that allow users to have a smooth experience.

Developing web applications requires setting up the development environments. In full stack web application development, the frontend and backend have separate development environments. We’ll discuss how to set up React for the frontend and Flask as backend technology to power server-based processing and database interactions.

Additionally, we’ll dive into getting ready with Git, which is a source version control tool that helps developers to track changes to the code base. You are expected to acquire enough basic knowledge to kickstart deploying your code to GitHub, an online platform for version control.

In this age of technological innovation and the proliferation of creative software developments, source version control is an integral part of development. It fosters collaboration among software developers to solve problems in open source or commercial projects.

We’ll end the chapter by discussing the implementation of a real-world project we will build in this book, Bizza. The project takes you on a journey from a frontend web application perspective to a database-driven backend, connected to the REST API layer to facilitate communication.

So, without further ado, let’s start to experience the world of full stack web application development using two in-demand tech stacks, React and Flask. By the end of this book, you will be able to develop full stack applications.

In this chapter, we will cover the following main topics:

  • An introduction to full stack web development
  • Why should we choose React?
  • Why should we choose Flask?
  • Getting ready with Git
  • What are we building?

Technical requirements

The complete code for this chapter is available on GitHub at:

https://github.com/PacktPublishing/Full-Stack-Flask-and-React/tree/main/Chapter01

An introduction to full stack web development

Modern web applications are complex and rapidly evolving. The business community’s needs and system requirements are motivating software developers to stretch beyond being able to function only as either a frontend or backend developer. The ability of web developers to develop full stack applications is now essential more than ever and on the rise.

In this book, we will focus on full stack web development, which refers to both the frontend and backend parts of web development. The frontend, sometimes referred to as the client side, is the visible part of any web application that users can see and interact with. The backend, sometimes referred to as the server side, is that portion where programmer code resides, coupled with a database and other server infrastructure.

Web developers who are skilled in both the client side (frontend development) and server side (backend development) are usually referred to as full stack developers.

In this book, we will use React as a library to develop an intuitive user interface (UI), or frontend, and Flask, a microframework, to build backend business logic components.

Let’s take a closer look at these tools and the reasons we have chosen them.

Why should we choose React?

Building UIs for web applications is an essential part of web development. Interestingly, most web developers find it difficult to choose the most suitable JavaScript frontend library or framework to build UIs. In a moment, we will see why choosing React will help your career growth and projects.

React is a popular open source library, with an excellent community of developers at Meta Platforms (formerly Facebook) actively maintaining it. React is the most commonly used library according to the Stack Overflow 2021 Developer Survey report, in which 41.4% of professional developers stated they had used React in the past year (https://insights.stackoverflow.com/survey/2021#section-most-popular-technologies-web-framewors). So, what is the fuss about React?

React is simple to use to develop rich interactive interfaces for end users. You can start building reusable interface components for your web projects in no time. It is also easy to learn, as you will see in the implementation of the frontend project we’ll embark upon in this book. If you are already familiar with JavaScript, learning React is really simple, as React is JavaScript-centric.

One of the main reasons React might be with us as long as the internet lives is due to its usage among technology giants such as Facebook, Uber Eats, Skype, and Netflix. Additionally, React, being a library, focuses specifically on building UI components – and nothing more. Its component-based approach to developing web and mobile applications makes it insanely popular among developers.

The further abstraction of the Document Object Model (DOM) in React to what is called the virtual DOM improves efficiency and performance in React applications. React uses special syntax, referred to as JavaScript XML (JSX), that allows you to write HTML elements in JavaScript, in contrast to the convention of putting JavaScript in HTML elements.

You don’t have to learn complex templating languages such as Handlebars, EJS, and Pug. JSX helps you write React components using familiar HTML syntax with the help of a transpiler called Babel. Some JavaScript frameworks are very opinionated – for instance, Angular, Ember.js, and Vue. These frameworks have a rigid structural way of building web applications, unlike React, which gives you the freedom and flexibility to select your libraries, architectures, and tools.

Also, if you are interested in developing mobile applications, React Native can be a valuable tool. Your knowledge of React and its components, which seamlessly integrate with native views, empowers you to create both Android and iOS apps efficiently.

Now, let’s get our hands dirty and set up environments with React.

Setting up the development environment with React

In this section, you will set up a development environment for the React application project we’ll build in the course of this book.

To code and test React applications on your local machine, there are a few steps you need to take:

  1. Install Node.js:
    1. To download and install the stable version of Node.js, go to https://nodejs.org/en/.

    Node.js is a runtime development environment for JavaScript and, by extension, React applications. Node.js comes bundled with a command-line utility tool and package manager called Node Package Manager (NPM). Node.js and NPM are the tools required to successfully build and run any React applications.

    1. Click and download the version recommended for most users. Install by following the installation steps.
    2. To check whether Node.js was successfully installed, type the following into your command prompt:
      $    node -v
    1. To check the version of NPM, type the following in the terminal or command prompt (cmd) for Windows:
      $    npm -v

    The following screenshot shows that node and npm are working.

Figure 1.1 – A screenshot showing that Node.js and NPM are working

Figure 1.1 – A screenshot showing that Node.js and NPM are working

  1. Install Visual Studio Code (VS Code).

    VS Code is a free code editor you can use to build and debug web applications. The ready-set-code approach of the VS Code editor makes it a great tool for development. VS Code has built-in support for IntelliSense code completion and features for code refactoring. Third-party extensions in VS Code with hundreds of web technologies tools allow you to be more productive and efficient.

Note

There are other code editors available to developers, but VS Code is highly recommended.

  1. Install Git Client.

    Git Client is the command-line interface used to interact with Git repositories. There’ll be more on Git later in the chapter. We need this tool to track changes in our project files. To install Git Client, download it from https://git-scm.com/downloads:

    1. Choose your operating system (OS) type and install the software.
Figure 1.2 – A screenshot of the Git download page

Figure 1.2 – A screenshot of the Git download page

  1. To test whether you successfully installed Git, type the following in your system’s command prompt:
$    git --version
Figure 1.3 – A screenshot showing the Git Client version in Windows

Figure 1.3 – A screenshot showing the Git Client version in Windows

We have now set up the development environment for the React applications we’ll be building. This completes the frontend development environment. Let’s do the same for Flask as well, and delve into why you need to choose Flask to build your backend.

Why should we choose Flask?

Flask is a minimalistic framework to develop modern Python web applications. It is a great toolkit for building enterprise-grade, scalable, reliable, and maintainable applications.

Moreover, the framework is easy to learn. Flask has no boilerplate code that must be used by developers, unlike many alternative frameworks such as Django. It is absolutely lightweight to the core. Flask as a microframework only provides developers with starting components to build web applications, while Django tends to suggest you build your web apps in a certain structure using a complete set of gears or components within its framework.

With Flask, developers have amazing freedom to choose their database, template engine, and deployment process; they can also decide how to manage users, sessions, web applications, and security.

Flask’s scalability has encouraged some technology companies to migrate to Flask to efficiently implement their microservices infrastructure. A microservice is a small, independent, and loosely coupled software component that focuses on performing a specific function within a larger application architecture.

A microservice is like having a team of specialists, each focusing on a particular task, working together harmoniously to create something amazing. As I’m sure you would agree, cloud computing has revolutionized application development and deployment irrevocably. The science of scale that is at play with cloud computing is making it the new normal for both start-ups and enterprises. Pinterest is one such example.

Pinterest is one of the most visited websites in the world. It is an image-sharing and social media services platform. According to Statista, as of the fourth quarter of 2021, Pinterest had an average of 431 million monthly active users (https://www.statista.com/statistics/463353/pinterest-global-mau/). Having started their platform with the Django framework, they opted for Flask to develop their API and build a more stable microservice architecture.

Flask is still currently the main core backend technology powering Pinterest, a heavily trafficked social web application. In summary, it is easier to develop APIs and integrate varied databases in Flask. You can take it to the bank with such simplicity and flexibility assurance. If you understand Python well, then you should be able to contribute to a Flask application easily.

Flask is less opinionated, so there are fewer standards to learn. Django, conversely, gives you all you need to develop web applications – complete solutions in a box. However, the issue of scaling is what most experienced Python developers have had to deal with in their Django projects.

When you implement an out-of-the-box solution in your project, you have got a giant Django framework to deal with, which may impact negatively your project’s time to market and performance.

When you combine these battle-tested technology stacks, React and Flask, in your project, you can be sure of development gains in scalability, reliability, reusability, maintainability, and secure web and mobile applications.

In this section, we discussed why you should add React and Flask to your web application’s development toolkit.

Setting up the development environment with Flask

If you want to start developing web applications on your local computer with Flask as your backend framework, you need to have Python and a few other packages installed. In this section, we will set up a Flask development environment. To do so, follow these steps:

  1. Install Python.

    To begin, check to see whether you have Python installed already on your computer. To test for Python installation, open Command Prompt if you use Windows or Terminal for macOS or Linux, and then type in the following command:

    $    python –version

    You will get the following output:

Figure 1.4 – A screenshot showing the Python version

Figure 1.4 – A screenshot showing the Python version

Alternatively, you can use the following command:

$    python -c "import sys; print(sys.version)"

Note

In macOS or Linux, the Python3 —version command also works to check the Python version number and, by extension, the Python installation.

If Python has not been installed on your computer system, go to https://www.python.org/downloads/, choose the latest version suitable for your OS, and download and install it on your system.

  1. Update pip.

    pip is a package manager for Python. It is a widely used tool for installing and updating packages for Python application development. If you followed step 1, you should already have pip installed along with Python:

    1. To upgrade pip, type in this command on your terminal:
      $      python -m pip install --upgrade pip
    1. Create a virtual environment.

    A virtual environment is a tool that allows you to have separate dependencies or package installations of your Python projects. With a virtual environment, you can conveniently have one or more Python projects on your computer system without conflicting with OS system libraries or packages from other Python installations. Every project package is self-contained or isolated in the virtual environment.

    To create a virtual environment, type the following in the terminal or cmd for Windows:

    $    python -m venv venv

    Alternatively, use python3 -m venv venv to explicitly specify Python 3 to create the virtual environment.

    For Windows users, try typing the following if you have issues:

    $      py -m venv venv

Note

You use venv for Python version 3 and virtualenv for Python version 2, depending on the Python version on your local machine.

  1. Activate the virtual environment in Windows:
    $    venv\Scripts\activate

Note:

If executing the command $ venv\Scripts\activate doesn't function as expected, I recommend readers to attempt using $ venv\Scripts\activate.bat instead.

Activate the virtual environment on macOS or Linux:

$    source venv/bin/activate
  1. Install Flask:
    $    pip install flask

    The following screenshot shows the Flask installation command operation.

Figure 1.5 – A screenshot showing the terminal commands for the flask installation

Figure 1.5 – A screenshot showing the terminal commands for the flask installation

  1. To test the Flask development environment, create a file named app.py in your project directory. Open the app.py file in the VS code editor and paste in the following:
    from flask import Flaskapp = Flask(__name__)@app.route('/')def index():    return 'Welcome to Bizza Platform!'if __name__ == '__main__':    app.run()
  2. Open the terminal and set your environment variables:

    For Windows, macOS, or Linux:

    1. Create either .env or .flaskenv to store your environment variables and secrets. Inside .flaskenv, add the following:
      FLASK_APP=app.pyFLASK_ENV=developmentFLASK_DEBUG=true
    1. Then, enter the pip install python-dotenv command in the terminal to install Python-dotenv. With python-dotenv, you can load the variables from the .env or .flaskenv file into your application’s environment, making them accessible as if they were set directly as system environment variables.
    2. To run the Flask app, use the following command, and you will get output similar to Figure 1.6:
      $    flask run
Figure 1.6 – A screenshot showing how to run the Flask application

Figure 1.6 – A screenshot showing how to run the Flask application

Note

To deactivate the virtual environment, simply run $ deactivate.

Having set up and tested the development environment for Flask, we’ll briefly discuss Git to understand the place of source version control in web application development and how GitHub has provided an online collaborative platform to tackle source code and encourage teamwork.

Getting ready with Git

Git is a tool for version control in software development. So, what does version control mean?

As a professional developer, you will need to write code as often as possible. Let’s say you work on a project and it’s 80% complete. The project lead has asked you to add a new feature to your code base, and it is urgent as the client wants your team to add that as part of the features required in the minimum viable product you will be presenting in a few days’ time.

You quickly abandon what you were working on before and start working on this new feature. You make changes to one or two files to incorporate the new features. In the shortest time possible, you made the new feature work. Unfortunately, while trying to add the new feature, you unintentionally tampered with code in other files as well, and you don’t even know which one of them is affected.

Now imagine you have a genie that can tell you where in your code you made your change and the exact altered line of code. Wouldn’t that be awesome? Life would be super easy, saving you lots of development time. That’s the magic of version control!

Version control helps you keep track of changes to the code base in your software project. It is a great way of helping developers monitor changes in their source code. Moreover, it eases the collaborative work of the development team. With version control, you can track code base changes, who is changing the code base, and when the change happens. And, if changes are not desirable, you can quickly reverse them.

Developers have used many different version control tools over the years. Git happens to be the current market leader.

How does Git work?

Git is known as distributed version control software. In a work environment where collaboration among team members is necessary, a complete copy of the entire source code will be available on every contributor’s local computer system; we can call this a local repository.

Git tracks the local repository, maintaining a record of all the changes that occur within the local repository. It saves you the time and energy of keeping multiple versions of the project in separate local directories on your computer. This makes sharing changes to the source code between collaborators effortless.

There are three primary states in Git you should know about:

  • Modified: In this state, files have been changed, but the changes have not yet been added to the local database by Git. These changes are the ones made since the last commit on the files.
  • Staged: In this state, the changes have been tracked by Git and will be added to the Git local database as such in the next commit.
  • Committed: In this state, the changed files have successfully been added to the git local database.

Let’s dive deeper into version control concepts and learn how to create local and remote repositories. Before that, it will be helpful to understand the difference between Git and GitHub.

Git versus GitHub

As discussed earlier, Git is an open source tool for version control. It is simply used to track changes in a code base, track the identity of the person who made the change, and allow team coding collaboration among developers. When you set up your project on your local machine, Git is used to track changes in all the activities – adding files, updating existing files, or creating new folders.

It basically keeps a historical record of your source code. Conversely, GitHub is a cloud-based source code hosting and project management service. It simply allows you to use Git as a tool to keep your code base in a remotely hosted environment to track changes in your code base or collaboratively allow developers to work on projects.

Setting up a local repository

Install Git Client from https://git-scm.com/download/. Ignore this step if you already have it installed on your machine:

  1. Let’s start by creating a working directory named local_repository in the terminal:
    $      mkdir local_repository
  2. Set the directory as a working directory:
    $      cd local_repository

    Inside the working directory, create an HTML file named index.html:

    $      touch index.html

    You will get the following output:

Figure 1.7 – A screenshot creating index.html

Figure 1.7 – A screenshot creating index.html

Note

If you are getting an error, 'touch' is not recognized as an internal or external command, operable program or batch file, with touch index.html, type npm install -g touch-cli in your terminal if you have Node.js installed.

  1. Set up your global credentials:
    $    git config --global user.name "Name of User"$    git config --global user.email "[email protected]"

    With the preceding commands, you set a global username and email address as credentials to track your contributions in the project source code.

  2. Your working directory now has a new file, index.html. Enter this command in the terminal, and you will get output similar to Figure 1.8:
    $    git init
Figure 1.8 – A screenshot showing the creation of the empty Git repository

Figure 1.8 – A screenshot showing the creation of the empty Git repository

With git init, you create an empty local git repository. Git now has a local database or directory that contains all the metadata to track changes in your working directory. The .git folder is usually hidden in your working directory.

  1. To add the content of your working directory to your repository, enter the following command:
    $    git add index.html

    This represents the staging state in Git. The changes are tracked by Git and will be added to the Git local database in the next commit.

  2. To verify this, enter the following command, and you will get output similar to Figure 1.9:
    $    git status
Figure 1.9 – A screenshot showing the staging state of Git

Figure 1.9 – A screenshot showing the staging state of Git

Note

To add multiple contents, enter git add.

  1. Now, you will need to commit to a local repository. This commit stage helps you track changes in your code base with a user-friendly message. To commit with a message flag, enter the following command, and you will get output similar to Figure 1.10:
    $    git commit -m "first commit"
Figure 1.10 – A screenshot showing the commit state of Git

Figure 1.10 – A screenshot showing the commit state of Git

Note

It is always best practice to include a message in your commit command. This helps track changes, and if you have to revert, you can use a commit message as your saving point.

Now you understand how to create a local repository, add files to it, and transition files from the staging area to the committed state. Let’s briefly discuss how you can create a remote repository on GitHub for the cloud-based storage of your source code for possible collaboration.

Setting up a remote repository with GitHub

In today’s digital age, GitHub has become an essential skill for seamless collaboration and version control in software development projects. Let’s delve into setting up a remote repository with GitHub:

  1. Create a developer account on the GitHub site: https://github.com/.
Figure 1.11 – A screenshot showing the GitHub signup page

Figure 1.11 – A screenshot showing the GitHub signup page

  1. Log in and click on New, and you will get the following screen:
Figure 1.12 – A screenshot showing the staging state of Git

Figure 1.12 – A screenshot showing the staging state of Git

  1. Once you have created your new repository, enter the following command in your current working directory:
    $    git remote add origin https://github.com/your-git-username/your-repository-name.git$    git branch -M main$    git push-u origin main

    The preceding commands move your local repository to a remote cloud-based repository to track your code base changes.

In summary, we discussed Git as a required tool for web developers in the modern age. You now know the difference between Git and GitHub. We also discussed basic, useful commands for a version control operation, either in a local or remote repository. Next, we’ll dive into the real-world project we will build in this book using React and Flask.

What will we build?

In this book, we will build a full stack, database-driven web application for conference speakers. It is called Bizza. Users will be able to see the directory of speakers for events of interest to them, events, schedules, and the titles of the papers those speakers are presenting. The solution will include frontend development with React, authentication, authorizations, and REST API design with Flask.

We will start by implementing the frontend in the initial few chapters of the book and subsequently implement the backend in later chapters.

Summary

In this chapter, we provided a brief introduction to modern full stack web development, with an emphasis on the distinction between frontend and backend developers. We discussed the importance of React in building the user interfaces of web applications, and we explained how React and Flask are perfect tools to develop full stack web applications, owing to their simplicity, efficiency, and high performance when compared to rivals in the industry. The development environments for React and Flask were covered as well.

Lastly, we discussed the importance of Git as a tool for version control and the project we will build in this book, Bizza.

In the next chapter, we’ll dive deeper into explaining components, props, and states in React to better understand how React applications are built. A typical React project structure will be discussed, with the aim of learning the functions of files and directories.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Combine Flask's pagination techniques with React's dynamic rendering for an enhanced user experience
  • Implement robust API development within Flask applications by performing CRUD operations
  • Improve Flask app scalability with blueprints using a modular development approach
  • Purchase of the print or Kindle book includes a free PDF eBook

Description

Developing an interactive, efficient, and fast enterprise web application requires both the right approach and tooling. If you are a web developer looking for a way to tap the power of React’s reusable UI components and the simplicity of Flask for backend development to develop production-ready, scalable web apps in Python, then this book is for you. Starting with an introduction to React, a JavaScript library for building highly interactive and reusable user interfaces, you’ll progress to data modeling for the web using SQLAlchemy and PostgreSQL, and then get to grips with Restful API development. This book will aid you in identifying your app users and managing access to your web application. You’ll also explore modular architectural design for Flask-based web applications and master error-handling techniques. Before you deploy your web app on AWS, this book will show you how to integrate unit testing best practices to ensure code reliability and functionality, making your apps not only efficient and fast but also robust and dependable. By the end of this book, you’ll have acquired deep knowledge of the Flask and React technology stacks, which will help you undertake web application development with confidence.

Who is this book for?

This book is for Python web developers who want to build full-stack applications, as well as for frontend developers seeking to expand their skillset by employing Flask as a backend development tool. You’ll gain proficiency in both frontend and backend skills, and acquire the knowledge necessary to deploy solutions in the cloud using AWS. Prior knowledge of basic HTML, CSS, JavaScript, and Python programming will help you to get the most out of this book.

What you will learn

  • Explore the fundamentals of React for building user interfaces
  • Understand how to use JSX to render React components
  • Handle data and integrate third-party libraries and APIs into React applications
  • Secure your Flask application with user authentication and authorization
  • Discover how to use Flask RESTful API to build backend services with React frontend
  • Build modular and scalable Flask applications using blueprints

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Oct 06, 2023
Length: 408 pages
Edition : 1st
Language : English
ISBN-13 : 9781803248448
Languages :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Oct 06, 2023
Length: 408 pages
Edition : 1st
Language : English
ISBN-13 : 9781803248448
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 93.97
React 18 Design Patterns and Best Practices
€33.99
Full-Stack Flask and React
€29.99
Flask Framework Cookbook
€29.99
Total 93.97 Stars icon
Banner background image

Table of Contents

20 Chapters
Part 1 – Frontend Development with React Chevron down icon Chevron up icon
Chapter 1: Getting Full Stack Ready with React and Flask Chevron down icon Chevron up icon
Chapter 2: Getting Started with React Chevron down icon Chevron up icon
Chapter 3: Managing State with React Hooks Chevron down icon Chevron up icon
Chapter 4: Fetching Data with React APIs Chevron down icon Chevron up icon
Chapter 5: JSX and Displaying Lists in React Chevron down icon Chevron up icon
Chapter 6: Working with React Router and Forms Chevron down icon Chevron up icon
Chapter 7: React Unit Testing Chevron down icon Chevron up icon
Part 2 – Backend Development with Flask Chevron down icon Chevron up icon
Chapter 8: SQL and Data Modeling Chevron down icon Chevron up icon
Chapter 9: API Development and Documentation Chevron down icon Chevron up icon
Chapter 10: Integrating the React Frontend with the Flask Backend Chevron down icon Chevron up icon
Chapter 11: Fetching and Displaying Data in a React-Flask Application Chevron down icon Chevron up icon
Chapter 12: Authentication and Authorization Chevron down icon Chevron up icon
Chapter 13: Error Handling Chevron down icon Chevron up icon
Chapter 14: Modular Architecture – Harnessing the Power of Blueprints Chevron down icon Chevron up icon
Chapter 15: Flask Unit Testing Chevron down icon Chevron up icon
Chapter 16: Containerization and Flask Application Deployment Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.3
(4 Ratings)
5 star 75%
4 star 0%
3 star 0%
2 star 25%
1 star 0%
Fawole John Oyeyemi Oct 23, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Full stack Flask and React: Learn, Code and Deploy Powerful with Flask 2 and React 18 by Olatunde Adedeji is a broad guide for web developers who want to build full-stack applications using flask and React.Olatunde did a great job on the book covering an array of topics from the fundamentals of React and Flask to advanced concepts such as API development, authentication, error handling and deployment.Wether you are a python web developer or a frontend developer looking to expand your expertise and skillset, this book will help you acquire the necessary knowledge and confidence to develop full-stack applications using Flask and React.
Amazon Verified review Amazon
Akshay C Dec 05, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Embark on a transformative journey with this brilliantly crafted React+Flask guide. Beyond a well-written book, it's a roadmap for full-stack success, seamlessly guiding you from project inception to deployment. Concepts unfold with clarity, making complex ideas digestible for all levels. Whether novice or seasoned, the insights are invaluable. It's not just a read; it's a manual for absorption, application, and mastery. For aspiring end developers, these concepts are foundational.
Amazon Verified review Amazon
Richard Nov 16, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
As someone who went to a bootcamp and learned the Python-Flask full stack, this book answers so many questions and fills in many gaps in knowledge. The the price its well worth the resources. The book covers React, Python, Docker and even Unit testing for both flask and react. One of my biggest curiosities has been SQLAlchemy and how to use it properly because I wanted to simplify database relationships and it covers that as well !
Amazon Verified review Amazon
Viacheslav Feb 28, 2024
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
You can get some ideas from the book, but drop the hope to learn something in structured way, and to have working application in the end.
Subscriber review Packt
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.