↓ Skip to main content

#python

41 posts

Posts

  1. Apache Kafka Event Streaming with KRaft and Python

    Event streaming on Kafka 4 without ZooKeeper (KRaft): partition sizing, a no-loss producer, offset commits and rebalance tuning, with confluent-kafka in Python.

    8 min read Backend

  2. gRPC High-Performance APIs with Python asyncio

    Service-to-service APIs with gRPC and Protobuf: grpcio asyncio server and client, streaming, deadlines, interceptors, schema evolution, HTTP/2 load balancing.

    7 min read Backend

  3. Advanced pytest: Fixtures, Mocking and Hypothesis

    Advanced testing with pytest 8: fixture scopes, parametrize, mocking with mocker and respx, async tests, Hypothesis property tests, snapshots and CI settings.

    8 min read Python

  4. Real-Time WebSockets with FastAPI and Redis

    Build a FastAPI WebSocket server, scale it across instances with Redis Pub/Sub, and handle pings, auth, Nginx proxying and client reconnects with backoff.

    7 min read Backend

  5. Elasticsearch Full-Text Search in Production

    Full-text search with Elasticsearch 8/9 and the Python client: strict mappings, language analyzers, zero-downtime reindexing with aliases, shards, pagination.

    8 min read Backend

  6. Python Image Processing: Pillow or OpenCV?

    Image processing in Python with Pillow 11+ and OpenCV 4.x: safe uploads, EXIF rotation, WebP, headless OpenCV in Docker and a background processing pipeline.

    8 min read Python

  7. Python Logging Best Practices with structlog

    Python logging best practices: stdlib logging rules, JSON logs with structlog, request IDs, redacting secrets, OpenTelemetry trace IDs, common mistakes.

    7 min read Python

  8. Celery vs Arq: Async Task Queues in Python

    Celery vs Arq for Python task queues: safe Celery settings, an async Arq worker, idempotency, visibility timeouts, retries and Arq's maintenance mode.

    8 min read Backend

  9. Building a Reliable Webhook Handler in Python

    A reliable webhook handler in Python and FastAPI: HMAC signature checks, replay protection, a durable inbox table, idempotent processing and event fan-out.

    8 min read Backend

  10. Redis Caching and Session Management in Python

    Redis caching and session management with redis-py asyncio: cache-aside with stampede protection, server-side sessions, Streams, locks and eviction policies.

    8 min read Backend