Blog / Howto

How to use proxies with an HTTP session using the Python requests package

December 26, 2017

I was working on a client project yesterday where I needed to use a proxy to make HTTP requests with the Python requests package.

In my use case, I needed to create a session and I wanted to just specify the proxy settings in one place and use that for all requests made through that session. I didn't see how to do this in the documentation so I thought I'd share my solution here.

Here's …

Using SSH Agent Forwarding with Ansible

December 24, 2017

I've been using SSH agent forwarding with Ansible for the last few projects I've been working on and I thought I'd just share my setup here.

The neat thing with SSH agent forwarding is not having to store your SSH keys on your servers when pulling down your Git repo during deployment.

For example, I can deploy new code to my servers through Ansible from my local machine using my local SSH keys. The servers …

Extending your Thailand 30-day tourist visa by another 30 days in Bangkok (December 2017)

December 10, 2017

Bangkok is one of my favorite cities and I wish I could stay here for a few months straight without having to do visa runs.

If you have a U.S. passport and entering Thailand by air, you'll automatically get a 30-day visa on arrival as a tourist. If arriving by land, you get 15 days.

As a digital nomad, I like to stay in my favorite cities for a few months at a time throughout …

How to add full-text search to your Django app (with a PostgreSQL backend)

September 25, 2017

In Django 1.10, the django.contrib.postgres.search module was added to make it really easy to use PostgreSQL's full text search engine with a Django app.

I currently use it for this blog, Remote Python's job and developer search, and our knowledge base for Highview Apps. I'm really impressed with how good the search is and how little code is needed to get it working. Unless you have huge amounts of data/traffic and need really …

How to figure out your month-over-month revenue growth with an SQL query (PostgreSQL)

September 10, 2017

These last couple of days, I've been working on a dashboard for one of our Shopify apps so we can get a quick overview of how our app is doing revenue-wise.

One of the metrics we'd like to be able to see instantly is the month-over-month revenue growth rate. For a subscription-based SaaS (software as a service) product, this is a very important metric to track as it tells you if your business is growing …