Categories
python

Python: Check how long a HTTPX Request took to run?

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())

Categories
python

Python: Print all modules and packages available on the python path

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 […]

Categories
python

A review of ____ Python Books

I like python. It is a great programming language with great conventions and a great community. It has been a close ally and friend over the years. There are many books out there that teach python or cover topics within python. Many of them are titled "____ Python" or "XXXX Python" or "Your word Here […]

Categories
mastodon

Uninstall mastodon

How to Uninstall Matodon completely from your server. I set up a mastodon server. The experience was not great and the platform is not great either. It is hard to troubleshoot – difficult to inspect if you are not familiar with ruby. It is difficult to find similar issues of the problems faced. It is […]

Categories
network-traffic-debugging

Traffic Interception Tools

Want to inspect your traffic on your personal computer of mobile device? A few tools you will find helpful for that task: mitmproxy – free and open source interactive HTTPS proxy Proxyman Questions Why can Proxyman see the headers or HTTPS traffic that it has not decrypted? As far as I know the whole packet […]