cta quote button

Best Flask Books to Master the Technology

Read More

How Much Does It Cost to Hire Web Developers in Ukraine?

Our pricing is completely transparent: you pay your engineers’ salaries and a flat monthly fee for our services. No hidden charges.

Read More

1. Python in 24 Hours, Sams Teach Yourself (2nd Edition) (2013)

In just 24 sessions of one hour or less, Sams Teach Yourself Python in 24 Hours will help you get started fast, master all the core concepts of programming, and build anything from websites to games. Using this book’s straightforward, step-by-step approach, you’ll move from the absolute basics through functions, objects, classes, modules, database integration, and more. Every lesson and case study application builds on what you’ve already learned, giving you a rock-solid foundation for real-world success!

 

Step-by-step instructions carefully walk you through the most common Python development tasks.

 

Quizzes and Exercises at the end of each chapter help you test your knowledge.

 

Notes present interesting information related to the discussion.

 

Tips offer advice or show you easier ways to perform tasks.

 

Warnings alert you to possible problems and give you advice on how to avoid them.

 

Learn how to…

  • Install and run the right version of Python for your operating system
  • Store, manipulate, reformat, combine, and organize information
  • Create logic to control how programs run and what they do
  • Interact with users or other programs, wherever they are
  • Save time and improve reliability by creating reusable functions
  • Master Python data types: numbers, text, lists, and dictionaries
  • Write object-oriented programs that work better and are easier to improve
  • Expand Python classes to make them even more powerful
  • Use third-party modules to perform complex tasks without writing new code
  • Split programs to make them more maintainable and reusable
  • Clearly document your code so others can work with it
  • Store data in SQLite databases, write queries, and share data via JSON
  • Simplify Python web development with the Flask framework
  • Quickly program Python games with PyGame
  • Avoid, troubleshoot, and fix problems with your code

 

 

Author(s): Katie Cunningham

2. Flask By Example (2016)

Unleash the full potential of the Flask web framework by creating simple yet powerful web applications

About This Book

  • The most up-to-date book on Flask on the market
  • Create your own world-class applications and master the art of Flask by unravelling its enigma through this journey
  • This step-by-step tutorial is packed with examples on blending different technologies with Flask to get you up and running

Who This Book Is For

Have you looked at PHP and hated the clunky bloated syntax? Or looked at .Net and wished it was more open and flexible? Maybe you’ve tried your hand at GUI libraries in Python and found them hard to use? If your answer to any one of these questions is a yes, then this is just the book for you.

It is also intended for people who know the basics of Python and want to learn how to use it to build powerful solutions with a web front-end.

What You Will Learn

  • Build three web applications from the ground up using the powerful Python micro framework, Flask.
  • Dynamically display data to your viewers, based on their requests
  • Store user and static data in SQL and NoSQL databases and use this data to power your web applications
  • Create a good user experience by combining HTML, CSS, and JavaScript
  • Harness the convenience of freely available APIs, including OpenWeatherMap, Open Exchange Rates, and bitly
  • Extend your applications to build advanced functionality, such as a user account control system using Flask-Login
  • Learn about web application security and defend against common attacks, such as SQL injection and XSS

In Detail

This book will take you on a journey from learning about web development using Flask to building fully functional web applications. In the first major project, we develop a dynamic Headlines application that displays the latest news headlines along with up-to-date currency and weather information. In project two, we build a Crime Map application that is backed by a MySQL database, allowing users to submit information on and the location of crimes in order to plot danger zones and other crime trends within an area. In the final project, we combine Flask with more modern technologies, such as Twitter’s Bootstrap and the NoSQL database MongoDB, to create a Waiter Caller application that allows restaurant patrons to easily call a waiter to their table. This pragmatic tutorial will keep you engaged as you learn the crux of Flask by working on challenging real-world applications.

Style and approach

This book will provide you with rich, practical experience of Flask. Every technology, that is employed along with Flask is comprehensively introduced, while the book focusses on developing web applications. Pointers to educational material are always given if you want to gain in-depth knowledge of the various technologies used.

Author(s): Gareth Dwyer

3. Data Visualization with Python and JavaScript: Scrape, Clean, Explore & Transform Your Data (2016)

Learn how to turn raw data into rich, interactive web visualizations with the powerful combination of Python and JavaScript. With this hands-on guide, author Kyran Dale teaches you how build a basic dataviz toolchain with best-of-breed Python and JavaScript libraries—including Scrapy, Matplotlib, Pandas, Flask, and D3—for crafting engaging, browser-based visualizations.

