theCodingInterface

Providing quality software engineering content in the form of tutorials, applications, services, and commentary suited for developers.

Posts about Python

Django Authentication Part 1: Sign Up, Login, Logout

This is the first article in a multipart series on implementing the Django authentication system. Each article of this series focuses on a subset of the authentication features that can be implemented with Django with this first one demonstrating how to register users, log them in and out, plus how to restrict access to class based views to only authenticated users.

Django Authentication Part 2: Object Permissions with Django Guardian

This is the second article in a multipart series on implementing the Django authentication system. This second article focusses on how to assign object level permissions to users and groups of users using the Django Guardian package. These permissions will be used to control who can view and take a survey as well as who can view survey results by restricting access to class views to only users meeting these specific object level permissions.

Django Authentication Part 3: Adding Python Social Auth

This is the third article in a multipart series on implementing the Django authentication system. I will continue to use the same demo survey application, which I refer to as Djang Survey, to aid in the demonstration of the many features of Django authentication. This third article focusses on how to integrate social authentication with the help of Python Social Auth. Specifically, I will be showing how to integrate user login via Google OAuth2.

Django Authentication Part 4: Email Registration and Password Resets

This is the forth article in a multipart series on implementing the Django authentication system. I will continue to use the same demo survey application, referred to as Django Survey, to aid in the demonstration of authentication features. For this article I will be focusing on a specific use case common to authentication in a web application which is the use of email confirmation for user registration and password resets utilizing emails with token embedded reset links.

Building a Text Analytics App in Python with Flask, Requests, BeautifulSoup, and TextBlob

This article introduces how to build a Python and Flask based web application for performing text analytics on internet resources such as blog pages. To perform text analytics I will utilizing Requests for fetching web pages, BeautifulSoup for parsing html and extracting the viewable text and, apply the TextBlob package to calculate a few sentiment scores.

Deploying a Python Text Analytics App with Flask, uWSGI and Nginx

This is a continuation from Building a Text Analytics App in Python with Flask, Requests, BeautifulSoup, and TextBlob and will focus on deploying the previously built app to a cloud hosted Ubuntu LTS v18 server. For this article I will be running the Flask app within the Web Server Gateway Interface (WSGI) compliant Python application server known as uWSGI. The Flask app / uWSGI server will sit behind an Nginx web server which serves static content plus reverse proxy non-static requests to uWSGI

Bridging Node.js and Python with PyNode to Predict Home Prices

In this article I demonstrate a novel Node.js package named PyNode used to invoke Python code within a Node.js application and, more importantly, receive Python return types in the calling Node.js application. To facilitate demonstrating this awesomeness I use the popular scikit-learn Python library to load the included California Housing dataset from the 1990 US Census and build a Linear Regression model for predicting home values within a Express.js application.

How To Compress and Extract Zip Files with Python

In this How To article I demonstrate using Python to compress files into zip archives along with extracting files contained in a zip archive. The venerable, batteries included, Python standard library provides the zipfile module which exposes a well designed API for working with zip archives in a platform manner and will be the focus of this article.

By Adam McQuistan on 04/16/2020

theCodingInterface