Batteries vs. Speed: The Django/FastAPI Debate with Calvin Hendryx-Parker and Frank Wiles
Transcript
By Calvin Hendryx-Parker, Speaker 2, Speaker 3, Speaker 4. From DjangoCon US 2026. Published October 26, 2026.
Watch the video Markdown version 7,278 words · auto-generated · en
Transcript
Automatically transcribed, so expect mistakes in names and technical terms. Filler words are removed.
Calvin Hendryx-Parker
We didn't have time for the organizers to get the cage match deployed for us up here, but we figured Frank and I could probably make do somehow. So, want to welcome you. Thank you all for joining us for Django vs. FastAPI, a batteries-versus-speed discussion. I think what we'll start off with, though, is there's really probably no wrong answer here. We don't want you to think that this is an adversarial conversation, much to the chagrin of many of the folks in the room who are expecting an all-out battle, coming up here with the gloves on and duking it out. But there's definitely going to be some trade-offs that we're going to chat about during the conversation.
Speaker 2
But I mean, Django wins, right?
Calvin Hendryx-Parker
I mean, I'm okay with Django winning, too, or FastAPI is pretty cool as well. But I think the value of the two of us getting together and talking about this is the perspectives that we bring. So I'm Calvin Hendryx-Parker. I'm co-founder and CTO of Six Feet Up. And we've done projects, obviously, in Django, Zope, and Plone over the years, and FastAPI now. So I think we wanted to bring the agency perspective. We're both agencies, we both do similar types of projects, and we both have a lot of perspective to bring to the topic itself. So I think—want to give a quick intro, Frank?
Speaker 2
Yeah, I'm Frank Wiles. I'm the founder and president of Revsys, an agency just like Six Feet Up. We focus, though, almost exclusively on Django. While we've done a little bit of FastAPI, we just haven't had the need. But I'm also on the Django Steering Council, and hopefully everybody will see that there's differences, but they are not huge, and you don't have to leave your comfy home ecosystem to get some of the same benefits.
Calvin Hendryx-Parker
Yeah. So you're saying you know a thing or two about Django.
Speaker 2
Just a little bit.
Calvin Hendryx-Parker
Just a couple things. That's great. Well, that's what we're here for. But I think we need to cover what we're actually talking about. So, Frank, if you want to cover this one.
Speaker 2
Yeah, so FastAPI is obviously about APIs, and so we're not talking about the parts of Django that don't involve APIs. So we're not talking about forms and that kind of element. We're comparing Django Ninja specifically because it is a FastAPI-like experience, but inside of Django. Most everybody still uses DRF, Django REST Framework, and DRF is also a choice, but that's not what we're comparing today. We weren't trying to do a three-way comparison of FastAPI, DRF, and Ninja. So we're just comparing Ninja versus FastAPI.
Calvin Hendryx-Parker
But it may convince you to stop using DRF if you look at the numbers later and see what we actually kind of came down to in the end. Django Ninja is a really great comparison to the FastAPI side of this. So if you've thought about both these options and haven't considered Ninja, that's definitely the way to go here. Starting with the context behind this, if you have a team who already has opinions and tons of knowledge and a built-up stack of learnings behind using tools like Django over FastAPI, you have to take these things into consideration as you look at what choices you make. You may make different kinds of choices depending on the composition of the team.
Speaker 2
Absolutely. If you don't have any experience in a web framework, obviously you should look around and taste-test them all and make a decision. But if you have a huge, deep history with something like Django, there isn't as compelling a reason to use something different, right? Also, with the scope, FastAPI is primarily about building APIs, and Django can build APIs, but Django has a lot of other things to it. So if you don't know for sure that your project is going to stay an API for the long haul, you might be better served by choosing Django.
Calvin Hendryx-Parker
And if you talk about the workload behind the scenes, if you have specific characteristics that may match Django's type of style of workload or may match more of the I/O characteristics or some really special needs that come out of the FastAPI frameworks, you may have to leverage that as part of your choice. The frameworks actually aren't as important as what you're doing with them. They each can stand on their own. They want to start well, closer to each other.
Speaker 2
Okay.
Calvin Hendryx-Parker
They want us to kind of snuggle, I think, in the back there. So, yeah, it's more than just a technology choice. It actually comes down to a lot of the human beings who are involved in the room.
Speaker 2
Absolutely.
Calvin Hendryx-Parker
So let's cover a quick minimal API and FastAPI and what this looks like. I'm not going to give you a code demo here. I think the key aspect here is to look at the simplicity of this FastAPI code. A couple imports, a couple classes plus a route, and that is what you've got to get basically a basic FastAPI Hello World-style application up.
Speaker 2
Yep. And next up is Django Ninja.
Calvin Hendryx-Parker
Wait, Frank, did you not change the slide?
Speaker 2
I did. I changed the slide.
Calvin Hendryx-Parker
You sure? Wait, let's go back. Oh no. Forward? Oh yeah, you're right. Did we actually change the slide? Yeah. No, I think, again, looking at the differences in the code, the syntax is actually not the decision point here. They can be very, very similar from a syntactic standpoint.
Speaker 2
Yeah, I mean, the imports are named different. That's pretty much the difference.
Calvin Hendryx-Parker
Yeah, it was very, very similar, as you just saw from that example. But let's look at the different batteries included. I mean, Frank's going to cover the Django versus Ninja, Django Ninja pieces here.
Speaker 2
So, with Ninja, you are using Django, so you can leverage all of that same Django knowledge and expertise you've had. And so that means you're probably using the Django ORM, the Django admin; the whole rest of the Django ecosystem is at your fingertips. You can use WebSockets and ASGI. And we have this third-party app ecosystem that you can pull from that is large and mature.
Calvin Hendryx-Parker
And then if you're looking on the FastAPI side, it's a little less opinionated. So you bring your own ORM. The OpenAPI pieces are built in, which is nice because it's an API-targeted framework. So if you are doing just that, it's going to have a lot of pieces out of the box that satisfy those specific needs, but it doesn't make opinionated choices in other areas. You can use SQLAlchemy, which is what I chose to do in our various demos. There's no admin predefined, which is a superpower of Django, but may not matter in some applications where you're just building a simple API over the top of a set of data and could be surface area you may turn off in Django anyway. Again, auth, all those kinds of pieces, not as opinionated. But it's also a younger framework, so it's going to have a lot less of the kinds of things that have been brought along historically.
That's just the nature of a framework that's really mature and has been built over lots of time and lots of battle-tested scars. So you kind of get to look at both of those as you're evaluating the various kinds of choices you make.
Speaker 2
Basically, it forces these choices of the ORM on you. It allows for a larger and richer ecosystem to develop because you have this common—signals are available in your app. Various aspects of Django are going to be there, and so you can build an app that is more widely used.
Calvin Hendryx-Parker
Yeah. I mean, I'll say the Django team's done a tremendous amount of work putting async into the core pieces of Django and done it very intentionally and carefully over time. Where FastAPI, that's just out of the box. That's the experience you get as you open the framework up and start actually implementing and building with it.
Speaker 2
So the batteries-included nature of Django comes with a lot of benefits. For example, this is a third-party app that we use a lot in our client projects called Django Activity Stream. It lets you capture, "Bob did this at this time," right? So the code here is saying, send this action for the currently logged-in user: commented on this. Here's this particular comment, and the target we were talking about was a particular listing. And then this lets you construct later a user timeline of Frank commented on the 123 Main Street listing.
Calvin Hendryx-Parker
Yeah, so again, with FastAPI, you don't have nearly as many of these ecosystem add-ons that have been created over time. But you could build it.
Speaker 2
You could absolutely build it. It's not particularly complicated.
Calvin Hendryx-Parker
But should you build it?
Speaker 2
Probably
Calvin Hendryx-Parker
Not. But sometimes some of these batteries have a shelf life. From our experience, we came from a content management background doing a lot of work in the Plone ecosystem, where we had some really robust built-ins in Plone, for example, like DC Workflow. DC Workflow is a finite state machine, workflow machine. It had lots of robust features built into it. And I found a relative equivalent in the Django community called Django FSM. If you haven't tried Django FSM, don't, because it's not maintained anymore. And that's where the problem kind of started. We got excited about it, deployed into a lot of projects, the maintenance slowed on it, people moved from project to project or job to job and lost interest or didn't have the time to maintain these things. Maybe an alternative arrives, like Django
FSM2, but you have to think it through, like what you're buying, why you're bringing it in, all the aspects of these extra dependencies that come into your various projects, and what you own as the choices you've made. I think there's a build-versus-buy or vendor diagram, and again, all these slides are on GitHub, so if you want to check this out, it may be a little small to read on there. But make sure you go through an intentional process of thinking through what add-ons, what dependencies I'm bringing into my project. Is it small enough that I probably should either maybe vendor it or really just build in that little piece of functionality? So I'm not bringing along a lot of baggage and the potential downside of maintainers moving on to other projects or other interests.
Speaker 2
Yeah, I mean, you have to think about the total cost of ownership here, right? It's not just, "Oh, I'm using this thing," but, like, is it well maintained? Is it going to cause me problems later? We shouldn't be using left-pad-like packages, right? As an industry, we shouldn't be doing that. That's just too simple. Write it yourself. Put it in your own code. But things like Activity Stream or OAuth 2, things that need careful attention and maintenance and that you probably don't want to know all the details of, you should absolutely be using third-party packages.
Calvin Hendryx-Parker
Yeah. And then for building those simple pieces, I feel like FastAPI provides a really clean, simple canvas to build these small pieces of functionality. Django obviously gives you a lot of batteries, which is the upside there. So you've got things built into all the helpers and all the other pieces. But if you don't need all that, it's just a lot more stuff you're dealing with. Let's talk about async, Frank.
Speaker 2
Okay.
Calvin Hendryx-Parker
Do we actually need it?
Speaker 2
Probably not.
Calvin Hendryx-Parker
Right?
Speaker 2
You probably don't need async. It's probably more trouble than it's worth for 98% of projects.
Calvin Hendryx-Parker
Just the
Speaker 2
Yeah, there's like three of us.
Calvin Hendryx-Parker
Yeah.
Speaker 2
Again, read the docs back there, yeah, right.
Calvin Hendryx-Parker
He's got requests.
Speaker 2
That's when that sort of stuff really matters, right? And we'll show later. I don't think it's on the next slide, but yeah, we even end up doing the part of Django async without doing async I/O. The part that you need in a Django app that you typically want async for is the communication to the database, and you can use a gevent backend and get async to the database without having to write await everywhere.
Calvin Hendryx-Parker
So why do we even care about FastAPI?
Speaker 2
Well, it's still a really good choice.
Calvin Hendryx-Parker
It is, yeah, that's true. But there's been many a keynote given on this topic of, like, async or not async. I think async has obviously been a hot topic in the community, with a lot of people looking in from the outside who don't understand maybe the Python ecosystem of tools, or are like, "Oh, maybe you haven't had async as a native-from-day-one type feature." But it's absolutely here, absolutely usable, but maybe you should consider what you're doing and whether you actually need it. There are specific kinds of things, like reading from file systems or places where the global interpreter lock may block you from activity, but many people don't have this kind of need.
Speaker 2
I think people mistakenly think that it is magic pixie dust that you spread on your project that somehow just immediately makes it faster.
Calvin Hendryx-Parker
No, it immediately makes it more complex and harder to debug. That would be the magic pixie dust you just spread on your project. Now, that said, it's obviously very valuable in these kinds of cases when you've got lots of concurrent I/O, lots of parallel services, lots of web sockets and long-lived connections, which are also problematic in their own right. So again, look at your actual architecture, evaluate why you're using these kinds of tools and why you'd want to use them. But it's not magic.
Speaker 2
Not magic.
Calvin Hendryx-Parker
You will end up in "it sounds faster" land.
Speaker 2
Yeah. And it intuitively sounds like, "Ooh, well, this will make my thing faster," but in most cases it's not something that you actually need to do, right?
Calvin Hendryx-Parker
Yeah. So again, it's kind of a choice here on whether you've got specialized or non-specialized parts of your API. Building out a monolith plus a focused service can actually be a feature. So in this case, you can see here we've got the Django pieces in here. But we may actually have other specialized API services with FastAPI playing a role or a part there as just a side player, or a really fast implementation of a very small, slim piece of work.
Speaker 2
Yeah, we've had a lot of projects where a monolith is appropriate up to a point, but then there is one particular piece of the puzzle that needs to scale wildly differently or use a different data source. And sometimes it's beneficial to break that out as a service without going full microservice when the rest of the app has no business being a microservice.
Calvin Hendryx-Parker
Right, exactly. Shall we get into the fun part of the talk?
Speaker 2
This is the cage match.
Calvin Hendryx-Parker
So wait, did you bring the gloves?
Speaker 2
No, I didn't. This is a full-contact cage match.
Calvin Hendryx-Parker
So all benchmarks are biased, including ours. I think, again, we wanted to make sure we set forth at least a fair playing ground with what we built. Inside the repository, you'll see a research folder that has some demos in it. And there are two different demos that we'll go over. But as we evaluated how we wanted to present these demos, we didn't want it to just be a raw throughput, like an Apache Bench-style benchmark against a single endpoint. We wanted it to have some sort of behaviors that would demonstrate value being delivered as part of the application. So we looked at equivalent behavior and validation. We each wrote—I wrote the FastAPI parts; Frank wrote the Django pieces for each of these demos
to try and make them as similar as possible as far as the signatures and the database versions and the versions of Redis and the versions of Python. So we weren't evaluating a difference in the version of Python. We were evaluating a difference in, as close as possible, the various framework versions. Again, pin everything, set up hopefully similar concurrency levels, similar database connection levels as we could across each of these pieces. We had a shared set of data that we generated that each of the projects loaded up as a seed into the various demonstrations here. And then obviously the same methodology for doing the warm-up and repeated measuring across it. So you'll see some of the results here.
Speaker 2
And you know it's fair because Django doesn't completely win on performance, right? We didn't cheat.
Calvin Hendryx-Parker
I mean, we didn't think—I don't know, we didn't expect it to win from a raw performance standpoint. But I think you'll be surprised. So the very first scenario was a ZIP-code-type-ahead. So, given this request string of a ZIP code and being able to start typing a couple of characters, could you build an autocompleter that would respond quickly back to you? So again, Redis Stack. There's no relational database involved in this mix at all. We wanted to look at no real external I/O; there's no SQL, there's no ORM. It's literally just a very thin service on top of a Redis cache that is returning results as fast as possible.
Speaker 2
And we thought this was more fair and more realistic than just returning "Hello, world" in JSON.
Calvin Hendryx-Parker
So if you're going and doing some amount of work, obviously Redis is going to be fast in both cases. Not a big deal. Let's look at the results. If you look at the ZIP lookup here, we've got FastAPI in blue and Django in green. You can kind of see here that obviously it's fast, but they're both fast. These numbers are in milliseconds, by the way.
Speaker 2
And this is a sustained 200 requests per second on my laptop.
Calvin Hendryx-Parker
What does that mean? Like, 200 requests per second? What could people compare that to?
Speaker 2
It's 26 million web requests a day. Right, like, that's a lot. That's not your average internal conference room booking website, right?
Calvin Hendryx-Parker
Right. So you can see we've got three times lower P99. But how many people are—I mean, maybe you can explain the P50, P95, P99.
Speaker 2
Yeah, so P50 means that fifty percent of your users got an answer in one millisecond. And up to 95% of your users got it in three milliseconds with Django. And
Calvin Hendryx-Parker
Unacceptable, Frank.
Speaker 2
Totally unacceptable, right? We should be able to get that down to two with some concerted effort, right? And then a P99 means that 99% of your users got their response in six milliseconds or less. But it is three times faster with FastAPI because it is only two milliseconds there. I'm here to say that that probably doesn't matter to anybody.
Calvin Hendryx-Parker
For most folks.
Speaker 2
I mean, exactly. It matters to Instagram and Reddit and sites like that, but probably not you. So speed is not always the reason to pick something.
Calvin Hendryx-Parker
Right. The second demo, Frank and I built a little app we called Zealot. Think of Zillow crossed with Reddit, and what hilarity would ensue if that existed. The reason for that, though, is we wanted to incorporate Postgres, exercise the ORM, have multiple tables of data, have things that were referring to blobs on disk potentially, because we had fun images of the houses you could go comment on, of course, in this system. It includes the ZIP-code demographics. We've got joins going between homes and photos. There's optional upvoting and downvoting built into this API of the system. But again, more realistic
dealing with connection management. That was actually one of the things, as we were building out the benchmarks, we had to sit and kind of fiddle with. The very first benchmark you did what we're doing.
Speaker 2
Yeah, we tried it, and it failed. It was like ten times slower, and I had some configuration problems.
Calvin Hendryx-Parker
FastAPI is faster, but we didn't think that Django would be ten times slower.
Speaker 2
Yeah, but it was just a configuration problem on my part.
Calvin Hendryx-Parker
And how long you've been doing Django for, Frank? A little while. Well, I think this show showcases that the out-of-the-box experience or the naive approaches to many of these performance problems will land you in this same spot. I don't think this is uncommon. With some very minimal, concerted looking at what was actually going on, and doing a little bit of running the benchmarks, we exposed what this problem was. So this is a great way to take a look at how you tune the application, and Django ended up not being ten times slower, which was obviously more what we were hoping for.
Speaker 2
And I asked Claude too.
Calvin Hendryx-Parker
I th I think we asked I asked I asked GPT.
Speaker 2
Okay.
Calvin Hendryx-Parker
I had Claude on my side, I think. So if you wanted to take a guess—yeah, right. So the results here, again, in milliseconds. We're only looking at FastAPI being about 2x slower, but on a scale that probably matters to almost no one in the room, again.
Speaker 2
And this is just going to show you that your scalability problems in almost all web-based things are with your data store. It's not the framework. I'm sure that if we wanted to get max performance here, we should probably just ditch both of these and do this in Rust, right? And we would get that down from 30 milliseconds to six milliseconds again. But we probably also don't need that.
Calvin Hendryx-Parker
And there's also no fancy caching in here. This is literally ORM performance right to the database, doing those joins across multiple databases. And again, this is not—the last one was 200.
Speaker 2
This is 300.
Calvin Hendryx-Parker
This is 300 requests per second in this real simulated application. So, no failures. We had, what, 18,000 responses per trial as we went through and warmed up the caches and ran through these pieces. All of this was done with a tool called Artillery, which is a great benchmarking tool on the back end. All of this is in the repo for you to go explore and dive deeper in. I think, if anything, hopefully this helps people grab a couple of new tools that they haven't seen before so they can go dive deeper into the performance of their existing code and use the patterns and recommendations we've given, which is really to figure out how to pinpoint the problems, make the tuning fix, rerun the tests, and validate that you actually made a beneficial change.
Speaker 2
And then one of the other differences between the two in terms of the benchmark is that this is running four replicas, where the first benchmark was just one replica, which more approximates a real app. You're going to have several WSGI processes or ASGI processes running on different machines. And so this more simulates a real-world scenario.
Calvin Hendryx-Parker
Yeah, I think you were using Uvicorn. No, I was using Uvicorn.
Speaker 2
And I'm using Gunicorn with gevent.
Calvin Hendryx-Parker
Yeah.
Speaker 2
And so that part does async to the ORM, but your code isn't async. Yeah.
Calvin Hendryx-Parker
Normal-looking Django code.
Speaker 2
Yep.
Calvin Hendryx-Parker
The FastAPI code is very, very beautiful. Very clean, very easy to understand.
Speaker 2
It is pretty clean.
Calvin Hendryx-Parker
It is very clean. I mean, I will say it's very clean. There is a benefit to a very small framework in that if you've got a very small task, it's going to be a lot less overhead to manage and maintain. Faster is not the same as better. So I think we hopefully demonstrated that you have to look for the bottlenecks you actually have. This is going to depend on your specific workloads. We couldn't give you a global, just change this one piece of tuning and everything will be better, type of advice.
Speaker 2
Not really, no. I mean, caching is usually the answer, right? But not always, right?
Calvin Hendryx-Parker
Yeah. So I guess this is just a recap: it really just depends. I hate saying that on stage to everyone who's looking for a magic key to unlock the performance pieces. But we've given you the tools to go find where you can stick that key in and unlock those pieces.
Speaker 2
And again, it's like we said earlier: the total cost of ownership of your app, right? Where do you have experience? Where do you feel comfortable? Pick that one.
Calvin Hendryx-Parker
And speaking of total cost of ownership.
Speaker 2
Ooh, we got deploys.
Calvin Hendryx-Parker
We're going to talk about deployment. How many hours have you toiled trying to get apps deployed? And each of these pieces has a happy path and a very simple path to getting deployed. If you've not checked out FastAPI Cloud, the FastAPI folks have built up a service where, literally, in the FastAPI package, you can type this command and it will pop up a window with OAuth and let you log in. Then, when you say go, it deploys for you. It's literally one command and you're done after you've done the auth piece. Very, very simple. It's very much a happy path. I've been playing with it, and it's fun for lots of little toys. It may even be fun for production-level workloads. But things typically...
Rarely stay that simple. I think Django Simple Deploy—
Speaker 2
Django Simple Deploy is very similar. Obviously, there's not one service out there for deploying Django, so it targets several. And if you're using one of those services, it's a great way to make it easy on yourself and get your app deployed.
Calvin Hendryx-Parker
But real production—
Speaker 2
Real production is usually more complicated.
Calvin Hendryx-Parker
Right. And so what's nice about these two frameworks, FastAPI and the Django framework on Ninja, is you're typically going to be building a container. And as you get into any kind of scale, you're using some kind of container orchestration. I think we both prefer—
Speaker 2
Kubernetes.
Calvin Hendryx-Parker
Kubernetes. But it may not be the popular choice yet for your organization, though maybe it should be.
Speaker 2
Yeah. I mean, it's overkill for a lot of projects, but it is becoming kind of the lingua franca of ops these days. It's often easier to ride that wave than it is to try to swim against it and do your own thing in a different way. I don't know for sure that Kubernetes is going to be something I'm using in five years, but I know whatever I'm using in five years is probably very much shaped like Kubernetes. There may be an alternative that comes out that is better in some ways, but it's going to be very similar.
Calvin Hendryx-Parker
But each of the hypervisors, like Amazon and Google, have—I mean, I think Amazon has at least 19 different ways to run containers. And you can deploy Kubernetes and use the same thing across all of your providers. So I would urge folks to check that out, unless you are so heavily locked into the Amazon ecosystem and that really matters to you. I don't like the feeling, but even as an AWS person from time to time, I still recommend folks evaluate what makes the most sense for them. And in this case, being able to deploy those containers and have a system that makes sure they stay alive and rolls out your changes for you sounds like Kubernetes.
Speaker 2
And, to be clear, the deployment here doesn't really change if it's FastAPI or Django or Go or Rust, right? You're going to have something shaped like this layout here. You're going to have multiple web servers, some sort of primary data store, some sort of database, some sort of cache. It's going to look very similar. It's just going to be different code in those containers.
Calvin Hendryx-Parker
Yeah. Well, and then there are things also on the bottom here, like migrations, for example, having tasks that handle migrations, observability, and secrets. A lot of this benefit comes from adopting an orchestration platform like Kubernetes because you can bake those in. So they all just happen, and no one has to think about them or push a button to make them happen.
Speaker 2
And it also makes it easier to be cross-cloud or multi-cloud. Yeah. For example, if I build a tool that works the way I want it to work with Kubernetes, it works the same in AWS, Google, DigitalOcean, or Linode, right? Obviously, if your team already knows Django, I don't see any reason why you would use anything else. When you're adding an API to an existing project, it's much easier to just use something like Ninja or DRF than it is to duplicate all of your business logic in another framework.
Calvin Hendryx-Parker
Pretty solid advice. It's hard to beat the batteries that are built into Django. So when we lean toward FastAPI, again, if you have a team that isn't familiar with either of these frameworks, maybe you've got a very simple, specific task, and you're only going to be building an API or many little APIs on top of this, FastAPI makes a lot of sense. Not only is it faster from a request or response standpoint, it's going to be smaller and more tightly focused on the implementation of these strictly API pieces. As soon as you need to add on a UI or an admin or some other major piece of functionality, that's when you might want to still consider the Django Ninja route. The other aspect is, again, the deploy routes are going to be very similar. There's lots of—
similarity and common ground between the two frameworks, and obviously we're using Python, which is a win for everybody involved. And I think our thing is, you can use both. If you've got a specific product, but you want to be able to have Django for that, there's nothing saying you can't actually put in a FastAPI piece on the site for very specialized workloads that would have actually just been simpler to code up that way.
Speaker 2
I have a client that recently debated Ninja versus FastAPI, and they went with FastAPI for a non-technical reason. They were worried that they were getting pigeonholed career-wise with Django, and they wanted to be able to realistically put FastAPI on their resume for the next job in case the next company they worked for was a FastAPI shop. It's not a reason I would have chosen it, but I can understand the logic, right?
Calvin Hendryx-Parker
No, I think that totally makes sense. But overall, adding the two together does add complexity, and complexity must earn its keep. There has to be true value to the organization to be able to use both these tools simultaneously. Don't just use both of them because they both look flashy and both seem to meet your needs. Truly evaluate whether both of them deserve to live in your environment. So again, it comes down to that first slide around context. Valuing your team's knowledge, understanding what the culture has been historically, and where you want the future to be may actually be how you determine which ones you pick.
Speaker 2
And then, for measuring your workload, one of the things that people look at when they see benchmarks of, say, Django REST framework versus FastAPI is they don't realize that the slowness there is not Django. It's the way DRF does serializers; it's just slower than Pydantic in Rust. Right. And so that's the bulk of the speed difference in a lot of situations. And people miss that for some inherent slowness in Django.
Calvin Hendryx-Parker
Yeah. And so make sure you can buy the batteries for leverage when you can use something like the activity stream piece right on top of Django without having to really move much of a finger to get that done. Big win there. But
Speaker 2
Yeah, then you should not be afraid of building your own code, obviously. You don't have to do everything with third-party apps, and it's perfectly reasonable to use something like FastAPI or something like Flask that is very kind of bare-bones when you have a bare-bones need and you want to make all those decisions. Hopefully, you've got good reasons that you're wanting to make those decisions. But that's only for you to know, obviously.
Calvin Hendryx-Parker
All right, Frank. Hopefully, no one ended up with too many black eyes.
Speaker 2
No, no, I'm good. I'm good. But we've left plenty of time for questions because we kind of assumed that this would generate a bunch of questions. So hopefully people have some questions.
Calvin Hendryx-Parker
We do have a mic runner here.
Speaker 3
Thank you for that. I just have to ask about Django Bolt. Have either of you played with that or have public thoughts to share?
Speaker 2
I have not gotten a chance to play with it, but I really want to.
Speaker 3
So for those who don't know, it's faster than FastAPI, Django rewritten in Rust and other things.
Speaker 2
Yeah.
Speaker 3
But
Calvin Hendryx-Parker
Does it matter that it's that much faster?
Speaker 2
I mean, fast is cool, but yeah, but yeah.
Speaker 3
Thank you both. That was great. My question is, given that FastAPI has an order of magnitude more downloads on PyPI, what would each of you like to see Django do differently from a marketing perspective to try to gain some ground back, given that, you know, it's kind of—it depends on which framework you should choose.
Speaker 2
So I think downloads are not a great measure, just like I don't think GitHub stars are a great measure, right? I don't think it's a bad measure. It's better than stars, probably. But you have to factor in that a lot of this comes down to how many projects have CI and automatic AI agents opening PRs and doing fresh downloads, right? I mean, that may be a third of Django's downloads, right? Who knows, right? It may be only 10% of FastAPI. Don't know, right? So I think it's an odd measurement, but I get why people use it. I forgot the last part of your question, I'm sorry. Oh, see, different from a marketing perspective. Yeah.
Calvin Hendryx-Parker
I think more talks like this need to be given at more conferences so people will recognize that Django Ninja is a very solid choice, and you get all the benefits that we've had of a long history, but yet we are still modern. It is still very much a framework for the current times that can do async, can handle the loads and the speeds that would satisfy 99.99% of most people's needs. And I don't think enough gets said about that at other conferences. I mean, obviously, we're in a very friendly room here, but I think that needs to be said in other places.
Speaker 2
Yeah, I mean, everybody hopes that they're going to be the next unicorn and that they get billions of dollars of funding and have a huge scalability problem, but they're, you know, it's like getting into pro sports. It's probably not going to happen to us, right?
Calvin Hendryx-Parker
But we do have a Django pony.
Speaker 2
We do have a pony. We have a pony. We got that going first. Actually, one of the things is seeing things like in Sarah's talk before, showing that pull requests are going up to Django, right? Some of that may be AI helping, but Django's still there. It's still moving. It's actually moving faster over the last few years than it has. So I think some people have this opinion that it is dying. But no, it's just boring, right? It's boring because it's good.
Calvin Hendryx-Parker
And then that helps a lot of teams with not having a lot of chaos in their projects, is that you want to use those boring tokens. And you only get, what, one exciting token of a new thing you can bring into a project? And that's kind of the rule that most folks forget about when they go after all the shiny.
Speaker 4
Thanks for the talk. In the conclusion, you say that if the team already uses Django, there is no reason to change, or if you want to start from scratch, FastAPI can be a simpler solution. This has been something that I heard for a long time, also about Django and Flask, for example. It's very common. But actually, what I saw is quite the opposite, in the sense that if you are starting from scratch, what I said also having some Django Girls or other workshop with newcomers is that if you want to start from scratch in a simple project that involves the web page, login
at the admin and the database, starting with FastAPI or
Calvin Hendryx-Parker
That's harder, I think.
Speaker 4
It's harder. I
Calvin Hendryx-Parker
I agree with that.
Speaker 4
So if you want a simpler start, maybe Django already gives you the answer you need if you want to do basic things, which is storing your data and showing it on the website. So maybe we have to promote better the fact that it is not true that starting with a simpler tool is simple, but quite the opposite. If you want to start and you don't know how to search for an ORM for FastAPI, it can be a hard task. And maybe we can promote this better.
Calvin Hendryx-Parker
Yeah, I think the opinions Django brings to the table are definitely way stronger for exactly that use case. I like FastAPI's unopinionated piece because I do have opinions about the other pieces I bring along. Like I want to use SQL Alchemy, for example, or I'm in a specific situation where I'm deploying into Cloudflare workers and I need something ultra like slim to deploy because there's just constraints in that environment. I can't bring more than what is it, five megabytes to the containers that I'm going to run at those various edges. I've got like other kind of weird opinions that draw me toward using FastAPI for specific pieces like that. I think for the newcomers, you're right. I mean I would hate to have to like go make decisions about how do I do temp what templing engine do I pick and how do I wire it in and how do I like
Wire up the right ORM. I think those are hard and shouldn't be approached by beginners until they've gotten their feet wet with a tool that makes those decisions for you.
Speaker 2
And I think one of the things that's different is that I think some people, when they say this is simpler, they don't mean for new users; they mean for very experienced developers, this is simpler. So FastAPI or Flask is easier for somebody like people in this room to quickly spin up something that talks to just Redis. Whereas, if you use Django startproject, you have to figure out, how do I turn off the database? Right? So that's not simpler in that case, right? I have to do a bunch of work to just talk to Redis and not a database, right? We're assuming there's a SQL database in the mix, right? So for somebody who's very experienced, it's like, okay, here's fewer steps. I don't have to turn off a bunch of stuff to use Django. But for a newcomer, you're absolutely right.
It's harder to get going with that initial project in something that's not Django.
Calvin Hendryx-Parker
And we should all agree that we should strike the words simple and easy from our vocabulary when talking to folks about these kinds of things.
Speaker 2
You're absolutely right.
Calvin Hendryx-Parker
Wait a minute. Am I talking to Claude? What's going on here? We still have time for questions.
Speaker 2
Surprised no one's asked me about G event yet.
Calvin Hendryx-Parker
Maybe no one has that much performance problem.
Speaker 2
They don't care. Yeah.
Calvin Hendryx-Parker
It's all right. Well, with that all said, thank you all for being out here. I mean, Frank and I are obviously around for the whole presentation or conference.