--- id: odfpy version: "1.4.1" license: unclear license_treatment: unclear maintenance: active --- # odfpy — Python API and tools to manipulate OpenDocument files License: unclear · Maintenance: active · Downloads: 4.3M/mo ## What it is and what it does Odfpy is a Python library for reading and writing OpenDocument Format (ODF) files—the standard format used by LibreOffice, OpenOffice, and other office suites. It provides a complete API generated from the ODF RelaxNG schema and hand-edited to cover all valid ODF constructions. The library enforces document validity at the API level, raising exceptions when you attempt invalid operations such as adding unknown attributes, omitting required fields, or placing text in elements that forbid it. Beyond the core API, odfpy includes command-line tools for common tasks: converting CSV to ODF spreadsheets, transforming ODF documents to HTML or XHTML, extracting and modifying metadata, validating ODF files, and converting between ODF and XML representations. It has no external runtime dependencies, making it lightweight to deploy, though installation friction is high and the package has not seen a release since 2020-01-18 despite active repository commits. Use it for: - Generate ODF spreadsheets or text documents programmatically with built-in validation to catch structural errors before saving. - Convert CSV data into OpenDocument spreadsheet files using the csv2odf command-line tool. - Transform ODF documents to HTML or XHTML for web viewing or archival using odf2xhtml or odf2mht. - Inspect and modify ODF file metadata without opening the document in an office application. - Validate ODF files for structural correctness and report problems using the odflint tool. - Extract or manipulate user-defined fields in ODF documents via the odfuserfield command. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Odfpy reads and writes OpenDocument v. 1.2 files with validation to prevent invalid document construction, enforcing grammar rules, required attributes, and element content constraints. Yes, with conditions. Odfpy is stable, actively maintained at the repository level, and has no known vulnerabilities. It is suitable for production use if your target Python version falls within the documented range (2.7, 3.4–3.7) or you verify compatibility with newer versions. The high install friction and gap since the last release (2020-01-18) suggest caution: test thoroughly in your environment, and verify that the unclear license terms (Apache, GPL, LGPL) align with your project's requirements. ## Install pip install odfpy uv add odfpy poetry add odfpy ## Installing odfpy Before you install: Install friction is high; the package has no runtime dependencies but distribution artifacts suggest build complexity. Maintenance is active with recent commits (2026-04-07), though the latest release dates to 2020-01-18, leaving a gap between release and current repository state. License in practice: License treatment is unclear: the package declares Apache, GPL, and LGPL in its classifiers but provides no explicit license text or SPDX identifier in metadata. Users should verify the actual license terms before adopting. Quickstart: pip install odfpy import odfpy # Create and manipulate OpenDocument files programmatically # See https://github.com/eea/odfpy/wiki for documentation and examples Classifiers indicate support for Python 2.7 and 3.4–3.7; compatibility with modern Python versions is unspecified. Verify compatibility with your target Python version before use. Verify before relying: - Whether the package works reliably on Python versions beyond 3.7 (classifiers end at 3.7; last release was 2020-01-18) - Current state of the command-line tools (csv2odf, odf2xhtml, odflint, etc.) and whether they are fully functional - Whether high install friction reflects missing build dependencies or outdated packaging ## Package facts - License: not declared (unclear) - Python support: unspecified - Install friction: high - Maintenance: active - Downloads: 4.3M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags opendocument file manipulation, odf read write library, odf validation, spreadsheet document conversion, odf to html conversion, document metadata editing, odf command line tools, document-format, office-automation, cli-tools [View on SkillFed](https://skillfed.io/packages/odfpy) · [View on PyPI](https://pypi.org/project/odfpy/)