skillfed

types-olefile

Typing stubs for olefile

types-olefile v0.47.0.20260508 135.2K downloads/30d#11,448 on PyPI37
Permissive license Apache-2.0 Active released

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 on this page — 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

types-olefile on PyPI

pip

pip install types-olefile

uv

uv add types-olefile

poetry

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 the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 98 days since the last release
Last repo commit
First released
Downloads 135,208/month — #11,448 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: types_olefile-0.47.0.20260508-py3-none-any.whl

Programming Language :: Python :: 3Typing :: Stubs Only

Tags

type stubs olefileolefile type hintsmypy olefile annotationspyright olefile typesole file format typing
type-stubsstatic-analysis

More Software Development packages