You’ve just finished building your first Python command-line app. Or maybe your second or third. You’ve been learning Python for a while, and now you’re ready to build something bigger and more complex, but still runnable on a command-line. Or you are used to building and testing web applications or desktop apps with a GUI, […]
Category: Web Frameworks
Python web frameworks
8 World-Class Software Companies That Use Python
There are over 500 current programming languages, with more being written every day. Admittedly, the majority of these overlap and a large number were never meant to be used outside of a theoretical or lab setting. But for the programming languages that are used in everyday coding and businesses, you have to make a choice. […]
Python + Memcached: Efficient Caching in Distributed Applications
When writing Python applications, caching is important. Using a cache to avoid recomputing data or accessing a slow database can provide you with a great performance boost. Python offers built-in possibilities for caching, from a simple dictionary to a more complete data structure such as functools.lru_cache. The latter can cache any item using a Least-Recently […]
Building a Simple Web App with Bottle, SQLAlchemy, and the Twitter API
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 […]
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. […]
Token-Based Authentication with Flask
This tutorial takes a test-first approach to implementing token-based authentication in a Flask app using JSON Web Tokens (JWTs). Objectives By the end of this tutorial, you will be able to… Discuss the benefits of using JWTs versus sessions and cookies for authentication Implement user authentication with JWTs Blacklist user tokens when necessary Write tests […]
Token-Based Authentication With Flask
This tutorial takes a test-first approach to implementing token-based authentication in a Flask app using JSON Web Tokens (JWTs). Updates: 08/04/2017: Refactored route handler for the PyBites Challenge. Objectives By the end of this tutorial, you will be able to… Discuss the benefits of using JWTs versus sessions and cookies for authentication Implement user authentication […]
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 […]