--- id: ome-types version: "0.6.3" license: MIT license_treatment: permissive maintenance: aging --- # ome-types — Python dataclasses for the OME data model License: permissive · Maintenance: aging · Downloads: 178.5K/mo ## What it is and what it does ome-types is a pure-Python library that converts OME-XML microscopy metadata into fully-typed Python dataclasses and back again. It parses OME-XML files or extracts metadata from OME-TIFF images into an object model where all OME concepts (Image, Plate, Pixels, Channel, etc.) are accessible as snake_case attributes on Python objects. You can then read, modify, or construct new metadata programmatically and serialize it back to valid OME-XML. The library depends on pydantic, pydantic-core, pydantic-extra-types, and xsdata for schema validation and XML handling. It does not require a Java virtual machine, making it lightweight for Python-native workflows. Most of the model code is generated at install time from the OME schema, ensuring consistency with the OME-2016-06 specification. Use it for: - Extract and inspect microscopy acquisition metadata from OME-TIFF files in Python without external tools. - Programmatically modify OME metadata (e.g., update physical pixel sizes, add instrument details) and write back to OME-XML. - Validate OME-XML documents against the OME schema and convert between XML and Python object representations. - Build OME-compliant metadata from scratch by constructing Instrument, Microscope, Objective, and Image objects. - Integrate OME metadata handling into scientific image processing pipelines written in Python. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Parse and manipulate OME-XML microscopy metadata as fully-typed Python objects, and serialize them back to valid OME-XML format without requiring a Java runtime. Yes, if you work with OME-XML or OME-TIFF microscopy data in Python. The library is stable, has no known vulnerabilities, and low install friction. The aging maintenance status (261 days since last release) is a minor concern for long-term schema compatibility, but the package remains functional and the repository is not archived. Install with optional dependencies (lxml, pint) only if you need XML validation or unit quantity support. ## Install pip install ome-types uv add ome-types poetry add ome-types ## Installing ome-types Before you install: Low install friction with a pure-Python wheel. Maintenance status is aging—last release was 261 days ago and the repository shows minimal activity (1 star), though it remains actively maintained with a recent commit on 2026-02-12. License in practice: MIT license is permissive, allowing commercial and private use with minimal restrictions; attribution is required but no copyleft obligations apply. Quickstart: pip install ome-types from ome_types import from_xml ome = from_xml('path/to/file.ome.xml') print(ome.images[0].pixels.physical_size_x) Requires Python 3.9 or later. Optional dependencies (lxml, pint, xmlschema) needed for XML validation or unit quantity properties. Verify before relying: - Whether the aging maintenance status (261 days since release) poses risk for long-term compatibility with evolving OME schema versions. - Performance characteristics when parsing large or deeply nested OME-XML documents. - Completeness of OME-2016-06 schema coverage and support for newer OME schema versions. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 178.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags ome-xml parsing python, microscopy metadata dataclasses, ome data model types, ome-tiff metadata extraction, xml to python objects microscopy, microscopy-metadata, ome-xml, schema-validation [View on SkillFed](https://skillfed.io/packages/ome-types) · [View on PyPI](https://pypi.org/project/ome-types/)