Framework Integration
Drop chunk-engine into any web handler — the same three-step recipe across Python, JavaScript, and Rust frameworks.
chunk-engine is a plain library call with no services, no global state, and no warm-up. That makes web integration the same everywhere, in every language:
- Read the uploaded bytes from the request.
- Pass them with a
filenameso the engine can route by extension (a namedBlob/Filesupplies its own name). - Return the chunks — or stream them as they're produced.
Pick a mode per use case
Handlers below use the default mode for brevity. In practice pass
mode="semantic" for LLM/RAG ingestion or mode="section" for search
indexing — see Chunking Modes.
By language
Python
FastAPI, Flask, Django, Litestar, aiohttp, Celery.
JavaScript
Express, Fastify, Hono, Next.js, NestJS, SvelteKit — Node, Bun, Deno.
Rust
Axum, Actix Web, Rocket, Warp.
For streaming responses (forwarding chunks as NDJSON while the document is still parsing), see Streaming — each language page includes a streaming handler where the framework supports it.