As a working example, throughout the book Dale walks you through transforming Wikipedia’s table-based list of Nobel Prize winners into an interactive visualization. You’ll examine steps along the entire toolchain, from scraping, cleaning, exploring, and delivering data to building the visualization with JavaScript’s D3 library. If you’re ready to create your own web-based data visualizations—and know either Python or JavaScript— this is the book for you.

  • Learn how to manipulate data with Python
  • Understand the commonalities between Python and JavaScript
  • Extract information from websites by using Python’s web-scraping tools, BeautifulSoup and Scrapy
  • Clean and explore data with Python’s Pandas, Matplotlib, and Numpy libraries
  • Serve data and create RESTful web APIs with Python’s Flask framework
  • Create engaging, interactive web visualizations with JavaScript’s D3 library

Author(s): Kyran Dale

4. Flask Web Development: Developing Web Applications with Python (2018)

Take full creative control of your web applications with Flask, the Python-based microframework. With the second edition of this hands-on book, you’ll learn the framework from the ground up by developing, step-by-step, a real-world project created by author Miguel Grinberg. This refreshed edition accounts for important technology changes that have occurred in the past three years.

You’ll learn the framework’s core functionality, as well as how to extend applications with advanced web techniques such as database migration and web service communication. The first part of each chapter provides you with reference and background for the topic in question, while the second part guides you though a hands-on implementation of the topic.

If you have Python experience, this book shows you how to take advantage of the creative freedom Flask provides.

Author(s): Miguel Grinberg

5. Developing Web Applications with Flask Framework: Easy to follow with step-by-step tutorial and examples (2017)

Flask is a powerful web framework that helps you build great projects using your favorite tools. Flask takes the flexible Python programming language and provides a simple template for web development. Once imported into Python, Flask can be used to save time building web applications. It goes against the flow with the microframework concept, leaving most of the architecture choices to the developer. Through its great API, extensions, and powerful patterns, Flask helps you create simple projects in minutes and complex ones as soon as possible. What You Will Learn – Introduction to Python-Flask Webapp Framework – Getting Started with Python-Flask – Routes and View Functions – Jinja2 Template Engine – Web Forms via Flask-WTF and WTForms Extensions – SQLAlchemy – RESTful Web Services API – Unit Testing and Acceptance Testing for Flask Apps – Some Useful Flask Extensions – Structuring Large Application with Blueprints – Deploying Your Flask Webapp Who This Book Is For If you are a Python web developer who wants to learn more about developing applications in Flask and scaling them with industry-standard practices, this is the book for you.

Author(s): Andrew Ngo

6. Flask: Building Python Web Services (2017)

Unleash the full potential of the Flask web framework by creating small to large and powerful web applications

About This Book

  • Create your own world-class applications and master the art of Flask by unravelling its enigma through this journey
  • Packed with recipes containing lots of sample applications to help you understand the intricacies of Flask web programming
  • Work with scalable Flask application structures to create complex web apps

Who This Book Is For

This learning path is ideal developers who know the basics of Python and want to learn how to use the Flask framework to build powerful web solutions in Python.

What You Will Learn

  • Build three web applications from the ground up using the powerful Python micro framework, Flask.
  • Extend your applications to build advanced functionality, such as a user account control system using Flask-Login
  • Learn about web application security and defend against common attacks, such as SQL injection and XSS
  • Integrate with technologies like Redis, Sentry, MongoDB and so on
  • Build applications with integrations to most of the login mechanisms available
  • Don’t just stop at development. Learn about deployment and post-deployment
  • Use SQLAlchemy to programmatically query a database
  • Develop a custom Flask extension

In Detail

Are you a fan of Python? Want to use it to create powerful web applications? Then Flask is the perfect choice for you. This course will take you through the intricacies of the Flask Microframework, covering all it’s components and elements and how to integrate it with useful third party libraries. Dive deep into what Flask has to offer and then you will create multiple Python apps from scratch on your own.

The first module will introduce you to web development using Flask to building fully functional web applications. Hands-on and pragmatic, this tutorial goes right to the crux of Flask by showing you how to build challenging real-world applications.

The second module introduces you to a number of recipes that will help you understand the power of Flask and its extensions. Start by seeing the different configurations that a Flask application can make use of. By the end of this module, you will have gained all the knowledge required to write Flask applications in the best possible way, and scale them with best practices.

