Skip to content

Commit 652a652

Browse files
authored
Merge branch 'mikeckennedy:master' into master
2 parents b78cdcd + c17908b commit 652a652

File tree

1 file changed

+31
-52
lines changed

1 file changed

+31
-52
lines changed

transcripts/490-django-ninja.txt

Lines changed: 31 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
00:00:11 Django Ninja is highly inspired by FastAPI, but also deeply integrated into Django itself.
88

9-
00:00:17 We have Vitaly Kucherev, the creator of Django Ninja, on the show to tell us all about it.
9+
00:00:17 We have Vitaliy Kucheryaviy, the creator of Django Ninja, on the show to tell us all about it.
1010

1111
00:00:22 This is Talk Python to Me, episode 490, recorded December 10th, 2024.
1212

@@ -144,7 +144,7 @@
144144

145145
00:03:04 Yeah.
146146

147-
00:03:04 So my name is Vitaly Kucherawe.
147+
00:03:04 So my name is Vitaliy Kucheryaviy.
148148

149149
00:03:06 Yeah.
150150

@@ -346,21 +346,21 @@
346346

347347
00:10:09 And yeah, that's, that's how, how it born.
348348

349-
00:10:11 And I guess the next part is like actually why it exists is like, yeah, so in PyDentic, there is model word is reserved for like, you know, any kind of validation.
349+
00:10:11 And I guess the next part is like actually why it exists is like, yeah, so in Pydantic, there is model word is reserved for like, you know, any kind of validation.
350350

351351
00:10:20 Yeah.
352352

353-
00:10:21 So PyDentic uses word model for validation, but in Django world model means like tables, yeah, database tables.
353+
00:10:21 So Pydantic uses word model for validation, but in Django world model means like tables, yeah, database tables.
354354

355-
00:10:29 So you cannot just bring PyDentic models.
355+
00:10:29 So you cannot just bring Pydantic models.
356356

357357
00:10:31 It's the ORM, yeah.
358358

359359
00:10:31 Yeah.
360360

361361
00:10:32 And because people will be confused when you, okay, you speak about model and then you kind of need to think, okay, is it database or is schema?
362362

363-
00:10:39 So like for me, the main goal was to introduce class called schema, which is like a PyDentic model under the hood.
363+
00:10:39 So like for me, the main goal was to introduce class called schema, which is like a Pydantic model under the hood.
364364

365365
00:10:46 And then it should like hide as much as possible the word model.
366366

@@ -382,7 +382,7 @@
382382

383383
00:11:32 It was like really lightweight.
384384

385-
00:11:34 So way faster than Django Ress framework.
385+
00:11:34 So way faster than Django Rest framework.
386386

387387
00:11:36 So I thought, okay, she should be something fast.
388388

@@ -614,7 +614,7 @@
614614

615615
00:19:41 But yeah, so it's, it's, it's really big industry and Django like REST framework has already like lots of plugins or like tools or like, you know, community that you can rely on.
616616

617-
00:19:52 But yeah, again, like the, the, basically, I think the problem that is solved with like this pidentic validation and serialization is like, yeah, you simply rely on like latest standards.
617+
00:19:52 But yeah, again, like the, the, basically, I think the problem that is solved with like this Pydantic validation and serialization is like, yeah, you simply rely on like latest standards.
618618

619619
00:20:04 Yeah, like, so if you never use like type annotation, this is actually first, the good way to try it out and see the benefits.
620620

@@ -678,7 +678,7 @@
678678

679679
00:22:39 And people want to see the graph.
680680

681-
00:22:41 They can just visit jingo-ninja.dev and it's right there on the homepage.
681+
00:22:41 They can just visit django-ninja.dev and it's right there on the homepage.
682682

683683
00:22:45 But yeah, if you start doing like you start, you know, doing some kind of square roots of some numbers, yeah, you will not get this performance.
684684

@@ -692,7 +692,7 @@
692692

693693
00:23:01 So I never actually measured like what is the performance.
694694

695-
00:23:04 So yeah, like, but again, it's like probably like you will see the difference with Pydantic 2 when you like really, so you're in, you have inputs of like really bulky Jasons.
695+
00:23:04 So yeah, like, but again, it's like probably like you will see the difference with Pydantic 2 when you like really, so you're in, you have inputs of like really bulky JSON.
696696

697697
00:23:14 Like, you know, let's say you have like, you know, payload that is like one megabyte and you will, you will definitely see performance.
698698

@@ -806,9 +806,9 @@
806806

807807
00:26:22 There's also like for, I guess for, for the difference for folks who work with FastAPI.
808808

