A Humble Makefile
I’ve been adding GNU Makefiles to all my projects recently and it’s not because I’ve suddenly become a C programmer.
Read more...I’ve been adding GNU Makefiles to all my projects recently and it’s not because I’ve suddenly become a C programmer.
Read more...If you’ve ever used Django, you might be familiar with Django Extensions Shell Plus. It allows you to execute $ ./manage.py shell_plus
for a very handy iPython REPL with all your ORM models pre-imported. This snippet will allow us to accomplish the same with FastAPI or Flask.
When developing a large database backed application, using an ORM (Object Relational Manager) can really benefit your project. There are quite a few ORMs for Python, but which work best with FastAPI?
Read more...Pydantic is one of the “secret sauces” that makes FastAPI such a powerful framework. The library is used everywhere in our projects: from validation, serialization and even configuration. Understanding better what Pydantic does and how to take advantage of it can help us write better APIs.
Read more...In this tutorial we will learn how to add database backed user authentication to our FastAPI application. Later is the series we will implement registration, password recovery, and more.
Read more...Recently I did a live tutorial with CodingNomads on how to build an image sharing website (like Instagram) in Django. The demo is meant to show how quickly you can leverage Django to build and prototype web applications. You can view it on YouTube.
This website has been following the blog software hype train since it’s inception. The progression went like so:
At the transition between Wordpress and Jekyll, like many others, I needed a solution for comments on a static site and Disqus was the clear choice. But then many of us learned that by using Disqus, we were allowing ads to be placed on our own pages. We were bogging down our websites with loads of third party trackers and possibly even violating our own reader’s privacy.
Read more...Immutability is important say the React docs. And of course this is correct, especially in the context of React, Vue.js and the like that depend on immutability to work correctly. It’s also a core facet of functional programming which is becoming more and more popular by the hour. But can you over do it?
Read more...Often I get asked by fellow python developers why I chose Django/Flask for a particular project (usually by someone who prefers the framework I didn’t choose 😉). I think both frameworks are excellent and are well suited for a variety of use cases.
So how do I decide which to use for a new project? I found a simple heuristic to get 90% of the way to a final decision, and it’s pretty easy to follow:
Read more...Django projects have the ability to install apps, which are analogous to plugins in other frameworks.
Some of these apps provide simple functionality: django-gravatar installs a template tag for displaying a user’s gravatar in a template. Other apps are large, like Mezzanine which provides an entire CMS framework to your project.
No matter what you are building, you should consider the following apps. I use them in almost all of my projects.
Read more...