Overview

Litestar 2.14, released on February 12, 2025, adds streaming multipart and Valkey (Redis fork) support.

Main Features

Streaming multipart and Valkey

Streaming multipart allows processing large file uploads without loading everything into memory. Valkey support provides a Redis alternative for caching and sessions.

python
from litestar import Litestar, post
from litestar.datastructures import UploadFile

@post('/upload')
async def upload(data: UploadFile) -> dict:
    # Streaming: file is not loaded into memory
    content = await data.read()
    return {'size': len(content), 'name': data.filename}

Sources