Docker Container for a simple Flask App

Posted on Wed 01 March 2017 in Containers • 3 min read

Continuing the recent microservices trend, I tried to containerise a previous project, a small REST datastore - microstore.

I’m not going to go into detail on what containers are (not least because I don’t think I could!) - but briefly they are a way to package up an app and it’s dependencies so they can be run in their own mini-environment. The best intro is just to follow the tutorial here.

Creating the Container …

Continue reading

Python Microservice Logging

Posted on Sat 25 February 2017 in Logging • 5 min read

After looking into microservices recently, I was running multiple terminals and switching between them to look at logs as they are written to screen. This was a little awkward so I thought it was worth looking for the right way to log to a central location from multiple microservices. Ideally I wanted do this just using the Python logging library, and without adding more dependencies to every service.

This meant a lot of reading around …

Continue reading

Python REST API Client Adhering to a Swagger Schema

Posted on Sat 11 February 2017 in REST • 3 min read

After building a REST API I left it alone for a while before coming back to try and get a client working properly.

Similar goals here to back then - find a good library to use going forwards that does the heavy lifting and make a simple example project. I chose a simple microservice that provides an API for decks of playing cards - like a casino dealer type of thing - which would be a client of …

Continue reading

Python REST API With SwaggerUI

Posted on Sat 29 October 2016 in REST • 3 min read

What with REST APIs and the swagger framework for documenting and integrating them being the in-thing lately, to start getting to grips with them I wanted to see how easy it would be to create a simple one in Python with minimal code from me. Turns out it was very simple.

As practice project I picked writing a really simple datastore.

Choosing a Package

After looking around for something that provides a SwaggerUI (demo here …

Continue reading