FastAPI framework, high performance, easy to learn, fast to code, ready for production
We went all in on FastAPI with my team, but we're hit the issue that the projects of Tiangolo (FastAPI, SQLModel, Typer) seem to be turning pretty much unmaintained : https://github.com/tiangolo/fastapi/discussions/3970
We've already been hit by multiple bugs with fixing PR opened, but left to rot, and missing documentation : the 'tutorial' documentation is great, but if you want a reference you have to go read the code.
I guess that's the issue when you pick projects maintained by one person, so for my next projects I might get back to something built on stronger grounds, like Django.
How is Django this day with modern Python constructs like typing in general and Pydantic models integration ?
💨 Fast, Async-ready, Openapi, type hints based framework for building APIs
Check out Django Ninja: https://django-ninja.rest-framework.com/
It's like a FastAPI inspired Django Rest Framework. In comparison to DRF it feels very lightweight and modern, but it's still Django underneath so you get to keep the ORM, admin, etc.
Speaking of the ORM, once Django's is async Ninja will really be amazing.
Learn any GitHub repo in 59 seconds. Onboard AI learns any GitHub repo in minutes and lets you chat with it to locate functionality, understand different parts, and generate new code. Use it for free at www.getonboard.dev.
Python packaging and dependency management made easy
I can't recommend using Poetry in production - I've had massive headaches with it due to https://github.com/python-poetry/poetry/issues/697
Basically if you have two dependencies that depend on the same package, but depend on different versions or non-overlapping ranges of versions, Poetry's only solution is "tell the maintainers of your dependencies to update their pyproject.toml" - building your package will just fail, with no workaround other than to fork the dependencies and update pyproject.toml yourself. Yes, in principle that sounds like the right way to resolve it, but in practice there are lots of Python packages with overly narrow dependency version ranges (or that are pinned to a single version), the maintainers understandably aren't always that responsive, and forking all your dependencies isn't a great solution.
Della is a Django app for managing Secret Santa/Gift Exchange.
I recently upgraded  one of my project  to Django v4, from Django v1. The changes from Django 3 to 4 were fairly simple, just one line change in my case. The change log is extremely detailed, it was easy to upgrade.
Python composable command line interface toolkit
Typer, build great CLIs. Easy to code. Based on Python type hints.
A production ready example Django app that's using Docker and Docker Compose.
If anyone is interested I updated my example Docker Django app to use Django 4.0 at: https://github.com/nickjj/docker-django-example
It pulls together Django, Docker Compose, Postgres, Redis, Celery, Webpack and TailwindCSS. It's all set up for both development and production. It's also been updated to use Django 4's new built in Redis cache back-end instead of the Django-Redis package.
Collect and Analyze Billions of Data Points in Real Time. Manage all types of time series data in a single, purpose-built database. Run at any scale in any environment in the cloud, on-premises, or at the edge.
Code for the book Django for Startups
> function based views
Class-based views, in their most basic form, are a lot easier to read. E.g. look at the DRF CBVs I have here:
If you can avoid Generic CBVs (things like ListView) and inheritance, then the only difference between FBVs and CBVs is that CBVs make it easier to see what's a GET / PUT / POST / DELETE.
Explicit control over database query execution in Django applications
> Making it more clear when you’re going to hit the database (explicit is better than implicit).
You might like https://github.com/dabapps/django-zen-queries
Gives you fine grain control about database queries
Bringing Async Capabilities to django ORM
Distributed Task Queue (development branch)
Ideally try to avoid using Celery at all. It's the most consistently buggy, poorly documented, worst quality major Python project I have used so far.
Here is a fresh example: they deprecated CELERY_ prefixes in Django settings for some reason, which makes zero sense . But because it's Celery, they only warn on a few properties but not others, and the tool they ship inexplicably renamed completely unrelated settings for me . And yes, apparently the new way doesn't work either .
It's very characteristic of what I've seen from Celery over the last few years of working with it. If you are doing anything greenfield, it's best to avoid it altogether.
Things I've learned about building CLI tools in Python
16 projects | news.ycombinator.com | 24 Oct 2023
Does anyone know of a GUI that can be used to run a python script and see the output?
6 projects | /r/learnpython | 27 Oct 2022
[D] Software engineers building apps with ML features
5 projects | /r/MachineLearning | 24 Feb 2022
Recommended library for an interactive CLI?
3 projects | /r/learnpython | 10 Feb 2022
I made this CLI tool to automate my daily life
2 projects | /r/Python | 4 Feb 2022