Request Signature Authentication for IVRs Built with Python

Python and Pyramid IVR

For many APIs it is desirable to authenticate requests made to an endpoint. For an interactive voice response (IVR) system API which returns TwiML, the only entity that should likely be allowed access in production is Twilio. This post will cover implementation of request signature validation in a Python IVR web application that uses the Pyramid web framework. Allowing Twilio Access To localhost Of the many ways to… Read More

Analyzing Messy Data Sentiment with Python and nltk

Python plus NLTK library.

Sentiment analysis uses computational tools to determine the emotional tone behind words. This approach can be important because it allows you to gain an understanding of the attitudes, opinions, and emotions of the people in your data. At a higher level, sentiment analysis involves natural language processing and artificial intelligence by taking the text element, transforming it into a format that a machine can read, and… Read More

JSON Serialization in Python using serpy

Python plus the serpy code library for serialization.

Serialization is the process of transforming objects of complex data types (custom-defined classes, object-relational mappers, datetime, etc.) to native data types so that they can then be easily converted to JSON notation. In this blog post, we will use a neat little library called serpy to see how such transformations work. We will then integrate this code in a tornado-based web server for a quick demo of how… Read More

Getting Started on Geospatial Analysis with Python, GeoJSON and GeoPandas

GeoSpacial Analysis In Python

As a native New Yorker, I would be a mess without Google Maps every single time I go anywhere outside the city. We take products like Google Maps for granted, but they’re an important convenience. Products like Google or Apple Maps are built on foundations of geospatial technology. At the center of these technologies are locations, their interactions and roles in a greater ecosystem of location services…. Read More

Reading Excel Spreadsheets with Python, Flask, and Openpyxl

  Data stored in Excel spreadsheets can be hard to read with anything other than Excel and it’s especially tough to compare two specific datasets within all that data. One possible solution is Python. It can do the dirty work of finding the information for us while also being pretty fun. In this post we will read NBA statistics from a Microsoft Excel sheet using the Openpyxl… Read More

Image recognition in Python with the Clarifai API and Twilio MMS

Image recognition can seem like a pretty daunting technical challenge. Scraping images to use as training data for a machine learning model stresses me out. That’s where Clarifai comes in. This API is great for implementing image recognition so you can focus on the core functionality of what you are building. Let’s build a Flask application in Python with Twilio MMS to receive picture messages over a phone… Read More

How to Build a Serverless API with Amazon Web Services’ API Gateway

Python, Bottle and AWS logos.

It’s easy to use the Twilio API to send and receive SMS using Python and Bottle. What if we convert that traditional web application into a serverless application using Amazon Web Services’ API Gateway and AWS Lambda? Interested in learning how to create a serverless Python application? Great, because we’re going to build a serverless API for Twilio SMS throughout this post. What Problem Are We Trying to… Read More

How I Hacked My University’s Registration System with Python and Twilio

University on a beautiful day.

University students know the pain of trying to register for a class only to realize it’s full. At my university we didn’t even have a waitlist system for most classes. We had to resort to logging in and checking the site multiple times a day. This seemed like something a computer could do, so I set out to automate it with a bit of Python and… Read More

Checking Your Daily Spending via SMS with Python, Plaid and Twilio

Spending summaries via text message.

Your bank may let you set up SMS alerts for various triggers. It might even give you the option of receiving periodic spending summaries via SMS (mine doesn’t though!). But what about a daily SMS summary of your spending across all your accounts? This summary is harder to come by, but thankfully you can roll your own by combining Plaid, an easy to use financial services API… Read More