The final module will walk you through advanced Flask topics while providing practical examples of for all your lessons learned. The module closes with a discussion of the different platforms that are available to deploy a Flask app on, the pros and cons of each one, and how to deploy on each one.

This Learning Path combines some of the best that Packt has to offer in one complete, curated package. It includes content from the following Packt products:

  • Flask By-Example: Gareth Dwyer
  • Flask Framework Cookbook: Shalabh Aggarwal
  • Mastering Flask: Jack Stouffer

Style and approach

Filled with practical examples and recipes, this course is a great combination of example-driven learning complemented by exciting techniques to build powerful Python web applications with the Flask framework

Author(s): Gareth Dwyer, Shalabh Aggarwal

7. Flask Framework Cookbook (2014)

Over 80 hands-on recipes to help you create small-to-large web applications using Flask

About This Book

  • Get the most out of the powerful Flask framework while remaining flexible with your design choices
  • Build end-to-end web applications, right from their installation to the post-deployment stages
  • Packed with recipes containing lots of sample applications to help you understand the intricacies of the code

Who This Book Is For

If you are a web developer who wants to learn more about developing applications in Flask and scale them with industry-standard practices, this is the book for you. This book will also act as a handy tool if you are aware of Flask’s major extensions and want to make the best use of them.

It is assumed that you have knowledge of Python and a basic understanding of Flask. If you are completely new to Flask, reading the book from the first chapter and going forward will help in getting acquainted with Flask as you go ahead.

What You Will Learn

  • Configure Flask in the best way to suit your application needs
  • Integrate Flask with technologies such as Redis, Sentry, and MongoDB
  • Integrate your applications with most of the login mechanisms available
  • Write beautiful RESTful applications
  • Create an admin interface for your application
  • Learn about efficient and effective debugging, logging, and error handling in Flask
  • Test your applications as you write them to prevent future complications
  • Implement full-text search for effective user query handling

In Detail

Flask Framework Cookbook takes you through a number of recipes that will help you understand the power of Flask and its extensions. You will start by seeing the different ways of configurations that a Flask application can make use of. You will learn how to work with templates and learn about the ORM and view layers. You will see how to write an admin interface followed by the debugging and logging of errors. Finally, you will learn about different deployment and post-deployment techniques on platforms such as Apache, Tornado, and Heroku.

By the end of this book, you will have gained all the knowledge required to write Flask applications in the best possible way, and scale them with best practices.

Author(s): Shalabh Aggarwal

8. Learning Flask Framework (2015)

Build dynamic, data-driven websites and modern web applications with Flask

About This Book

  • Discover the most popular Flask resources on the web with ease
  • Familiarize yourself with third-party libraries commonly used with Flask
  • Create a fast, interactive, and secure web app with this hands-on guide

Who This Book Is For

This book is for anyone who wants to develop their knowledge of Python into something that can be used on the web. Flask follows the Python design principles and can be easily understood by anyone who knows Python, and even by those who do not.

What You Will Learn

  • Create your web pages to add modularity and flexibility to your web app using templates
  • Store and retrieve relational data using SQLAlchemy
  • Develop schema migrations with Alembic
  • Produce an admin section using flask-admin
  • Build RESTful APIs using Flask-Restless
  • Simulate requests and sessions using the Flask test client
  • Make Ajax requests from Jinja2 templates

In Detail

Flask is a small and powerful web development framework for Python. It does not presume or force a developer to use a particular tool or library. Flask supports extensions that can add application features as if they were implemented in Flask itself. Flask’s main task is to build web applications quickly and with less code. With its lightweight and efficient web development framework, Flask combines rapid development and clean, simple design.

This book will take you through the basics of learning how to apply your knowledge of Python to the web.

Starting with the creation of a “Hello world” Flask app, you will be introduced to the most common Flask APIs and Flask’s interactive debugger. You will learn how to store and retrieve blog posts from a relational database using an ORM and also to map URLs to views. Furthermore, you will walk through template blocks, inheritance, file uploads, and static assets.

You will learn to authenticate users, build log in/log out functionality, and add an administrative dashboard for the blog. Moving on, you will discover how to make Ajax requests from the template and see how the Mock library can simplify testing complex interactions.

Finally, you will learn to deploy Flask applications securely and in an automated, repeatable manner, and explore some of the most popular Flask resources on the web.

Style and approach

A comprehensive guide packed with real-world examples and popular use cases; starting with basic overviews and diving into the practical aspects of Flask Framework.

