Category Archives: Uncategorized

Django Rest Framework API Microservice

I recently completed a small project for Zenstores. They simplify the shipping process for ecommerce sites. TheirĀ online service lets online businesses use multiple shipping companies for deliveries.

Each shipping companies offers a different own API, for booking shipments, etc. My client uses a separate microservice for each shipping company. These microservices listen to requests from the main system and translate them to the shipping company’s standard.

My client asked me to use Django Rest Framework to create a microservice which supports a new shipping company. DRF is a popular and powerful library to create RESTful APIs using Django.

The supplier provided me with a sandbox API and extensive documentation. The documentation was somewhat incomplete and out of date. Fortunately their support contact was very helpful all along.

I used Test Driven Design for complex functions where I understood the functionality well. For the rest I used a more experimental approach and added unit tests afterwards. Testing coverage was over 90{d34bf16ac7b745ad0d2811187511ec8954163ba9b5dbe9639d7e21cc4b3adbdb}.

The client has integrated the microservice within their system and the first test shipments have gone through.

Teaching Python

Recently Learning Tree, a well-respected training company, invited me to teach Python for them. Last week I delivered my first course for them, their Advanced Python course

A room full of people, nearly 500 slides, about 10 step-by-step practical exercises and four days to make sure every left with a better understanding of Python

Even though I’ve been programming in Python for 6 years, I still don’t know it all. The language itself is constantly growing, there are 150,000+ open source Python packages, and only so many bytes of storage in my brain. In preparation I read through the slides, and looked up anything which i wasn’t fully clear on myself. I was pleasantly surprised by how much IĀ do know

And, on the flip side, I added some of my own experiences whilst delivering the slides, adding some depth and flavour to the course

I made sure to regularly check the delegates’ understanding, and to fine tune my delivery. I’ve yet to receive a compilation of the feedback but, as far as I can tell, everyone made good progress and enjoyed it.