Have a personal or library account? Click to login
Learning Flask Framework Cover

Learning Flask Framework

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

Paid access
|Dec 2015
Product purchase options

Key Features

    Book Description

    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.

    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 flaskadmin
    • Build RESTful APIs using FlaskRestless
    • Simulate requests and sessions using the Flask test client
    • Make Ajax requests from Jinja2 templates

    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.

    Table of Contents

    1. Creating your first Flask application
    2. Relational databases with SQLAlchemy
    3. Templates and Views
    4. Forms and validation
    5. Authenticating users
    6. Building an administrative dashboard
    7. Ajax and RESTful APIs
    8. Testing Flask apps
    9. Excellent extensions
    10. Deploying your application
    PDF ISBN: 978-1-78398-337-7
    Publisher: Packt Publishing Limited
    Copyright owner: © 2015 Packt Publishing Limited
    Publication date: 2015
    Language: English
    Pages: 250