Registry / data / odfdo
library3.22.8pypypi✓ verified 91d ago

A Python library to create, read, and manipulate OpenDocument Format (ODF) files (ODT, ODS, ODP). Version 3.22.6 supports Python >=3.10, <4. Active development, frequent releases.

pip install odfdo
INSTALL
IMPORT
SIG · ODFDO
O
odfdo
datapythonv3.22.8
Install
2.4s avg
Import
279ms
Disk
34MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v3.22.8 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.280s · 40.4MB
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 2.4s · import 0.278s · 41MB
34MB installed
● package 34MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Document
✓ from odfdo import Document
Top-level import works.
Paragraph
✓ from odfdo import Paragraph
Top-level import works.
ParagraphStyle
✓ from odfdo.style import ParagraphStyle
✗ from odfdo import Style
In v3.x, Style classes moved to submodule.
Element
✓ from odfdo.element import Element
✗ from odfdo import Element
Deprecated flat import, but still works (will be removed in future).

Creates a simple ODT file with a paragraph.

from odfdo import Document, Paragraph from odfdo.style import ParagraphStyle # Create a new text document doc = Document('text') body = doc.body # Add content body.append(Paragraph('Hello, ODF!')) # Save doc.save('hello.odt') print('Document created.')
Debug
Known issues
breakingIn version 3.x, many import paths changed from flat to nested (e.g., `from odfdo import Document` works, but `from odfdo.style import ParagraphStyle` is now required instead of `from odfdo import Style`).
fix
Use nested imports: `from odfdo.element import Element`, `from odfdo.style import ParagraphStyle`, etc.
affects: >=3.0.0 <4.0.0
deprecatedThe `from odfdo import Element` top-level import is deprecated as of v3.6. Prefer `from odfdo.element import Element`.
fix
Use `from odfdo.element import Element`.
affects: >=3.6.0
gotchaWhen creating a document, specifying the type as a string (e.g., 'text', 'spreadsheet', 'presentation') is required; omitting it or using wrong case raises `ValueError`.
fix
Use lowercase strings: 'text', 'spreadsheet', 'presentation'.
affects: all
gotchaThe `body` property returns a generic `Element`. To append content, use `body.append()` but ensure the appended element is a valid ODF element (e.g., Paragraph, Table).
fix
Always import and instantiate specific elements like `from odfdo import Paragraph`.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'odfdo'
Library not installed or installed for wrong Python environment.
fix
Run `pip install odfdo` in the correct environment (e.g., virtualenv).
ImportError: cannot import name 'Style' from 'odfdo'
In v3.x, Style was moved to `odfdo.style`.
fix
Use `from odfdo.style import ParagraphStyle` or `from odfdo.style import Style`.
AttributeError: 'Document' object has no attribute 'save'
Misspelled method `save`; correct is `save` (lowercase).
fix
Use `doc.save('filename.odt')`.
ValueError: Unknown document type 'Text'
Document type must be lowercase: 'text', 'spreadsheet', or 'presentation'.
fix
Use `Document('text')` instead of `Document('Text')`.
TypeError: 'odfdo.element.Element' object is not callable
Trying to call an Element instance as a function, likely misusing `body()` instead of `body.append()`.
fix
Use `body.append(...)` not `body(...)`.
Upgrade
Version history
3.22.8latest on PyPI · released May 8, 2026
Audit
Dependencies
lxmlrequiredXML parsing and serialization required for ODF manipulation.
Agent activity
15 hits · last 30 days
node
14
Anthropic
1
Resources
odfdo — pip install odfdo · libregistry