skillfed

ome-types

Python dataclasses for the OME data model

ome-types v0.6.3 178.5K downloads/30d#10,190 on PyPI1
Permissive license MIT AGING released

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

ome-types on PyPI

pip

pip install ome-types

uv

uv add ome-types

poetry

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 the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 4 — pydantic-core, pydantic-extra-types, pydantic, xsdata
Maintenance aging — 261 days since the last release
Last repo commit
First released
Downloads 178,508/month — #10,190 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: ome_types-0.6.3-py3-none-any.whl

Keywords: microscopy, ome, ome-model, schema, types

Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9

Tags

ome-xml parsing pythonmicroscopy metadata dataclassesome data model typesome-tiff metadata extractionxml to python objects microscopy
microscopy-metadataome-xmlschema-validation

More Information Analysis packages