The book talked about Flask functionalities and extensions that I was not aware off.
Instant Flask Web Development by Ron DuPlain (ebook)
The book talked about Flask-Script extension. Flask-Script provides support for writing external scripts for Flask applications. Some topics were not very clear and did not provide much context for beginner. I did not understand why one would use subdomains in Flask application. Real database like Postgresql or Mysql were missing.
Although author talked about using different database uri to connect to PostgreSQL and Mysql, but did not gave real example.
- Stay ahead with the world's most comprehensive technology and business learning platform..
- Epic Cleavage.
- Day 3 : Flask — Instant Python Web Development with Python and OpenShift!
I prefer when a real database is used instead of in-memory database. One advantage of using in-memory databases is that it can make things easy for beginners. No talk about Cloud deployment.
- Exemplary Science: Best Practices in Professional Development (Exemplary Science Monograph Series Book 4)?
- Instant Flask Web Development, Book by Ron DuPlain (Paperback) | obotilipam.gq.
- Annie und der sinnliche Italiener (Julia) (German Edition).
- Publisher Description;
- Las Leyes Malas. y el camino de salida (Spanish Edition).
- Infection, Immune Homeostasis and Immune Privilege (Birkhäuser Advances in Infectious Diseases).
In this blog, I will show how we can deploy the sample application discussed in the book on OpenShift. The Python version I am using in this blog is 2.
To install flask do the following. In the commands shown above, we first created a directory for the sample application and then activated virtualenv. The virtualenv helps avoid polluting main python installation on the machine. Finally, we installed flask.
More titles to consider
The pip install flask will install the latest stable version of flask framework. The sample application in the book is a simple appointment application. We can register for an account and then login to application to create, edit, and list appointments. This is fine, but I want to host my application in the cloud. We will be deploying the application on OpenShift. OpenShift is an open source, public, scalable Platform as a Service.
It is completely free and Red Hat gives every user three free Gears on which to run your applications. At the time of this writing, the combined resources allocated for each user is 1. The rhc is a ruby gem so you need to have ruby 1.
Instant Flask Web Development
To install rhc, just type. If you already have one, make sure it is the latest one. To update your rhc, execute the command shown below. Setup your OpenShift account using rhc setup command. This command will help you create a namespace and upload your ssh keys to OpenShift server. It will do all the stuff from creating an application, to setting up public DNS, to creating private git repository, and then finally deploying the application using code from my Github repository. If you are a Java, Python, Node.
I have shared this with my packtpub contact so hopefully they will contact him. I am not criticizing the book. I am just sharing my expectations. You are commenting using your WordPress. You are commenting using your Google account. You are commenting using your Twitter account. You are commenting using your Facebook account. Notify me of new comments via email. Notify me of new posts via email.
Join Kobo & start eReading today
Share this: Reddit Twitter Print Email. Like this: Like Loading Leave a Reply Cancel reply Enter your comment here Fill in your details below or click an icon to log in:. Email required Address never made public. Name required. This book gives you a head start if you have some beginner experience with Python and HTML, or are willing to learn.
What You Will LearnManage your project dependencies using virtualenvUnderstand how Flask provides URL routing and web request handlingRecognize how Flask serves static files on diskLearn about modeling, storing, and querying data with SQLAlchemyPresent HTML forms and validate input with WTFormsBuild a page layout with Twitter Bootstrap using a base Jinja templateCreate, recall, update, delete, and list database recordsBuild custom template filters in Jinja to format dataAuthenticate users and maintain sessionsIn DetailFlask 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.
Related Instant Flask Web Development
Copyright 2019 - All Right Reserved