809-
00:26:27 The key difference is that Jenga Ninja, Jenga Ninja's operation, their function, the first argument is always request.
809+
00:26:27 The key difference is that Django- Ninja, Django-Ninja's operation, their function, the first argument is always request.
810810

811-
00:26:35 Because this is like historically what Jenga, what Jenga protocol is.
811+
00:26:35 Because this is like historically what Django, what Django protocol is.
812812

813813
00:26:39 Yeah.
814814

@@ -824,7 +824,7 @@
824824

825825
00:26:58 And yeah, like there was a suggestion, so let's remove it.
826826

827-
00:27:02 But I think, yeah, we should keep it, we should keep it consistent with, with, with default Jenga view.
827+
00:27:02 But I think, yeah, we should keep it, we should keep it consistent with, with, with default Django view.
828828

829829
00:27:07 And yeah, like, I think that, that, that, that works perfectly.
830830

@@ -870,13 +870,13 @@
870870

871871
00:28:11 Another, another thing that's really nice, and you hinted at this before, is that it has automatic documentation, very, very similar to FastAPI for what you write without you doing any work, right?
872872

873-
00:28:23 You just go to slash API slash docs, and you get this nice UI, right?
873+
00:28:23 You just go to /API /docs, and you get this nice UI, right?
874874

875875
00:28:27 You don't have any hassle of creating some UIs.
876876

877877
00:28:30 You just, you just have it for free, right?
878878

879-
00:28:32 So you just go to slash API slash docs, and there you have it.
879+
00:28:32 So you just go to /API/docs, and there you have it.
880880

881881
00:28:35 And you can already like, so by default, Django Ninja comes with two, like three doc and a swagger.
882882

@@ -932,7 +932,7 @@
932932

933933
00:30:40 So you can create like, you know, as, as, as many as possible ninja API instances.
934934

935-
00:30:45 So you can have like slash public API slash private slash custom slash, yeah, whatever, like version one, version two, like, and basically you can define multiple, multiple versions, reuse functions.
935+
00:30:45 So you can have like slash public API/private/custom/, yeah, whatever, like version one, version two, like, and basically you can define multiple, multiple versions, reuse functions.
936936

937937
00:30:57 And then, you know, can continue your work while keeping the old, old, you know, version one, version two code or private public, stuff like that.
938938

@@ -1042,7 +1042,7 @@
10421042

10431043
00:34:59 And you pointed out that you can have public and private APIs in this similar way.
10441044

1045-
00:35:04 And so you could have public APIs, maybe multiple versions of them, but also a separate private API that potentially exposes more more things.
1045+
00:35:04 And so you could have public APIs, maybe multiple versions of them, but also a separate private API that potentially exposes more things.
10461046

10471047
00:35:13 Right.
10481048

@@ -1198,7 +1198,7 @@
11981198

11991199
00:39:25 Like editor should do that to complete.
12001200

1201-
00:39:28 My pie should not like scream at you and it should validate under the hood.
1201+
00:39:28 MyPy should not like scream at you and it should validate under the hood.
12021202

12031203
00:39:33 So there's like a pretty, pretty like nasty kind of if typing stuff, annotations.
12041204

@@ -1248,7 +1248,7 @@
12481248

12491249
00:40:49 combinations.
12501250

1251-
00:40:49 So if you know, maybe like a Jenga plus Python 3.6 or stuff like that was like really giving
1251+
00:40:49 So if you know, maybe like a Django plus Python 3.6 or stuff like that was like really giving
12521252

12531253
00:40:55 some headaches.
12541254

@@ -1264,9 +1264,9 @@
12641264

12651265
00:41:22 So your editor works.
12661266

1267-
00:41:24 If you use MyPi, you really like types, you have 100% type correction.
1267+
00:41:24 If you use MyPy, you really like types, you have 100% type correction.
12681268

1269-
00:41:30 And then on the hood, it does as fast as possible, whatever, like PyDentic Magic,
1269+
00:41:30 And then on the hood, it does as fast as possible, whatever, like Pydantic Magic,
12701270

12711271
00:41:36 media with Rust.
12721272

@@ -1398,7 +1398,7 @@
13981398

13991399
00:45:29 You know, I have kind of the same feeling about like any, any like Python approaches to the dependency injection libraries,
14001400

1401-
00:45:36 because I think the, the Pytonic way is actually like, like it's more kind of, because you can import from strings.
1401+
00:45:36 because I think the, the Pythonic way is actually like, like it's more kind of, because you can import from strings.
14021402

14031403
00:45:43 You can, you know, pass kind of any type of arguments and just access them by like the, this quarks.
14041404

@@ -1412,19 +1412,19 @@
14121412

14131413
00:46:26 Like, okay, like let's do dependence injection or some kind of SSL protocols, like, you know, timeouts and stuff like that.
14141414

