[0:00] flask Django or fast API this is the [0:03] question you should be asking yourself [0:04] if you're interested in Python web [0:06] development in this video I'm going to [0:08] break down everything you need to know [0:09] about these three different Frameworks [0:11] and tell you which one you should pick [0:13] depending on your use case now let's get [0:16] started with flask this is a lightweight [0:18] wsgi web application framework that's [0:21] easy to get started with and highly [0:23] customizable it's a minimalist framework [0:25] with extendable features and it's great [0:27] for building small to mediumsized apps [0:29] like micro Services next we move on to D [0:31] Jango now this is a highlevel python web [0:34] framework that comes with a ton of [0:35] features out of the box it includes an [0:38] omm forms authentication routing and [0:41] more Jango is ideal for handling complex [0:44] web applications because of its [0:46] conventional project structure and all [0:48] of the features that are built into the [0:49] framework saving you a ton of time [0:51] lastly we move on to fast API now this [0:54] is a modern high performance web [0:56] framework for building apis with [0:58] standard python type it has support for [1:01] asynchronous programming automatic data [1:03] validation and generation of open API [1:06] documentation this is great for quickly [1:08] building apis that are self-documenting [1:10] and really fast in performance so now [1:13] that we have an overview of these [1:14] various Frameworks I'm going to start [1:16] going through some very specific [1:17] comparison criteria so you can [1:19] understand exactly which one to pick [1:21] depending on your use case however if [1:23] you are going to build out a project [1:25] using one of these Frameworks you're [1:27] probably going to want to be utilizing [1:28] an IDE and not not just because idees [1:31] can make your life so much easier but [1:33] because experience with them is actually [1:35] something a lot of recruiters are [1:36] looking for now there's all kinds of [1:38] basic code editors to pick from but if [1:40] you really want to get to the [1:41] professional level then you should [1:42] utilize Jeet brains IDE which is the [1:45] sponsor of this video whether you're [1:47] working in Python go rust Java you name [1:51] it Jeet brains has a fully featured [1:53] professional IDE for you these idees [1:55] offer the best performance and speed and [1:57] have impressive user interfaces take [2:00] advantage of integrated debuggers code [2:02] analysis quick fixes and incredible AI [2:05] assistance that supercharge your [2:06] workflow not to mention features like [2:08] instant search and navigation and an [2:10] insane amount of plugins to customize [2:12] your environment as you scale up and [2:14] work on larger and larger projects the [2:16] importance of an IDE becomes clear you [2:19] should really start building strong [2:20] habits Now by utilizing professional jet [2:23] brains idees and taking advantage of [2:25] these powerful tools from the link in [2:27] the description so let's start comparing [2:29] these Frameworks beginning with ease of [2:31] learning now we start with flask this is [2:34] by far the easiest to learn and in just [2:36] a few minutes you can have a fully [2:37] functioning API or website it's very [2:40] simple and easy to use there's not a lot [2:42] of setup or a ton of settings that you [2:44] need to go through and if you're just [2:45] trying to build something very simple I [2:47] definitely recommend sticking with flask [2:50] moving on from that we go to fast API [2:52] now fast API is more of an intermediate [2:55] difficulty there are more Concepts that [2:56] you need to learn you need to understand [2:58] asynchronous programming and it's [3:00] helpful to also understand pantic and [3:02] how you use the python type hint system [3:05] fast API is a lot more powerful and it [3:07] can provide automatic documentation and [3:09] data validation which can be really [3:11] really helpful but it does take a little [3:13] bit longer to set up and can be slightly [3:15] more complicated lastly we move on to D [3:17] Jango now this is by far the most [3:20] complicated because it has so many [3:21] features built in that means just to get [3:23] a simple D Jango website set up can [3:25] actually take 20 or 30 minutes if you're [3:28] learning this completely from scratch [3:29] it's definitely going to take you a few [3:31] days or a few weeks to really understand [3:33] all of the different features and how [3:34] all of the components work together that [3:37] said D jeno is definitely worth learning [3:39] and if you're going to be building [3:40] something more complicated and with a [3:41] lot of data I definitely recommend going [3:44] down that path just understand it will [3:46] take you a little bit longer as there's [3:47] a lot of things you need to learn to get [3:49] started with Jango so now we can get [3:51] into performance starting with flask now [3:54] flask has good performance overall but [3:56] it's not the best for high load [3:58] applications the reason for that is it's [4:00] built in a synchronous context meaning [4:03] it's not going to handle multiple [4:04] requests at the exact same time like [4:06] some other web Frameworks next we have [4:09] fast API now fast API out of all of the [4:12] Frameworks here is by far the fastest [4:14] it's Superior to all of them and the [4:16] reason for that is it's built [4:17] asynchronously meaning it can scale and [4:19] it can handle multiple requests at the [4:21] exact same time lastly we move on to D [4:24] Jango now Django is the slowest of the [4:26] three Frameworks due to its [4:28] comprehensive nature however it is still [4:30] very reliable for large applications and [4:32] a lot of huge companies still use Django [4:35] despite the fact that it's not the [4:36] fastest out there in summary if you're [4:38] really looking for the absolute best [4:40] performance and you're building [4:41] something like an API then definitely [4:43] choose fast API but for most of you this [4:46] isn't going to matter a ton so simply [4:48] pick the one that's easiest to use or [4:50] best suited for your project so now [4:52] we're going to dive into the use cases [4:54] starting with flask now flask for me is [4:56] what I use when I want to build [4:57] something really quickly and I don't [4:59] want to deal with a ton of configuration [5:01] or spend a lot of time setting up a [5:02] server if I need a really fast web [5:05] server if I want to get something done [5:06] in just a few minutes I'll definitely [5:08] turn to flask and even for slightly [5:10] larger hobby projects flask is still [5:12] totally fine personally for me it's not [5:14] something I would use in production [5:16] unless it was doing a really simple task [5:18] and that's because there are better more [5:20] performant options out there but a lot [5:22] of times in my development environment [5:23] I'll need a simple API and I'll turn to [5:26] flask because I know it's the fastest [5:28] for me to get something set up with it's [5:30] great to start with if you're a complete [5:31] beginner it's good for prototyping and [5:33] you can really use it to learn the [5:35] fundamentals of web development next we [5:37] move on to D Jango now Jango is best [5:39] when you're building a large monolithic [5:41] application and you need a lot of [5:43] built-in features like a CMS [5:45] authentication and om Etc now it's worth [5:49] noting that with a framework like flask [5:51] you can actually have extensions or [5:52] additional python packages they provide [5:55] some of the same functionality but it's [5:57] not as conventional to use them and it [5:59] can get a a little bit messy when you're [6:00] building a really large app so that's [6:02] personally why I prefer D Jango Django [6:05] has a lot of settings and configuration [6:07] built in a lot of things you already [6:09] know how to do because it's simply built [6:11] into the framework when you start [6:12] building something larger and you maybe [6:14] have multiple developers on your team [6:16] it's a lot easier to work with something [6:18] that has the conventions built in like d [6:20] Jango and all of the features already [6:22] wrapped into the framework Jango is [6:24] really good when you're dealing with a [6:25] lot of data it has again something [6:27] called an OM which is an object [6:29] relational mapping and it allows you to [6:31] utilize databases just like a normal [6:33] python object which can make it really [6:35] easy to do development and manage large [6:37] amounts of data that said it also has [6:39] all of that data that you can add to an [6:41] admin panel so you have a built-in CMS [6:44] and overall it's just better when you're [6:45] dealing with a lot of data and you have [6:47] these larger applications now lastly we [6:50] move on to fast API fast API is really [6:53] the choice to go with if you're trying [6:54] to build a high performant API now with [6:57] both flask and Django you can build API [6:59] as well or you can just build a normal [7:01] website where you're rendering HTML and [7:03] pages but really if you want the fastest [7:06] API you can possibly have then fast API [7:08] is the one to go with it has automatic [7:10] data validation automatic documentation [7:13] which is super super helpful especially [7:15] as you scale up and it has asynchronous [7:17] programming built in which is really [7:18] what provides it all of that speed so [7:21] overall flask for something simple [7:23] prototyping getting a hobby project up [7:25] and running Jango for something a little [7:27] more professional where you need those [7:28] built-in features and then fast API when [7:31] you want a high performance scalable API [7:33] so now we move on to community and [7:35] ecosystem now all three of these are [7:37] very large well-known python Frameworks [7:40] they have a huge Community behind them [7:42] and all of them have additional [7:43] extensions add-ons plugins Etc that you [7:47] can add to have additional functionality [7:49] in each framework for example something [7:51] like flask even though it doesn't have a [7:53] ton of features built in there's all [7:55] kinds of packages you can install they [7:57] provide that additional functionality [7:59] for example you want authentication in [8:01] flask you can simply install a package [8:03] and now you have flask authentication [8:05] you just need to do a little bit of [8:07] configuration same thing for Django same [8:09] thing for fast API so I wouldn't pick [8:11] one of these three packages or one of [8:13] these three Frameworks sory simply [8:15] because they have a larger Community or [8:16] ecosystem all of them are very wellknown [8:19] all kinds of resources on the internet [8:21] and they're used for very large projects [8:23] some of which you've probably interacted [8:25] with so now we're going to get into job [8:27] demand and which of these you should [8:28] learn if you are looking to land a [8:30] developer role now bluntly Django is [8:32] going to be the most popular here and [8:34] it's going to show up in the most job [8:36] requirements that's because this is the [8:38] larger of the Frameworks it's used for a [8:40] lot of larger or midsize companies and [8:42] this is really just what a lot of people [8:44] go to when they're trying to build a [8:46] website or some kind of backend service [8:48] with python so if you are looking to [8:50] land a roll simply learn Jango that's [8:52] going to be your best bet not to say [8:54] that flask and fast API don't have some [8:56] demand in the market they do and they're [8:58] increasingly popping up especially for [9:00] the smaller companies or startups but [9:02] most of the time you're going to be [9:03] seeing Jango listed as that primary [9:05] framework overall I would say it's worth [9:07] it just to learn them all D Jango will [9:09] definitely take you the most amount of [9:11] time but picking up something like Fast [9:13] API or flask is going to be pretty fast [9:15] and it can have an added benefit when [9:17] you are applying to jobs so there you [9:19] are that's my breakdown of flask Jango [9:21] and fast API flask for simple web apps [9:24] where you're prototyping or building [9:26] something quickly D Jango for more [9:28] complicated dated driven applications [9:30] and fast API for building that fast [9:32] scalable API with python if you enjoyed [9:35] this video make sure you leave a like [9:37] subscribe to the channel and I will see [9:39] you in the next one [9:42] [Music]