Contribute Media
A thank you to everyone who makes this possible: Read More

Easy Service to Service Communication Using Pydantic Models

Description

Microservices architecture, while offering flexibility and scalability, introduces significant complexity in communication between services. Each API call involves creating and parsing request and response bodies on both the server and client sides, not to mention additional challenges like validation and maintaining API documentation. This multi-step process adds considerable overhead to both development and integration.

FastAPI and Pydantic have made substantial improvements in managing these complexities on the server side. However, when using frameworks like Django or Flask, similar efficiencies can be harder to achieve. Despite these server-side advancements, simplifying the client-side experience remains crucial. One key challenge is managing request and response models without duplicating them across services.

In this session, we will demonstrate easy generation of OpenAPI documentation for Django or Flask servers using django-ninja and flask-ninja packages. Additionally we show sharing Pydantic models from the server with clients through Python packages that significantly simplify integration and eliminate code duplication.

Details

Improve this page