Latest Senses

Sences tagged with "Python"

Published on Jan. 21, 2023 by haradhansharma / Python / Cythonized / Cython /
We demonstrate how to convert Python modules into Cythonized ones in this sense. Typically, when using Cython, only a few selected modules of the program are Cythonized. Examining a very basic Python module that we could put in `wsgi.py`. import os import sys if os.name != 'nt': path = '/home/usr/public_html' python_path = '/home/user/env/lib/python3.9/site-packages' sys.path.append(path) sys.path.append(python_path) os.environ['DJANGO_SETTINGS_MODULE…
293 views
Published on May 5, 2023 by haradhansharma / Python / django / ORM /
It is a Django's performance tuning guide using select_related and prefetch_related for Faster Queries Django is a popular web framework that provides a wide range of features to simplify the development of web applications. One of the most powerful features in Django is the ability to fetch related objects efficiently using select_related and prefetch_related. In this blog post, we'll take a closer look at these features and explore how they can help you optimize the perform…
222 views