1415-
00:46:33 But they, they really try to like make it as current Pytonic way as possible through like some quarks or like, or, or like, you know, stuff that you, you never, you never know.
1415+
00:46:33 But they, they really try to like make it as current Pythonic way as possible through like some quarks or like, or, or like, you know, stuff that you, you never, you never know.
14161416

14171417
00:46:42 Okay.
14181418

1419-
00:46:43 What's what's actually injected, but verbally, you know, what, what's, what's going on.
1419+
00:46:43 What's actually injected, but verbally, you know, what, what's, what's going on.
14201420

14211421
00:46:47 Yeah, the quarks and the stargs, quarks, all that stuff is when I see that it's the function signature, I feel like, okay, the, you kind of given up on helping me know what I'm supposed to do here.
14221422

14231423
00:46:57 The only way to know is to go read the documentation, which not a big fan.
14241424

14251425
00:47:01 Let's talk about authentication.
14261426

1427-
00:47:02 So what's the, the Jingo ninja way for authentication here?
1427+
00:47:02 So what's the, the Django ninja way for authentication here?
14281428

14291429
00:47:07 It looks pretty integrated.
14301430

@@ -1452,7 +1452,7 @@
14521452

14531453
00:47:50 Off inside this function.
14541454

1455-
00:47:51 You can also access request and like attach your request.user, which is what is in most cases are done.
1455+
00:47:51 You can also access request and like attach your request. User, which is what is in most cases are done.
14561456

14571457
00:47:57 If you like, you have user in your system that is tied to some token or stuff like that, but it's kind of on purpose that yeah.
14581458

@@ -1656,7 +1656,7 @@
16561656

16571657
00:54:55 Yeah.
16581658

1659-
00:54:55 Like whatever new version, like I saw this a lot with Pidentic when they, you know, they already like a version two for like a year in a while.
1659+
00:54:55 Like whatever new version, like I saw this a lot with Pydantic when they, you know, they already like a version two for like a year in a while.
16601660

16611661
00:55:04 While if you ask LLM to implement some stuff, they, they still giving you the old, old approaches.
16621662

@@ -1668,7 +1668,7 @@
16681668

16691669
00:55:30 Yeah.
16701670

1671-
00:55:31 But if you like listening to this podcast, you can go to LLM.jangoNinja.dev.
1671+
00:55:31 But if you like listening to this podcast, you can go to LLM.djangoNinja.dev.
16721672

16731673
00:55:36 It will, it will, we'll redirect you to some ticket where I will notify when it's ready.
16741674

@@ -1788,7 +1788,7 @@
17881788

17891789
01:00:11 Try to make it for people to migrate to newer, newer versions easier.
17901790

1791-
01:00:15 So like, I guess the hardest part was like, you know, between version zero something to 1.0, but yeah, it will, it was like dictated by the fact that, you know, Pidentic moved from one to two.
1791+
01:00:15 So like, I guess the hardest part was like, you know, between version zero something to 1.0, but yeah, it will, it was like dictated by the fact that, you know, Pydantic moved from one to two.
17921792

17931793
01:00:26 So like, there was no way to make it without breaking changes.
17941794

@@ -1832,7 +1832,7 @@
18321832

18331833
01:02:09 This is like a very first way to try that to do.
18341834

1835-
01:02:11 To just simply install Manage Jenga and you'll have Jenga in that hood, Ninja under the hood and everything you need all in one, in one file.
1835+
01:02:11 To just simply install Manage Django and you'll have Django in that hood, Ninja under the hood and everything you need all in one, in one file.
18361836

18371837
01:02:18 Cool.
18381838

@@ -1878,7 +1878,7 @@
18781878

18791879
01:02:57 Just visit talkpython.fm/sentry and get started for free.
18801880

1881-
01:03:02 And be sure to use the promo code talkpython, all one word.
1881+
01:03:02 And be sure to use the promo code TALKPYTHON, all one word.
18821882

18831883
01:03:06 And this episode is brought to you by Bluehost.
18841884

@@ -1923,24 +1923,3 @@
19231923
01:04:07 Now get out there and write some Python code.
19241924

19251925
01:04:09 write some Python code.
1926-
1927-
01:04:10 Open arms!
1928-
1929-
01:04:13 Open arms!
1930-
1931-
01:04:15 Open arms!
1932-
1933-
01:04:17 Open arms!
1934-
1935-
01:04:19 Open arms!
1936-
1937-
01:04:21 Open arms!
1938-
1939-
01:04:23 Open arms!
1940-
1941-
01:04:25 Open arms!
1942-
1943-
01:04:27 you you Thank you.
1944-
1945-
01:04:29 Thank you.
1946-

0 commit comments

Comments
 (0)