MirahLabs Engineering Blog
Technical insights, tutorials, and architectures written by our design and backend engineers.
Scaling Python Flask Applications with PostgreSQL
Best practices for configuring database pools, write indexes, caching, and utilizing Docker deployment structures for Flask backends.
Python Performance Profiling: Finding and Fixing Bottlenecks
Before optimizing Python code, measure first. Learn how to use cProfile, py-spy, memory_profiler, and line_profiler to identify real bottlenecks—not the ones you assume.
Async Python with asyncio and aiohttp: Building High-Concurrency APIs
Python's asyncio enables non-blocking I/O that handles thousands of concurrent connections with a single thread. Learn async patterns, event loops, and building async REST APIs.
Redis Beyond Caching: Pub/Sub, Streams, Sorted Sets, and Distributed Locks
Redis is far more than an in-memory cache. Explore its lesser-known superpowers: Pub/Sub messaging, Redis Streams for event logs, sorted sets for leaderboards, and Redlock for distributed coordination.
Python Web Scraping at Scale: Scrapy, Playwright, and Proxy Rotation
Extract data from complex websites. Build high-concurrency crawlers using Scrapy and handle dynamic JavaScript rendering with Playwright integration.
Implementing OAuth 2.0 and OpenID Connect from Scratch in Flask
OAuth 2.0 and OIDC are the standards powering 'Sign in with Google/GitHub.' This guide explains the flows and implements a complete authorization code flow with PKCE in Flask.