Two Django Talks: secrets to reliable Celery integration + strategies for API development

Beatriz Betta
July 3, 2024

It's always a pleasure to promote events and foster the exchange of knowledge in the tech community. Last November, in collaboration with Boston Python, we organized Two Django Talks. The idea was to connect developers, enthusiasts and learners from all over the world sharing our experience on two relevant topics: API Client Generation and Celery.

For us at Vinta, promoting events like this is part of our commitment as a technology company. Our relationship with the tech community is part of Vinta’s own history, as we describe here. Collaboration is not only a big word here, but also a principle rooted deep in our culture: we believe it’s the best way to maximize our strengths, whether being part of a team or the tech ecosystem.

Take a look at the topics discussed during the event. Our experts, Flávio Juvenal and Hugo Bessa, shared their secrets for reliable async tasks and optimized API development.

API Client Generation with DRF-Spectacular and OpenAPI-TypeScript-Codegen

Speaker: Hugo Bessa, tech lead at Vinta

When it comes to JavaScript, it's natural to use this language in both parts of the development stack, frontend and backend. Using the same programming language greatly simplifies the integration thanks to the tools for generating client libraries. However, when we use JavaScript on the frontend and Django on the backend, certain patterns and tooling are necessary to improve the developer experience.

For the backend, the best choice is to use Django REST Framework, especially because it's a solid and battle-tested option for building REST APIs in Django. But how do you integrate DRF as efficiently as a Node backend integration?

In this talk, we explain how you can use DRF Spectacular to turn your API built in DRF into a full-blown API schema. From the generated schema you can have an API documentation site, but not only that.

You can then combine DRF Spectacular with the OpenAPI Typescript Codegen tool, which generates a full API client based on the OpenAPI Schema. The client includes types for all API resources, from enums to services for API interaction. This ensures a maintainable frontend-backend integration, with great developer experience.

Mixing Reliability with Celery for Delicious Async Tasks

Speaker: Flávio Juvenal, partner and Chief Scientist at Vinta

In case you’re not familiar with Celery, here’s a quick definition: it’s a distributed task queue system that will help you deal with asynchronous tasks.

Throughout several Django projects, we've leveraged it extensively, surpassing the typical application of sending emails without holding up HTTP responses. Using Celery, we've been able to aggregate data, populate caches, execute ETL workflows, parallelize intensive processes, synchronize with external services, schedule periodic background jobs, and much more.

After using it for many years, we have considered and tested different task queue systems, but the truth is you just can’t find other libs with the features Celery provides. So to achieve success for our clients, we had to learn our way around its shortcomings and pitfalls. And when using Celery, the thing you want to avoid the most is lost tasks. Take a look at Flavio’s talk and learn useful insights on how to not lose track of tasks and avoid broken features.