--- id: types-olefile version: "0.47.0.20260508" license: Apache-2.0 license_treatment: permissive maintenance: active --- # types-olefile — Typing stubs for olefile License: permissive · Maintenance: active · Downloads: 135.2K/mo ## What it is and what it does types-olefile is a type stub package that provides static type information for the olefile library, which handles OLE compound document files (used by older Microsoft Office formats, email attachments, and other binary container formats). It is part of the typeshed project and allows type checkers like mypy and pyright to understand the types and signatures of olefile's API, catching type errors during development rather than at runtime. The package contains no executable code—only type annotations (.pyi files)—and has no runtime dependencies. It is tested against olefile 0.47.x and validated with mypy 1.20.0 and pyright 1.1.408. Installation is optional but recommended for projects that use olefile and want static type checking. Use it for: - Enable mypy or pyright to type-check code that calls olefile functions for parsing OLE documents. - Catch type mismatches early in development when working with OLE file metadata or stream extraction. - Provide IDE autocomplete and inline documentation for olefile methods in editors that support type stubs. - Validate that code correctly handles olefile's return types and exceptions before runtime. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides type annotations for the olefile package, enabling type checkers like mypy and pyright to validate code that reads and manipulates OLE (Object Linking and Embedding) files. Yes, if you use olefile and want static type checking. It has no runtime cost, low install friction, and is actively maintained as part of typeshed. Install it alongside olefile in projects that enforce type safety; skip it only if you do not use a type checker or do not use olefile. ## Install pip install types-olefile uv add types-olefile poetry add types-olefile ## Installing types-olefile Before you install: Low install friction; a pure-Python stub package with no runtime dependencies. Actively maintained as part of typeshed, with recent updates as of 2026-05-08. License in practice: Licensed under Apache-2.0 (permissive), allowing free use, modification, and distribution with minimal restrictions. Quickstart: pip install types-olefile import olefile ole = olefile.OleFileIO('document.doc') Requires Python 3.10 or later; olefile itself must be installed separately to use the types at runtime. Verify before relying: - Whether this stub package is automatically discovered by type checkers or requires explicit configuration. - Coverage completeness: what fraction of olefile's public API is annotated in this stub version. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 135.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags type stubs olefile, olefile type hints, mypy olefile annotations, pyright olefile types, ole file format typing, type-stubs, static-analysis [View on SkillFed](https://skillfed.io/packages/types-olefile) · [View on PyPI](https://pypi.org/project/types-olefile/)