Like everybody else this week we had fun with the pad-left disaster. We’re from the Python community and our exposure to the node ecosystem is primarily for the client side. We’re big fans of the ecosystem that develops around react and as such quite a bit of our daily workflow involves npm. What frustrated me […]
Category: Flask
A (really) minimal static website generator with python and jinja2
From time to time I throw together a static HTML site for something and love how easy it is to just upload the files to s3 and have a fast site with pretty much no cost or work involved. For single-page sites in particular, this is pretty near painless, but as you start to get […]
Microservices with Python, RabbitMQ and Nameko
“Micro-services is the new black” – Splitting the project in to independently scalable services is the currently the best option to ensure the evolution of the code. In Python there is a Framework called “Nameko” which makes it very easy and powerful. Micro services The term “Microservice Architecture” has sprung up over the last few […]
Flasgger – API playground with Flask and Swagger UI
What is Swagger? Swagger is a simple yet powerful representation of your RESTful API. With the largest ecosystem of API tooling on the planet, thousands of developers are supporting Swagger in almost every modern programming language and deployment environment. With a Swagger-enabled API, you get interactive documentation, client SDK generation and discoverability. What is Swagger […]
Python-driven Web Applications
This tutorial explores how to create dynamic web applications with Python. Originally published in Real Python Course 1: Introduction to Python Web Applications You know how to write useful Python scripts, and now you want to show them off to the world… but how? Most non-programmers won’t have any use for your .py script files. […]
Rewriting a Flask app in Django
I spent Saturday on rewriting a Flask app in Django. The app in question was Nikola Users, which is a very simple CRUD app. And yet, the Flask code was a mess, full of bugs and vulnerabilities. Eight hours later, I had a fully functional Django app that did more and fixed all problems. Original […]
Handling User Authentication with Angular and Flask
This post provides a solution to the question, “How do I handle user authentication with AngularJS and Flask?”. Before beginning, keep in mind that this is not the only solution to the question at hand, and it may not even be the right solution for your situation. Regardless of the solution you implement, it is […]
Scaffold a Flask Project
Let’s build a command-line utility for quickly generating a Flask boilerplate structure. This is a collaboration piece between Depado and the folks at Real Python. Modeled after the Flask-Skeleton project, this tool will automate a number of repetitive tasks so that you can quickly get a Flask project up and running with the structure, extensions, […]
Dockerizing Flask with Compose and Machine – from localhost to the cloud
Docker is a powerful tool for spinning up isolated, reproducible application environment containers. This piece looks at just that – how to containerize a Flask app for local development along with delivering the application to a cloud hosting provider via Docker Compose and Docker Machine. Updates: 11/16/2015: Updated to the latest versions of Docker – […]
Using Flask Cache
As a micro framework Flask does not have built-in cache functionality, however, there is werkzeug cache API and an excellent extension to provide its caching functionality to your Flask apps, that extension was created by @thadeusb and is very easy to implement and use. installing In your env install it via PyPI (recommended) pip install […]
Django, Flask, and Redis Tutorial: Web Application Session Management Between Python Frameworks
I love and use Django in lots of my personal and client projects, mostly for those involving relational databases and more classical web applications. However, by design, Django is very tightly coupled with its ORM, Template Engine System, and Settings object. Plus, it’s not a new project: it carries a lot of baggage from the […]
Flask Google Maps (plus: how to write a Flask extension)
Last week I was writing a talk to give at Google Developers Bus and I needed to show how to integrate Flask and Google Maps API, as I did not found any extension to Google Maps I decided to create one. One of the best things in Flask is the way it is extended by […]