A Compose for Docker Machines

Compose for Docker Machines; declaring your machine configurations.

Introducing a new tool factory for composing Docker machines wrapping around docker-machine itself. This lets you define a factory.yml file like this: machines: test: driver: digitalocean And run: $ factory up That’s it! You can define as many machines as you like and the configuration options match those of docker-machine. There are also a few other nifty commands: stop – Stop a machine or all machines rm – Remove a machine or all machines ls – List all machines Check it out on Github at: https://github. [Read More]

circuits + React

I’ve been hearing lots of good things about React (a JavaScript library to build User Interfaces) and recently came across the several tutorials that have a backend implementation in: PHP Python JavaScript Ruby Go I felt that there was one missing in particular and that of course is: circuits For those not familiar with circuits it is: A Python Application Framework Supports a loosely coupled architecture Is fully event-driven (i. [Read More]

A Docker-based mini-PaaS

A Docker-based mini-PaaS written in Python

The Why So by now everyone has heard of Docker right? (If not, you have some catching up to do!) Why have I created this mini-PaaS based around Docker? What’s wrong with the many myriad of platforms and services out there: Tutum AWS Deis Solum Flynn Well. Nothing! The various platforms, services and stacks that exist to service, deploy, monitor applications using Docker all have their use-cases and pros and cons. [Read More]

AsyncIO and Protocols

Python AsyncIO and Networking Protocols

This is a bit of a rant regarding Python’s AsyncIO and Networking Protocols. Lately I’m seeing an influx of re-implementations of various networking protocols hit the Python Package Index that implement said protocols for the new Python AsyncIO standard library module (framework)? for Python 3.4+ One of the most frustrating things about being the developer and maintainer behind circuits is the fact that there are very few good framework agnostic implementations of low-level networking protocols. [Read More]

Getting started with circuits

Getting started quickly with circuits. An ASCIInema tutorial!

Here’s a quick ASCIInema tutorial I put together to show you how to get started with the circuits Asynchronous Event-Driven Application Framework for Python.

The code in this tutorial is as follows:

from circuits import Component, Event

class hello(Event):
    "hello Event"""

class App(Component):

    def hello(self, name="World!"):
        print "Hello {0:s}".format(name)
        return "Hello {0:s}".format(name)


Come join us on #circuits on the FreeNode IRC Network

Docker and Plone

Spinning up Plone on Docker

Come across Docker yet? If not you should check it out! Summary: Portable containers across Development, Staging and Production environment(s). Guarenteed consistency. Lightweight viraulization. Excellent Tooling and Ecysystem. Growing at an ever expanding rate! Here’s a quick demo of how to spin up a Plone instnace using Docker. (Plone is a Python powered Content Management System) ubuntu@vz1:~$ CID=$(docker run -i -t -d -p 80:80 turnkeylinux/plone-13.0:latest)^C ubuntu@vz1:~$ CIP=$(docker inspect -format='{{. [Read More]

Fixing CSV Data with csvkit

TL;DR: csvkit is a great little library and set of UNIX-style utilities for dealing with CSV data. Here I show how I solved a problem with some CSV Data I had at work and how I solved it with Python and csvkit! Problem Basically the problem boiled down to the classical GIGO problem where I had a CSV Input Source containing inconsistent data as well as inconsitent formatting (superfluous whitespace). [Read More]

circuits + twisted

circuits + twisted integration

Well I’ve finally gone and done it! It’s still alpha at this stage but twisted applications, protocols and libraries can now run on top of circuits. Check out the code and samples: https://bitbucket.org/circuits/twistedintegration All you need to do is install the CircuitsReactor at the top of your module: import circuitsreactor circuitsreactor.install() Here’s a simple “Echo Server” example straight from twisted’s docs: #!/usr/bin/env python import circuitsreactor circuitsreactor.install() from twisted.internet import reactor from twisted. [Read More]

Migrating to blohg

I think I’ll be migrating from Pelican to blohg. The two Blogging engines both share very similar functionality but the key differences that are attracting me to blohg are: Mercurial backed. WSGI Application With these two key features I’ll be able to better integrate My Blog into My Website which is itself powered by sahriswiki and circuits.web and host my blohg powered blog using circuits.web’s Gateway Component. Kudos to the blohg development team! [Read More]