Last time we set up a Django Project using Cookiecutter, managed the application environment via Docker, and then deployed the app to Digital Ocean. In this tutorial, we’ll shift away from Docker and detail a development to deployment workflow of a Cookiecutter-Django Project on Fedora 23. Development Install cookiecutter globally and then generate a bootstrapped […]
Author: Real Python
PyGame – a primer
PyGame is a Python wrapper for the SDL library. SDL is a cross-platform library for accessing computer multimedia hardware components (sound, video, input, etc.). SDL is an extremely powerful tool for building all kinds of things, but it’s written in C, and C is hard, so we use PyGame. In this tutorial we’ll go over […]
Development and Deployment of Cookiecutter-Django via Docker
Let’s look at how to bootstrap a Django Project pre-loaded with the basic requirements needed in order to quickly get a project up and running. Further, beyond the project structure, most bootstrapped projects also take care of setting up the development and production environment settings, without troubling the user much – so we’ll look at […]
Emacs – the best python editor?
Thus far, in our series of posts on Python development environments we’ve looked at Sublime Text and VIM: Setting Up Sublime Text 3 for Full Stack Python Development VIM and Python – a Match Made in Heaven In this post we’ll present another powerful editor for Python development – Emacs. While it’s an indisputable fact […]
VIM and Python – a match made in heaven
It has come to my attention that somebody ‘round these parts has been preaching the gospel of Sublime Text 3. Well, as the resident senior developer (err, old fogey), I feel it’s my duty to provide a counterexample by way of the only TRUE Python development environment you will ever need – and that environment […]
LinkedIn Social Authentication in Django
Social Authentication (or Social Login) is a way to simplify logins for end users by using existing login information from the popular social networking services such as Facebook, Twitter, Google+, LinkedIn (focus of this article), and so on. Most websites that require a user to login, utilize social login platforms for a better authentication/registeration experience […]
Python Programming Challenge – first to five
We’ve partnered with our friends at Interview Cake to bring you a programming challenge to test your logic skills and abilities. Updated 10/16/2015: Added additional challenges – cheers! The Challenge There are two players. Each player writes a number, hidden from the other player. It can be any integer 1 or greater. The players reveal […]
Comparing Python Command-Line Parsing Libraries – Argparse, Docopt, and Click
About a year ago I began a job where building command-line applications was a common occurrence. At that time I had used argparse quite a bit and wanted to explore what other options were available. I found that the most popular alternatives available were click and docopt. During my exploration I also found that other […]
Python, Ruby, and Golang: A Web Service Application Comparison
After a recent comparison of Python, Ruby, and Golang for a command-line application I decided to use the same pattern to compare building a simple web service. I have selected Flask (Python), Sinatra (Ruby), and Martini (Golang) for this comparison. Yes, there are many other options for web application libraries in each language but I […]
Asynchronous Tasks with Django and Celery
When I was new to Django, one of the most frustrating things I experienced was the need to run a bit of code periodically. I wrote a nice function that performed an action that needed to run daily at 12am. Easy, right? Wrong. This turned out to be a huge problem to me since at […]
Working with Large Excel Files in Pandas
Today we are going to learn how to work with large files in Pandas, focusing on reading and analyzing an Excel file and then working with a subset of the original data. This tutorial utilizes Python (tested with 64-bit versions of v2.7.9 and v3.4.3), Pandas (v0.16.1), and XlsxWriter (v0.7.3). We recommend using the Anaconda distribution […]
Create a REST API in minutes with Pyramid and Ramses
This is a guest blog post from Chris Hart of Brandicted – a technologist from the great city of Montreal. Foreword This tutorial is meant for beginners. If you get stuck along the way, try to power through and it will probably click. If there’s anything you just don’t get or want some help with, […]
Python, Ruby, and Golang: A Command-Line Application Comparison
This is a guest blog post by Kyle Purdon, a software engineer in Boulder, CO. Kyle is a Python first developer with experience in Ruby, Golang, and many more languages. This post was originally authored on Kyle’s personal blog and included great discussion on Reddit. In late 2014 I built a tool called pymr. I […]
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 […]
The Minimum Viable Test Suite
In the last post we detailed how to validate email addresses during user registration. This time, we’ll add unit and integration tests (yay!) to our application using the Flask-Testing extension, covering the most important features. This type of testing is called Minimum Viable Testing (or Risk-based Testing) and is designed to test the high-risk functionality, […]