This is a guest blog post by Bob Belderbos. Bob is a driven Pythonista working as a software developer at Oracle. He is also co-founder of PyBites, a Python blog featuring code challenges, articles, and news. Bob is passionate about automation, data, web development, code quality, and mentoring other developers. Last October we challenged our […]
Category: Django
Building a Simple Web App With Bottle, SQLAlchemy, and the Twitter API
Last October we challenged our PyBites’ audience to make a web app to better navigate the Daily Python Tip feed. In this article, I’ll share what I built and learned along the way. In this article you will learn: How to clone the project repo and set up the app. How to use the Twitter […]
How to Consolidate Multiple Django Projects
Dos and Don’ts For Success If you’ve been developing web applications for your company or a client for a few years, it’s possible you now find yourself with several individual Django projects that you’d like to consolidate. Each project might have one or a few apps with its own set of URL patterns, models, views, and […]
User Authentication with Angular 4 and Flask
In this tutorial, we’ll demonstrate how to set up token-based authentication (via JSON Web Tokens) with Angular 4 and Flask. Main Dependencies: Angular v4.2.4 (via Angular CLI v1.3.2) Flask v0.12 Python v3.6.2 Auth Workflow Here’s the full user auth process: Client logs in and the credentials are sent to the server If the credentials are […]
User Authentication With Angular 4 and Flask
In this tutorial, we’ll demonstrate how to set up token-based authentication (via JSON Web Tokens) with Angular 4 and Flask. Main Dependencies: Angular v4.2.4 (via Angular CLI v1.3.2) Flask v0.12 Python v3.6.2 Free Bonus: Click here to get access to a free Flask + Python video tutorial that shows you how to build Flask web […]
Should I learn Python 2 or 3?
Image Credit: DigitalOcean One of the biggest sources of confusion and misinformation for people wanting to learn Python is which version they should learn. Should I learn Python 2.x or Python 3.x? Indeed, this is one of the questions we are asked most often at Dataquest, where we teach Python as part of our Data […]
Test Driven Development of a Django RESTful API
This post walks through the process of developing a CRUD-based RESTful API with Django and Django REST Framework, which is used for rapidly building RESTful APIs based on Django models. NOTE: Check out the third Real Python course for a more in-depth tutorial on Django REST Framework. This application uses: Python v3.6.0 Django v1.11.0 Django […]
Getting Started with Django Channels
In this tutorial, we will use Django Channels to create a real-time application that updates a list of users as they log in and out. With WebSockets (via Django Channels) managing the communication between the client and the server, whenever a user is authenticated, an event will be broadcasted to every other connected user. Each […]
How to Integrate OAuth 2 Into Your Django/DRF Back-end Without Going Insane
So you’ve implemented user authentication. Now, you want to allow your users to log in with Twitter, Facebook or Google. No problem. You’re only a few lines of code away from doing so. But while there are hundreds of OAuth 2 packages that pip knows, only a few actually do what they’re supposed to do. […]
How to present your data science portfolio on Github
This is the fifth and final post in a series of posts on how to build a Data Science Portfolio. In the previous posts in our portfolio series, we talked about how to build a storytelling project, how to create a data science blog, how to create a machine learning project, and how to construct […]
Automating Django Deployments with Fabric and Ansible
In the last post, we covered all the steps required to successfully develop and deploy a Django app on a single server. In this tutorial we will automate the deployment process with Fabric (v1.12.0) and Ansible (v2.1.3) to address these issues: Scaling: When it comes to scaling a web app to handle thousands of daily […]
Mixins for Fun and Profit
There are certain places where heavy use of mixins can save a ton of time or cognitive load. A use case that came up recently was in a Django project where several class-based views needed to serve only traffic within our intranet. An existing middleware does this check, raising an Http404 if a request comes […]
Top 10 Python libraries of 2016
Last year, we did a recap with what we thought were the best Python libraries of 2015, which was widely shared within the Python community (see post in r/Python). A year has gone by, and again it is time to give due credit for the awesome work that has been done by the open source […]
A Rebuttal For Python 3
Zed Shaw, of Learn Python the Hard Way fame, has now written The Case Against Python 3. I’m not involved with core Python development. The only skin I have in this game is that I like Python 3. It’s a good language. And one of the big factors I’ve seen slowing its adoption is that […]
Project Makefile Open for Business
Makefile for Python Web Development & Related Projects A while back I was asked to speak to the Configuration Management Working Group of DC: From that moment on, it was on: an excuse to finish and talk about the Makefile I’d been dragging around formerly since January and informerly much longer. Finishing the Makefile I […]