PyCon Lithuania 2024

µDjango 2.0, an asynchronous microservices technique.
2024-04-03 , Room 203

A standard Django project involves working with multiple files and folders from the start. Let's see how the work with a Django project changes when we have only one file. This solution automatically transforms Django into a microservice-oriented async framework with "batteries included” philosophy.


The history of the lightweight Django project isn't new.
I encountered a Django project consisting of only 2 files in 2019. At that time, the tiny Django project wasn't comparable to the capabilities of projects based on FASTAPI or FLASK.
But a year later, Django introduced ASGI, and by 2022, Django was ready for use in microservices.

The concept of creating micro-projects on Django reappeared within the Django community in the spring of 2023, and now we have a full-fledged technology for creating asynchronous microservices consisting of one or two files. It was named uDjango.

In this talk, I will share my experience in creating high-performance microservices on Django and how i can keep simplicity and minimalism in projects.

During the talk, I'll discuss the advantages of Django microservices:

  • All-in-one package
  • Standard architecture and syntax
  • Extremely rapid development and deployment speed

After a year of work with uDjango, I have identified the challenges in creating Django microservices:

  • The prevailing opinion that the 'Django framework isn't suitable for microservices'
  • Django settings.py - cause of many problems.
  • URL routing in Django that could be stricter
  • Initialization time of forms and model objects reduces performance

The result of this Talk for the audience will be knowlege about mDjango, a ready-to-use technology for building synchronous and asynchronous microservices.

Talk Based on ideas of:
Kirill Klenov (2019, python benchmark repository )
Carlton Gibson (2022, blog artikle. and folloved discussion)
Paolo Melchiore (2023, mDjango V1. repository)

Python/Django Senior Software Engineer, Solution Architect and Tech Speaker.

I start my career as a programmer specializing in embedded solutions in 1997, and grow to the role of Chief Technology Officer in 2023. Through many successful projects, I gained a robust understanding of various software development paradigms. After more than 10 years as a code mentor, I finally earned the title 'Super Mentor in Engineering' in December 2023.

This speaker also appears in: