Author

Michael Aydinbas Avatar

Michael Aydinbas

Latest articles

by

  • , ,

    Case Study: Developing and Testing Python Packages with uv

    ·

    ·

    11 min read

    Structuring Python projects properly, especially when developing packages, can often be confusing. Many developers struggle with common questions: To help clarify these common challenges, I’ll show how I typically set up Python projects and organise package structures using the Python package and environment manager, uv. The challenge A typical and recurring problem in Python is how to import code that lives in a different place from where it is called. There are two natural ways to organise your code: modules and packages. Things are fairly straightforward in the beginning, when you start to organise your code and put some functionality…


  • , ,

    Case study: How to parse nested JSON

    ·

    ·

    10 min read

    I was asked to help parse a JSON file that is delivered by the iTunes Store Customer Reviews API JSON endpoint. It is not so important how this API works or if there are better APIs for this. Instead, let’s assume that we found our favorite API to work with and that our request makes perfect sense and now we have to deal with the API’s response, JSON in this case. This article will guide you through the necessary steps to parse this JSON response into a pandas DataFrame. I will focus heavily on the concepts and code development and…


  • Code Better with Type Hints – Part 3

    ·

    ·

    11 min read

    This is the third part of a series of articles dealing with the type annotation system in Python, type hints for short. The second part discussed a set of beginner examples and highlighted the benefits of using type hints. This article series is aimed at newcomers to type hints and wants to help you get started. In this third part, I will continue discussing slightly more advanced examples to further deepen your knowledge about type hints. Each example will cover a certain topic and look at type hints from a slightly different perspective. Most examples will end with a tip…


  • Code Better with Type Hints – Part 2

    ·

    ·

    7 min read

    This is the second part of a series of articles dealing with the type annotation system in Python, type hints for short. The first part gave an introduction to type hints. This article is aimed at newcomers to type hints and wants to help you get started. In this second part, I will go over a handful of carefully chosen examples of how to use basic type hints to solve a particular problem and improve the overall code quality and readability. Each example will cover a certain topic and look at type hints from a slightly different perspective. Most examples…


  • Code Better with Type Hints – Part 1

    ·

    ·

    9 min read

    This is the first part of a series of articles dealing with the type annotation system in Python, type hints for short. With this opinionated article, I advocate the use of type hints. I want to explain why you should care and why your code will be better, more bug-free, more accessible, and easier to maintain. At the end, I will give you some recommendations on how to get started. Type hints is a really huge topic and a quick look at the official documentation [4] is all it takes to feel a little lost. To be honest, I am…


  • How to Create an AWS Lambda Layer For Any Python Dependency

    ·

    ·

    9 min read

    I finally managed to get scikit-learn running on the platform. On the way, I learned a lot about AWS Lambda Layers, AWS cli, and AWS cloud infrastructure in general. And now it’s time I share this knowledge with you. In this article you will learn about creating your own AWS Lambda Layer to support any Python package you may need.