#streaming

28 snippets tagged with #streaming

typescriptadvanced

Multipart Upload Stream Handler

Handles multipart file uploads with streaming to disk without buffering the entire file in memory.

Best for: Large file uploads

#upload#streaming
typescriptintermediate

Server-Sent Events Handler

Express route that implements SSE for real-time server-to-client push notifications.

Best for: Live notifications

#sse#real-time
typescriptadvanced

JSON Stream Parser

Parses large JSON arrays from a readable stream without loading the entire file into memory.

Best for: Processing large log files

#streaming#json
typescriptadvanced

Streaming API Response

Stream long-running API responses using ReadableStream and TransformStream for real-time data delivery.

Best for: AI response streaming

#streaming#api
typescriptadvanced

Partial Prerendering with Suspense

Combine static shells with streamed dynamic content using React Suspense for instant page loads.

Best for: E-commerce product pages

#ppr#suspense
typescriptintermediate

Next.js Streaming with Suspense

Stream server components with Suspense boundaries for progressive page loading and better TTFB.

Best for: Progressive loading for data-heavy dashboards

#nextjs#streaming
typescriptintermediate

Streaming with Loading UI and Suspense

Use loading.tsx and React Suspense to stream UI progressively in Next.js App Router.

Best for: dashboards

#nextjs#streaming
typescriptadvanced

Streaming Response from Route Handler

Stream large responses from Next.js route handlers using ReadableStream for real-time data.

Best for: real-time updates

#nextjs#streaming
pythonintermediate

Generator Pipeline for Data Processing

Chain generators to build memory-efficient data processing pipelines for large files and streams.

Best for: Large file ETL

#generator#pipeline
typescriptintermediate

OpenAI Chat Completion with Streaming

Stream GPT responses token-by-token using the OpenAI SDK with async iteration.

Best for: chatbot UI

#openai#streaming
typescriptintermediate

Next.js AI Streaming Route Handler

Stream OpenAI responses from a Next.js App Router route handler using the Vercel AI SDK.

Best for: AI chatbot backend

#nextjs#openai
typescriptintermediate

Google Gemini API Integration

Call the Google Gemini API for text generation with streaming, safety settings, and system prompts.

Best for: Google AI-powered code generation

#gemini#google-ai
pythonbeginner

Stream LLM Chat Responses

Stream OpenAI chat completions token-by-token for real-time UI updates.

Best for: Chat UIs

#ai#streaming
typescriptintermediate

Ollama Local LLM Inference

Run local LLM inference using Ollama REST API with streaming and model management.

Best for: local development

#ai#ollama
pythonbeginner

Anthropic Streaming with Python

Stream Claude responses token by token using the Anthropic Python SDK with context manager.

Best for: streaming responses

#anthropic#claude
pythonadvanced

OpenAI Realtime API WebSocket

Connect to the OpenAI Realtime API via WebSocket for low-latency voice and text streaming.

Best for: voice AI

#openai#realtime
pythonbeginner

Local LLM with Ollama Python Client

Run local open-source models with Ollama and stream responses using the Python API.

Best for: local AI

#ollama#local-llm
pythonintermediate

OpenAI Streaming with SSE in FastAPI

Stream OpenAI responses as Server-Sent Events from a FastAPI endpoint.

Best for: streaming AI APIs

#openai#fastapi
pythonintermediate

LangChain Streaming Callback Handler

Capture LLM tokens as they stream using a custom callback handler for real-time UI updates.

Best for: streaming UI

#langchain#callbacks
pythonintermediate

HuggingFace Text Generation with Streaming

Run local text generation with HuggingFace models and stream output token-by-token to the console.

Best for: local LLM

#huggingface#text-generation
pythonadvanced

Stream OpenAI Responses with Tool Calls

Handle streaming responses that include tool calls by accumulating delta chunks from the OpenAI API.

Best for: streaming tool calls

#openai#streaming
pythonintermediate

Python Streaming Data Processing

Process streaming data with generators, windowed aggregation, and memory-efficient line-by-line reading.

Best for: Processing large event log files efficiently

#streaming#python
pythonadvanced

Kafka Consumer in Python — Stream Processing

Build a Kafka consumer in Python with offset management, error handling, and batch processing.

Best for: Real-time event processing from Kafka topics

#kafka#streaming
bashbeginner

Kafka Topic — Create and Manage with CLI

Create, describe, alter, and manage Kafka topics using the kafka-topics CLI with partitioning config.

Best for: Setting up Kafka topics for new data streams

#kafka#bash
pythonintermediate

Kafka Producer & Consumer in Python

Produce and consume JSON messages from Apache Kafka using the confluent-kafka Python client.

Best for: event streaming

#kafka#streaming
pythonadvanced

PySpark Structured Streaming from Kafka

Consume a Kafka topic in real-time with PySpark Structured Streaming and write to Parquet.

Best for: real-time ETL

#pyspark#kafka
scalaadvanced

Streaming with fs2

Build composable streaming pipelines with fs2: chunks, transformations, concurrency, and resource safety.

Best for: Streaming data processing

#scala#fs2
scalaadvanced

Spark Structured Streaming

Process real-time data with Spark Structured Streaming: sources, transformations, and sinks.

Best for: Real-time event processing

#scala#spark