Python Environment Management for Rubyists – a Guide

Python has always been an intriguing language to me, but I’ve never been a huge fan of its syntax. I have always liked Lisps, though. Thus, when I discovered Hy a few months ago, I was completely smitten. Then I tried to set up a development environment, and was caught in a morass of old tooling and poorly explained transitions. Python 2? Python 3? Pip? Setuptools? Easy_install? Ugh. Read more on Python Environment Management for Rubyists – a Guide…

Managing Amazon S3 files in Python with Boto

Amazon S3 (Simple Storage Service) allows users to store and retrieve content (e.g., files) from storage entities called “S3 Buckets” in the cloud with ease for a relatively small cost. A variety of software applications make use of this service.

I recently found myself in a situation where I wanted to automate pulling and parsing some content that was stored in an S3 bucket. After some looking I found Boto, an Amazon Web Services API for python. Boto offers an API for the entire Amazon Web Services family (in addition to the S3 support I was interested in).

Installing Boto

Boto can be installed via the python package manager pip. If you don’t already have pip installed, here are the directions. Read more on Managing Amazon S3 files in Python with Boto…

Using the Command Pattern to Write More Testable Python

Often times, when writing Python, I run into a situation that requires me to write a simple validation function.

def check_validity(item):
	return item.value_to_check > 0

This function is easy to test, and it’s clear what it’s supposed to be doing. But as so often happens, I may need to validate more than the single attribute I originally checked.

Read more on Using the Command Pattern to Write More Testable Python…

Real-time Generation of Numeric Data Fixtures in IronPython

Recently I’ve been working on a .NET app that communicates with multiple internet end points. Each end point is a data collector, and numeric data is retrieved over these connections in real time.

It is important for the app to be able to do some analysis of the data, such as minimum and maximum value, or the rate of change of a value. In order to write meaningful system tests over this functionality, I needed to simulate the data that will be generated by the end points.

Read more on Real-time Generation of Numeric Data Fixtures in IronPython…