I attended miguel's talk at PyCon, and he seemed like he definitely knew what he was talking about, and also seemed very interested in teaching others about what he learned.
It's great. Definitely the best resource I've found for learning Flask. It also was a great kickstarter for learning Django, if you plan on going that route eventually.
Can someone comment whether this book focuses on getting Flask to run on Python 3?
edit: Works on py3 so nevermind (although, I'm not sure if it's "py3-first", if you would). The book looks nice, and covers a lot of fun topics. My only wish was that he'd used something other than Heroku.
From page 3 of the book: "The code examples in this book have been verified to work with Python 2.7 and Python 3.3, so using one of these two versions is strongly recommended."
I've had the early access version; the stuff on Heroku is at the tail end of the book and is a matter of c. 10 pages or so. So, don't let that put you off.
> My only wish was that he'd used something other than Heroku.
Heroku is just Linux. What do you want , windows server hosting? Using Heroku has been quite educational for me,as for how to manage a production server and good deployement techniques. Care to explain what the problem is?
This is a really fantastic book. I ordered the early-release version months ago, and just updated to the final version. It is by far the most comprehensive, easy-to-understand resource for learning Flask. All code examples work with Python 2.7 or 3.3
I went through the pre-release and loved it. I was competent with python (2) going in and had done most of his tutorials. This book got me to the point of being able to make working web applications.
You follow along with https://github.com/miguelgrinberg/flasky
and basically make a twitter clone -- which is fun. And its nice to be able to checkout the code using git and play with it instead of typing out the contents of the book.
As you can tell from his tutorials, he is a clear writer. And you get a nice taste of cryptography, Bootstrap, and Heroku.
I built http://superquest3.herokuapp.com/ over spring break after completing the book -- and I had never made anything but static websites before.
How does the book compare to his mega-tutorial? I liked his tutorial, but what does the book offer what's not in the tutorial already? I'd love to back Miguel by buying the ebook, but if it does contain valuable additional information, I'd prefer the hardcopy.
I very much enjoyed the author's Blog series on a blog written in Flask [1]. I did not (yet) buy and read the book, but from his style on the blog, I can only assume it is a great resource on Flask.
Flask author wrote a long list of great articles about it, but even then, the span of topics covered and integrated by miguel's tutorial made it a very worthy read.
Just checked the book index, and i've got one recommandation for the v2 of the book : add a chapter about asynchronous tasks / jobs using celery. This would probably fit in one chapter, and it makes a world of a difference as to what you'll be able to build.
Celery is a system for job queues / asynchronous tasks / whatever you want to name it. Usually in web the in-between time of request and response is the time it takes for your application to do the work. However, if you plan to do a lot of work (e.g. render business reports), or the work can take quite long (e.g. make a request to an external service), asynchronous processes make a lot of sense. The request will return the response fast and the application registers a "task" in the queue. A queue system will then pop one of the tasks independent of the web request/response cycle and process the tasks in it's own time.
In short, it simply makes your application respond faster (and scale better) while you still can keep track of all the work done.
I am quite familiar with gearman and beanstalkd, but Celery (as far as I understand it) is a python layer over these implementations. It allows you to write code agnostic of the broker, which helps for portability etc.
Well, if you ever want to build any real world system other than just a blog or any corporate website (which frankly would better be done with wordpress), then you're confronted with the fact that everything can't simply be done instantly and / or upon an http request.
Think of things like monitoring, reporting, emailing, analytics, cleaning, archiving... the list goes on.
For all those things you need a job system. Celery is (to my knowledge) the most popular one.
22 comments
[ 4.0 ms ] story [ 52.6 ms ] threadI also just bought the book.
edit: Works on py3 so nevermind (although, I'm not sure if it's "py3-first", if you would). The book looks nice, and covers a lot of fun topics. My only wish was that he'd used something other than Heroku.
Heroku is just Linux. What do you want , windows server hosting? Using Heroku has been quite educational for me,as for how to manage a production server and good deployement techniques. Care to explain what the problem is?
You follow along with https://github.com/miguelgrinberg/flasky and basically make a twitter clone -- which is fun. And its nice to be able to checkout the code using git and play with it instead of typing out the contents of the book.
As you can tell from his tutorials, he is a clear writer. And you get a nice taste of cryptography, Bootstrap, and Heroku.
I built http://superquest3.herokuapp.com/ over spring break after completing the book -- and I had never made anything but static websites before.
https://www.kickstarter.com/projects/1223051718/practical-fl... is another flask book project you could check out ...
[1] http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-...
https://news.ycombinator.com/item?id=7694614
In short, it simply makes your application respond faster (and scale better) while you still can keep track of all the work done.
I am quite familiar with gearman and beanstalkd, but Celery (as far as I understand it) is a python layer over these implementations. It allows you to write code agnostic of the broker, which helps for portability etc.
Think of things like monitoring, reporting, emailing, analytics, cleaning, archiving... the list goes on.
For all those things you need a job system. Celery is (to my knowledge) the most popular one.
https://play.google.com/store/books/details/Miguel_Grinberg_...