API
- Verifying webhook origin via payload hash signing
- Return JSON error payload instead of HTML text in DRF
- Effortless API request caching with Python & Redis
AWS
Database
- Faster bulk_update in Django
- Recipes from Python SQLite docs
- Pick random values from an array in SQL(ite)
Django
- Debugging a containerized Django application in Jupyter Notebook
- Manipulating text with query expressions in Django
- Faster bulk_update in Django
- Save models with update_fields for better performance in Django
- Bulk operations in Django with process pool
- Return JSON error payload instead of HTML text in DRF
- Uniform error response in Django Rest Framework
Git
- When to use 'git pull --rebase'
- Distil git logs attached to a single file
- Write git commit messages properly
GitHub
- Auditing commit messages on GitHub
- Automerge Dependabot PRs on GitHub
- Github action template for Python based projects
Incident Post-mortem
Meta
Python
- Debugging a containerized Django application in Jupyter Notebook
- Manipulating text with query expressions in Django
- Using tqdm with concurrent.fututes in Python
- Faster bulk_update in Django
- Installing Python on macOS with asdf
- Save models with update_fields for better performance in Django
- Python logging quirks in AWS Lambda environment
- Dissecting an outage caused by eager-loading file content
- Verifying webhook origin via payload hash signing
- Recipes from Python SQLite docs
- Prefer urlsplit over urlparse to destructure URLs
- ExitStack in Python
- Compose multiple levels of fixtures in Pytest
- Patch where the object is used
- Partially assert callable arguments with 'unittest.mock.ANY'
- Apply constraints with 'assert' in Python
- Stream process a CSV file in Python
- Bulk operations in Django with process pool
- Read a CSV file from s3 without saving it to the disk
- Safer 'operator.itemgetter' in Python
- Guard clause and exhaustiveness checking
- Return JSON error payload instead of HTML text in DRF
- Decoupling producers and consumers of iterables with generators in Python
- Pre-allocated lists in Python
- Disallow large file download from URLs in Python
- Declaratively transform dataclass fields in Python
- Caching connection objects in Python
- How not to run a script in Python
- Mocking chained methods of datetime objects in Python
- Declarative payloads with TypedDict in Python
- Parametrized fixtures in Pytest
- Modify iterables while iterating in Python
- Github action template for Python based projects
- Self type in Python
- Patching test dependencies via Pytest fixture & unittest mock
- Narrowing types with TypeGuard in Python
- Why 'NoReturn' type exists in Python
- Add additional attributes to enum members in Python
- Peeking into the internals of Python's 'functools.wraps' decorator
- Limit concurrency with semaphore in Python asyncio
- Amphibian decorators in Python
- Go Rusty with exception handling in Python
- Variance of generic types in Python
- Create a sub dictionary with O(K) complexity in Python
- Gotchas of early-bound function argument defaults in Python
- Use 'assertIs' to check literal booleans in Python unittest
- Static typing Python decorators
- Inspect docstrings with Pydoc
- Check whether an integer is a power of two in Python
- Uniform error response in Django Rest Framework
- Difference between constrained 'TypeVar' and 'Union' in Python
- Don't wrap instance methods with 'functools.lru_cache' decorator in Python
- Cropping texts in Python with 'textwrap.shorten'
- String interning in Python
- Structural subtyping in Python
- Automatic attribute delegation in Python composition
- Access 'classmethod's like 'property' methods in Python
- Use '__init_subclass__' hook to validate subclasses in Python
- Running tqdm with Python multiprocessing
- Use daemon threads to test infinite while loops in Python
- Python's 'functools.partial' flattens nestings Automatically
- Pedantic configuration management with Pydantic
- Interfaces, mixins and building powerful custom data structures in Python
- Deciphering Python's metaclasses
- Implementing proxy pattern in Python
- Effortless API request caching with Python & Redis
- Untangling Python decorators
- Effortless concurrency with Python's concurrent.futures
- No really, Python's pathlib is great
- Running Python linters with pre-commit hooks
- Generic functions with Python's singledispatch
- The curious case of Python's context manager
- Reduce boilerplate code with Python's dataclasses
Shell
- Colon command in shell scripts
- To quote or not to quote
- Returning values from a shell function
- Distil git logs attached to a single file
- Health check a server with 'nohup $(cmd) &'
- Don't add extensions to shell executables
- Use 'command -v' over 'which' to find a program's executable
- Use curly braces while pasting shell commands
- Use strict mode while running bash scripts
SQL
Testing
- Compose multiple levels of fixtures in Pytest
- Patch where the object is used
- Partially assert callable arguments with 'unittest.mock.ANY'
- Mocking chained methods of datetime objects in Python
- Parametrized fixtures in Pytest
- Patching test dependencies via Pytest fixture & unittest mock
TIL
- Installing Python on macOS with asdf
- Save models with update_fields for better performance in Django
TypeScript
Typing
- Guard clause and exhaustiveness checking
- Declarative payloads with TypedDict in Python
- Self type in Python
- Narrowing types with TypeGuard in Python
- Why 'NoReturn' type exists in Python
- Variance of generic types in Python
- Static typing Python decorators
- Difference between constrained 'TypeVar' and 'Union' in Python
- Structural subtyping in Python