FirstCity
Welcome to First City University College Library iPortal | library@firstcity.edu.my | +603-7735 2088 (Ext. 519)
Amazon cover image
Image from Amazon.com

Flask by example : unleash the full potential of the Flask web framework by creating simple yet powerful web applications / Gareth Dwyer.

By: Material type: TextTextSeries: Community experience distilledPublisher: Birmingham, UK : Packt Publishing, 2016Description: 1 online resource (1 volume) : illustrationsContent type:
  • text
Media type:
  • computer
Carrier type:
  • online resource
ISBN:
  • 9781785283482
  • 1785283480
Subject(s): Genre/Form: DDC classification:
  • 005.3 23
LOC classification:
  • QA76.76.A65
Online resources:
Contents:
Cover ; Copyright; Credits; About the Author; Acknowledgements; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; Chapter 1: Hello, World!; Introducing Flask; Creating our development environment; Installing pip; Installing Flask; Writing ""Hello, World!""; Writing the code; Running the code; Deploying our application to production; Setting up a Virtual Private Server; Configuring our server; Installing and using Git; Serving our Flask app with WSGI; Configuring Apache to serve our Flask application; Summary; Chapter 2: Getting Started with Our Headlines Project
Setting up our project and a Git repositoryCreating a new Flask application; Introduction to RSS and RSS feeds; Using RSS from Python; URL routing in Flask; Publishing our Headlines application; Summary; Chapter 3: Using Templates in Our Headlines Project; Introducing Jinja; Basic use of Jinja templates; Rendering a basic template; Passing dynamic data to our template; Displaying dynamic data in our template; Advanced use of Jinja templates; Using Jinja objects; Adding looping logic to our template; Adding hyperlinks to our template; Pushing our code to the server; Summary
Chapter 4: User Input for Our Headlines ProjectGetting user input using HTTP GET; Getting user input using HTTP POST; Creating a branch in Git; Adding POST routes in Flask; Making our HTML form use POST; Reverting our Git repository; Adding weather and currency data; Introducing the OpenWeatherMap API; Signing up with OpenWeatherMap; Retrieving your OpenWeatherMap API key; Parsing JSON with Python; Introducing JSON; Retrieving and parsing JSON in Python; Using our weather code; Displaying the weather data; Allowing the user to customize the city; Adding another search box to our template
Using the user's city search in our Python codeChecking our new functionality; Handling duplicate city names; Currency; Getting an API key for the Open Exchange Rates API; Using the Open Exchange Rates API; Using our currency function; Displaying the currency data in our template; Adding inputs for the user to select currency; Creating an HTML select drop-down element; Adding all the currencies to the select input; Displaying the selected currency in the drop-down input; Summary; Chapter 5: Improving the User Experience of Our Headlines Project; Adding cookies to our Headlines application
Using cookies with FlaskSetting cookies in Flask; Retrieving cookies in Flask; Adding CSS to our Headlines application; External, internal, and inline CSS; Adding our first CSS; Adding padding to our CSS; Adding more styles to our CSS; Adding the div tags to the template file; Styling our inputs; Summary; Chapter 6: Building an Interactive Crime Map; Setting up a new Git repository; Understanding relational databases; Installing and configuring MySQL on our VPS; Installing MySQL on our VPS; Installing Python drivers for MySQL; Creating our Crime Map database in MySQL
Star ratings
    Average rating: 0.0 (0 votes)
No physical items for this record

Description based on online resource; title from cover page (Safari, viewed April 15, 2016).

Includes index.

Cover ; Copyright; Credits; About the Author; Acknowledgements; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; Chapter 1: Hello, World!; Introducing Flask; Creating our development environment; Installing pip; Installing Flask; Writing ""Hello, World!""; Writing the code; Running the code; Deploying our application to production; Setting up a Virtual Private Server; Configuring our server; Installing and using Git; Serving our Flask app with WSGI; Configuring Apache to serve our Flask application; Summary; Chapter 2: Getting Started with Our Headlines Project

Setting up our project and a Git repositoryCreating a new Flask application; Introduction to RSS and RSS feeds; Using RSS from Python; URL routing in Flask; Publishing our Headlines application; Summary; Chapter 3: Using Templates in Our Headlines Project; Introducing Jinja; Basic use of Jinja templates; Rendering a basic template; Passing dynamic data to our template; Displaying dynamic data in our template; Advanced use of Jinja templates; Using Jinja objects; Adding looping logic to our template; Adding hyperlinks to our template; Pushing our code to the server; Summary

Chapter 4: User Input for Our Headlines ProjectGetting user input using HTTP GET; Getting user input using HTTP POST; Creating a branch in Git; Adding POST routes in Flask; Making our HTML form use POST; Reverting our Git repository; Adding weather and currency data; Introducing the OpenWeatherMap API; Signing up with OpenWeatherMap; Retrieving your OpenWeatherMap API key; Parsing JSON with Python; Introducing JSON; Retrieving and parsing JSON in Python; Using our weather code; Displaying the weather data; Allowing the user to customize the city; Adding another search box to our template

Using the user's city search in our Python codeChecking our new functionality; Handling duplicate city names; Currency; Getting an API key for the Open Exchange Rates API; Using the Open Exchange Rates API; Using our currency function; Displaying the currency data in our template; Adding inputs for the user to select currency; Creating an HTML select drop-down element; Adding all the currencies to the select input; Displaying the selected currency in the drop-down input; Summary; Chapter 5: Improving the User Experience of Our Headlines Project; Adding cookies to our Headlines application

Using cookies with FlaskSetting cookies in Flask; Retrieving cookies in Flask; Adding CSS to our Headlines application; External, internal, and inline CSS; Adding our first CSS; Adding padding to our CSS; Adding more styles to our CSS; Adding the div tags to the template file; Styling our inputs; Summary; Chapter 6: Building an Interactive Crime Map; Setting up a new Git repository; Understanding relational databases; Installing and configuring MySQL on our VPS; Installing MySQL on our VPS; Installing Python drivers for MySQL; Creating our Crime Map database in MySQL

eBooks on EBSCOhost EBSCO eBook Subscription Academic Collection - Worldwide