TIL: MontyDB - MongoDB Implemented in Python

Today I learned about MontyDB, a pure Python implementation of MongoDB that can run in-memory or with file storage, perfect for testing and lightweight applications.

June 4, 2021 路 1 min

TIL: Gary Bernhardt's 'It's Fine' Talk, pstrings for Process Memory, and pytest Collection Techniques

Today I learned about Gary Bernhardt's humorous take on software development culture, the pstrings tool for examining process memory strings, and pytest's powerful test collection and filtering capabilities.

January 30, 2021 路 6 min

TIL: Dash Application Testing and Pi-hole DNS Architecture

Today I learned about testing Dash applications with pytest and selenium, implementing Flask-Dash integration patterns, and understanding Pi-hole's FTL engine based on dnsmasq.

July 24, 2020 路 22 min

TIL: Dash Memoization, Flask-Dash Integration, and Testing

TIL 2020-07-23 Memoizing Dash Callback Responses with Flask-Caching - It鈥檚 possible to cache dash callback responses for better performance using flask-caching. Configurable Dash Registration - Always ensure that dash registration in a Flask-Dash app is configurable. You might want to skip loading dash when testing backend-only functionality. pytest-dash Status - pytest-dash has been abandoned since the official dash repository now supports Selenium testing via pytest directly.

July 23, 2020 路 1 min

TIL: Dash Testing, Docker Compose, and Python Mocking

Web Development and Testing Dash Framework Testing It is possible to memoize dash callback responses with flask-caching Dash supports response caching to improve performance Flask-caching integration allows for sophisticated caching strategies Important for optimizing callback-heavy Dash applications Flask-Dash Integration Best Practices Always ensure that dash registration in a Flask-Dash app is configurable Might want to not load dash when testing backend only Separation of concerns between backend API and frontend visualization Enables more targeted testing strategies Testing and Mocking Python Mock Module Best Practices When mocking python functions in a flask test, ensure you reference the module where the function is called, not where it originates from Common pitfall: mocking at the wrong import level Mock at the point of use, not the point of definition Critical for effective unit testing in complex applications Infrastructure and Networking Docker Compose Development Insights docker-compose has no docstrings Interesting observation about code documentation practices Even popular tools can have documentation gaps Reminder of the importance of good code documentation DNS and Network Tools Pi-hole Architecture pihole鈥檚 Faster than light engine is a fork of dnsmasq Built on proven DNS server technology Optimized for ad-blocking and DNS filtering Demonstrates how open source projects build on each other Command Line Tools argparse does support sub-commands Python鈥檚 built-in argument parsing library is more capable than often realized Enables building complex CLI interfaces with nested commands Alternative to third-party libraries like Click for simpler use cases

July 23, 2020 路 2 min

TIL: Python Code Quality and Development Tools Deep Dive

Today I learned about advanced Python code quality tools, CPython internals resources, and modern development practices from my archive of learning notes.

July 18, 2020 路 6 min