Тёмный
No video :(

Django Ninja - The new DRF killer?! 🥷 

Tom Dekan
Подписаться 1,9 тыс.
Просмотров 3,4 тыс.
50% 1

Django Ninja is getting a lot of attention online.
I show you how to build a simple API, with built in docs, using Django Ninja (a package for Django).
(Spoiler: such a nice way to create APIs FAST!)
✍️ Check out my other written guides here: www.photondesigner.com/articl...

Опубликовано:

 

8 июн 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 16   
@jayesh_15
@jayesh_15 Месяц назад
Well the code part is similar to using the Response of DRF and thus removing the need for a serializer... Doesn't look like a stellar upgrade to get to or am I missing something here?
@tomdekan
@tomdekan Месяц назад
There are quite a few nice Django Ninja features v DRF: check out this Jayesh: django-ninja.dev/motivation/ I probably wouldn't switch from DRF to Ninja if I was using DRF. But I would start all new Django APIs with Django Ninja
@aravindr2333
@aravindr2333 Месяц назад
for people not familiar with python typing , it will seem very hard . learning typing is need to be part of basic (from my exp)
@tomdekan
@tomdekan Месяц назад
Thanks for the comment. No typing is required! In case you want to validate data with a schema, and are having difficulties, have you seen the ability to generate a schema from the models with Ninja? (django-ninja.dev/guides/response/django-pydantic/)
@tomdekan
@tomdekan Месяц назад
No typing required! In case you want validate data with a schema, have you seen django-ninja.dev/guides/response/django-pydantic/
@Steven-wm9vu
@Steven-wm9vu 17 дней назад
@@aravindr2333 typing is beyond easy
@AbdennourHabchi
@AbdennourHabchi Месяц назад
hi thank u Tom for video , Django Ninja it's look like FastAPI
@tomdekan
@tomdekan Месяц назад
You’re welcome and I agree with you. FastAPI and Django Ninja are quite similar. I like how Django Ninja is focused on Django. Might do a video on FastAPI💨
@AbdennourHabchi
@AbdennourHabchi Месяц назад
@@tomdekan Try FastAPI with HTMX ☄
@tomdekan
@tomdekan Месяц назад
Nice idea :) 🚀
@AlexGarcia-ir7fl
@AlexGarcia-ir7fl Месяц назад
So basically FASTAPI + Django dev tools
@tomdekan
@tomdekan Месяц назад
Yes + Django ORM integration. Here's a comparison for you Alex: django-ninja.dev/motivation/?h=fastapi
@Steven-wm9vu
@Steven-wm9vu 27 дней назад
Also async just works. Also, Swagger out of the box at /docs.
@tomdekan
@tomdekan 17 дней назад
Good point. Swagger out of the box is great.
@destinyefe8996
@destinyefe8996 2 месяца назад
Thanks for the brief intro. what would become of DRF. Serializers 🙂. django-ninja is more straightforward
@tomdekan
@tomdekan Месяц назад
You're welcome 🙂. True regarding DRF. I've used DRF a lot in production for different products/businesses. I think even the class-based serializers of DRF are unenjoyable to use. I find DRF's serializers are clunky when you want to avoid duplication. E.g sometimes you might need to get a temporary download link from your object storage, and bolt it onto the serializer. So, in short, Django Ninja looks like a superior to me.
Далее