Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
openapi-generator
OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
cookiecutter-django
Cookiecutter Django is a framework for jumpstarting production-ready Django projects quickly.
If anyone's looking something close to FastAPI but for Django, checkout django-ninja [1][2]. I recently joined a team that uses it, and it's pretty nice so far.
[1] https://django-ninja.rest-framework.com/
[2] https://github.com/vitalik/django-ninja
The API is being worked on: https://github.com/django/django/pull/14843
I'm talking entirely out of my rear end, but I'm curious if there is any validity to some of these projects that let you run pythonic code in the browser, either through Webassembly or brpython. For example, this projects https://github.com/stefanhoelzl/vue.py claims to let you write Vue.js in Python in the browser, which then gets turned into regular Vue.js components. I imagine a performance penalty, but a developer performance benefit of allowing something else to run on top and make a more composable experience.
Or is this barking up the wrong tree entirely?
Interesting, those results are the opposite of the techempower frameworks, which find that the async frameworks are always faster: https://www.techempower.com/benchmarks/#section=data-r20&hw=.... Though in general I'm not sure about the value of bringing async to Django. If you want more performance, you can already either throw more machines at it, or isolate some part in a service that can be written with FastAPI/Go/something. Async in general makes the code more complex and harder to write, which seems to be the opposite of what Django is for.
Have you tried https://pebbletemplates.io/ for Java?
I haven't used it extensively, so I can't speak how it compares to Django in larger setups.
You can also just generate an Open API spec and use something like [openapi-generatore](https://github.com/OpenAPITools/openapi-generator) to produce typed client code for data fetching.
I took that approach on my latest Flask project and it’s gone quite swimmingly. The problem I ran into was that a lot of the ecosystem, and therefore documentation, blog posts, helper libraries, etc., are all written under the assumption that you’re using an ORM. It took a while to figure out how to work around that, but once I did, I was home clear.
I also used a helper library to automatically map namespaced .sql files onto python functions with various return types, which made the development process way more elegant: https://nackjicholson.github.io/aiosql/. Absolute game changer if you plan to go this route - can’t recommend it highly enough.
https://github.com/cookiecutter/cookiecutter-django/
Select yes when asked if you want "custom_bootstrap_compilation"
That will configure a gulp task runner that is capable of manage your javascript dependencies, bundle your CSS/JS, and minify your HTML, CSS, JS and images. You will still need to install npm etc. as described here. You will also need to become familiar with how to install and update Node packages.