About 149 results
https://rednafi.com/python/pause-and-resume-a-socket-server/ · 5 Feb 2023
Build a pausable socket server with Python's socketserver module using threading for intermittent request handling and background tasks.
https://rednafi.com/python/django-and-jupyter-notebook/ · 14 Jan 2023
Connect Jupyter Notebook to Dockerized Django apps using ipykernel and django-extensions for interactive debugging and data exploration.
https://rednafi.com/python/manipulate-text-with-django-query-expression/ · 7 Jan 2023
Use Django query expressions like Replace, Upper, Lower, Concat, and Substr for efficient database-level text manipulation without fetching data.
https://rednafi.com/python/tqdm-progressbar-with-concurrent-futures/ · 6 Jan 2023
Display progress bars for concurrent Python tasks using tqdm with ThreadPoolExecutor and as_completed for real-time execution monitoring.
https://rednafi.com/python/faster-bulk-update-in-django/ · 30 Nov 2022
Accelerate Django bulk_update operations by 4x using multiprocessing to parallelize database writes across chunked record batches.
https://rednafi.com/python/install-python-with-asdf/ · 13 Nov 2022
Manage multiple Python versions on macOS using asdf, a unified version manager replacing pyenv, nvm, and language-specific tools.
https://rednafi.com/python/save-with-update-fields-in-django/ · 9 Nov 2022
Optimize Django model saves with update_fields parameter to generate leaner SQL queries and improve performance in tight update loops.
https://rednafi.com/python/logging-quirks-in-lambda-environment/ · 20 Oct 2022
Configure Python logging for AWS Lambda's pre-configured handlers while maintaining compatibility with local development environments.
https://rednafi.com/python/outage-caused-by-eager-loading-file/ · 14 Oct 2022
Learn from a production outage caused by loading large CSV files into memory. Stream process files to prevent OOM errors and crashes.
https://rednafi.com/python/verify-webhook-origin/ · 18 Sep 2022
Secure webhooks by verifying payload authenticity using HMAC hash signatures with shared secrets, preventing man-in-the-middle attacks.