Author(s): Matt Copperwaite, Charles Leifer

9. Instant Flask Web Development (2013)

Impatient for results? This is a fast, concise guide to the essentials of Flask with a totally practical approach that means you’ll be up and running on your first Flask app before you know it.

  • Learn something new in an Instant! A short, fast, focused guide delivering immediate results
  • Build a small but complete web application with Python and Flask
  • Explore the basics of web page layout using Twitter Bootstrap and jQuery
  • Get to know how to validate data entry using HTML forms and WTForms
  • Understand SQLAlchemy and relational databases

In Detail

Flask is a web framework for Python, which lets you start simply and grow carefully without facing any issues with the framework as your project gets large. Flask integrates Werkzeug (a web programming toolkit) and Jinja (a templating engine) and adds a layer that lets you build web applications and services in a compact way, while letting you choose your own tools.

Instant Flask Web Development takes you beyond the quick start in the Flask documentation and shows you a bottom-up approach to organizing your Flask application. It shows you how to build a small deployable scheduling application with pointers to the various design decisions you can make when developing with Flask.

Instant Flask Web Development lets you set up your development environment and learn how Flask handles web requests, then shows you how to build a functional data-driven web application that is ready to publish, by adding one layer at a time. When working with Flask, you can work with Python and utilize its best tools for the job. The book will help you build the layers of a simple application: URL routes with Flask, a database with SQLAlchemy, form validation with WTForms, user authentication and sessions, page layout with Twitter Bootstrap, and browser code with jQuery.

This book promises to get you up and running on your first Flask app, so that you can use Flask and Python on your next web project.

What you will learn from this book

  • Manage your project dependencies using virtualenv
  • Understand how Flask provides URL routing and web request handling
  • Recognize how Flask serves static files on disk
  • Learn about modeling, storing, and querying data with SQLAlchemy
  • Present HTML forms and validate input with WTForms
  • Build a page layout with Twitter Bootstrap using a base Jinja template
  • Create, recall, update, delete, and list database records
  • Build custom template filters in Jinja to format data
  • Authenticate users and maintain sessions

Approach

Filled with practical, step-by-step instructions and clear explanations for the most important and useful tasks. The book uses a bottom-up approach to help you build applications, and is full of step-by-step instructions and practical examples to help you improve your knowledge.

Who this book is written for

Instant Flask Web Development is for developers who are new to web programming, or are familiar with web programming but new to Flask. This book gives you a head start if you have some beginner experience with Python and HTML, or are willing to learn.

Author(s): Ron DuPlain

10. Mastering Flask (2015)

Gain expertise in Flask to create dynamic and powerful web applications

About This Book

  • Work with scalable Flask application structures to create complex web apps
  • Discover the most powerful Flask extensions and learn how to create one
  • Deploy your application to real-world platforms using this step-by-step guide

Who This Book Is For

If you are a Flask user who knows the basics of the library and how to create basic web pages with HTML and CSS, and you want to take your applications to the next level, this is the book for you. Harnessing the full power of Flask will allow you to create complex web applications with ease.

What You Will Learn

  • Set up a best practices Python environment
  • Use SQLAlchemy to programmatically query a database
  • Develop templates in Jinja
  • Set up an MVC environment for Flask
  • Discover NoSQL, when to use it, when not to, and how to use it
  • Develop a custom Flask extension
  • Use Celery to create asynchronous tasks

In Detail

Flask is a library that allows programmers to create web applications in Python. Flask is a micro-framework that boasts a low learning curve, a large community, and the power to create complex web apps. However, Flask is easy to learn but difficult to master.

Starting from a simple Flask app, this book will walk through advanced topics while providing practical examples of the lessons learned. After building a simple Flask app, a proper app structure is demonstrated by transforming the app to use a Model-View-Controller (MVC) architecture. With a scalable structure in hand, the next chapters use Flask extensions to provide extra functionality to the app, including user login and registration, NoSQL querying, a REST API, an admin interface, and more. Next, you’ll discover how to use unit testing to take the guesswork away from making sure the code is performing as it should. The book closes with a discussion of the different platforms that are available to deploy a Flask app on, the pros and cons of each one, and how to deploy on each one.

Style and approach

With plenty of useful examples, this guide introduces new concepts and then shows you how those concepts can be used in a real-world environment. Most sections are based around a single example app that is developed throughout the book.

Author(s): Jack Stouffer

11. Building Web Applications with Flask (2015)

