Video: How to Measure Web App Performance

Posted by
on under

Video: Four SQLAlchemy Tips

Posted by
on under

Setting Up a Flask Application in Visual Studio Code

Posted by
on under

As a follow up to my Setting Up a Flask Application in PyCharm article, today I'm going to show you how to set up your project with Visual Studio Code (Code, for short), which is a free and open source integrated development environment from Microsoft with great support for Python. Like I did in the previous article, you can see me going through all the required steps to set up an example project in the video below. After the video, I provide a short written summary of the process.

Setting Up a Flask Application in PyCharm

Posted by
on under

In this short article and video I want to give you a few tips on setting up a PyCharm project for your Flask application. The idea is to set up a Flask application so that it can be executed, debugged, and tested from inside PyCharm Community Edition, which is fantastic IDE for Python that is completely free to download and use. If you want to see me go through the exercise, watch the video below. Then you can come to the article if you want a quick reference and summary of the steps required.

JSON Web Tokens with Public Key Signatures

Posted by
on under

JSON Web Tokens offer a simple and powerful way to generate tokens for APIs. These tokens carry a payload that is cryptographically signed. While the payload itself is not encrypted, the signature protects it against tampering. In their most common format, a "secret key" is used in the generation and verification of the signature. In this article I'm going to show you a less known mechanism to generate JWTs that have signatures that can be verified without having access to the secret key.

Flask Webcast #3: Circular Dependencies

Posted by
on under

In this live webcast I explain how to prevent circular dependency errors in Python. Most of this presentation is a live coding session in which I refactor a single-file Flask application into a fully fleshed out structure with multiple packages and modules, demonstrating how I completely avoid circular dependencies.

Flask Webcast #2: Request and Application Contexts

Posted by
on under

In this live webcast I explain what is the purpose of the request and application contexts in Flask, and why sometimes you get these weird errors about them.

Flask Webcast #1: Intro to Flask

Posted by
on under

Video Streaming with Flask

Posted by
on under

I'm sure by now you know that I have released a book and a couple of videos on Flask in cooperation with O'Reilly Media. While the coverage of the Flask framework in these is fairly complete, there are a small number of features that for one reason or another did not get mentioned much, so I thought it would be a good idea to write articles about them here.

This article is dedicated to streaming, an interesting feature that gives Flask applications the ability to provide large responses efficiently partitioned in small chunks, potentially over a long period of time. To illustrate the topic I'm going to show you how to build a live video streaming server!

Watch Live Video of Earth on your Raspberry Pi

Posted by
on under

A few weeks ago NASA started streaming live video of Earth from cameras installed aboard the International Space Station (ISS), and some of the views are nothing short of breathtaking. If you haven't seen this stream yet, then stop reading and go watch it now. Keep in mind that you have a 50% chance of catching the dark part of the planet, so if all you find is an all black image then try again a little later. You can always check isstracker.com to find out over which region the ISS is over and if it is day or night there.

I thought it would be a cool idea to have this stream running constantly on a screen by my desk. Something I can keep an eye on while I work, so that I can catch the most interesting views without having to have it constantly taking space on my main computer's screens.

In this short article I'm going to show you how to play the ISS live stream on your Raspberry Pi.