How the StreamInfo Class Works in MarkItDown: Immutable Metadata Handling

The StreamInfo class is an immutable dataclass in MarkItDown that encapsulates file metadata—such as MIME type, extension, and source URL—allowing converters to track and update stream information without side effects through its copy_and_update method.

The StreamInfo class serves as the central metadata container throughout the microsoft/markitdown codebase. Defined in packages/markitdown/src/markitdown/_stream_info.py, this lightweight data structure travels with file-like streams as they pass through various converters, ensuring that critical file attributes remain available

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →