It was noticed on a django site that made use of django.contrib.admin that page loads were getting slow. Lots of data had been added (about 77MB worth, tables with more than 10000 records and up as well as a number of joins). A great tool for these situations is a profiler. Django-debug-bar is a easy […]
Python ModuleNotFoundError
One of the classic problems when running a python script that imports another module is not being able to find the module. ModuleNotFoundError: No module named ‘xxx’ There are 2 fundamentals to remember. A python module is – simply – a file A Python package is a folder containing a __init__.py file. A folder of […]
Hiding info from customers, Paying for Nothing, Bad after sales service and Use of Plugs as Permanent Bikemarket sell so called ready-to-ride second hand bikes. They buy bikes from the public, service them based on what they deem a quality service and then sell them back to the public. They also sell new Signal bikes. […]
To check the response time of a python httpx request, use the response.elapsed attribute. import httpx client = httpx.Client() response = client.get(‘https://stoicquotesapi.com/v1/api/quotes/random’) print(response.elapsed.total_seconds()) This will print out the response time: 1.334806 Again: response.elapsed.total_seconds())
When working with python a ImportError or ModuleNotFoundError: No module named 'xxx' may arise. This error usually means that the script or python file you are running does not know about a module you are importing. How can we get a list of modules that are accessible? Using Sys Modules This gets all package modules […]