Use Python and Flask to build amazing web applications, just the way you want them!

About This Book

  • Learn how to use forms, authentication, and authorization control through extensions, and provide a robust, safe web experience for the client
  • Free yourself from the SQL vs NoSQL paradigm and use the technology that best fits your needs
  • Add powerful concepts like TDD and BDD to your range of testing skills

Who This Book Is For

If you are a Python web developer who wants to learn more about developing applications in Flask and scaling them with industry-standard practices, this is the book for you.

What You Will Learn

  • Create single page applications with Flask
  • Use macros, filters, tags, and control structures to render rich responses to user requests
  • Receive forms securely through form-based classes and WTForms
  • Utilize NoSQL or SQL databases to store user data seamlessly
  • Generate simple, yet powerful, REST services from your data models
  • Learn how to perform test-driven and behavior-driven developments in your Flask projects
  • Use Flask components to create maintainable non-flat projects
  • Harvest the power of extensions to build robust authorization and permission policies

In Detail

Flask is a powerful web framework that helps you build great projects using your favorite tools. Flask takes the flexible Python programming language and provides a simple template for web development. Once imported into Python, Flask can be used to save time building web applications. It goes against the flow with the microframework concept, leaving most of the architecture choices to the developer. Through its great API, extensions, and powerful patterns, Flask helps you create simple projects in minutes and complex ones as soon as possible.

From the beginning, Building Web Applications with Flask shows you how to utilize Flask’s concepts, extensions, and components to create engaging, full-featured web projects. You’ll learn how to properly handle forms using WTForms, devise convenient templates with Jinja2 tags and macros, use NoSQL and SQL databases to store user data, test your projects with features and unit tests, create powerful authentication and user authorization, as well as administrative interfaces with ease, and more.

As Flask does not enforce an architectural recipe, neither do we! This book makes no coding assumptions on how you should code, leaving you free to experiment.

Author(s): Italo Maia

12. Flask Blueprints (2015)

Dive into the world of the Flask microframework to develop an array of web applications

About This Book

  • Structure, compose, and build powerful Flask HTML-based applications and JSON/XML-based APIs using advanced application design patterns
  • Integrate third-party Flask extensions for tasks such as social authentication, sending emails, and interacting with databases and cache layers
  • Build a series of Flask applications of increasing complexity

Who This Book Is For

If you are a Python web developer who has developed basic Flask applications and now wants to build a series of more complex web applications, then this is the book for you.

What You Will Learn

  • Use the virtualenv Python package to effectively isolate your development environments
  • Convert a simple one-file Flask application into a more full-fledged multi-package application
  • Integrate Flask-Login for simple user authentication, Flask-WTF for forms, and Flask-SQLAlchemy for database interactions
  • Explore URL routing and dispatching in a blueprint structured application
  • Create your own signals and consume them within your application
  • Learn to leverage Werkzeug, the WSGI library that powers much of Flask
  • Implement custom exceptions for handling non-20x response codes
  • Write your own CLI tools for administrative and development tasks of your Flask application using Flask-Script/Click
  • Build your Flask extensions to encapsulate reusable behaviors across your applications
  • Integrate your application with open source JavaScript-based graphing libraries to create simple data visualizations

In Detail

Flask is a small but powerful web development framework for Python. Though Flask is termed a micro-framework, it is no way lacking in functionality; there are many extensions available to Flask which helps it to function at the same level as other large frameworks such as Django and Ruby on Rails.

This book will demonstrate how to develop a series of web application projects with the Python web micro-framework, and leverage extensions and external Python libraries and APIs to extend the development of a variety of larger and more complex web applications.

The book will start by explaining Python’s Virtualenv library and how to create and switch between multiple virtual environments. You’ll first build an SQL database-backed application, which will use Flask-WTF, Flask-SQLAlchemy, Jinja templates, and other methods. Next you’ll move on to a timeline application, built using concepts including pytest-Flask, the Blinker package, data modelling for user timelines, exception handling, and creating and organizing CLI tools.

Moving on, you’ll discover how to implement a photo timeline application where you’ll explore topics such as writing and running celery tasks, API error handling and testing, and Werkzeug middlewares.

Finally, the book walks you through creating an application which fetches data from GitHub and stores it locally. You will also learn how to install and configure Flask-Click extension.

Style and approach

This book covers how to effectively use the Flask micro-framework to develop a series of web applications. Each chapter focusses on the development of an application increasing in complexity with easy steps to follow.

Author(s): Joel Perras