Metadata-Version: 2.4
Name: ome-metadata
Version: 0.3.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
License-File: LICENSE
Summary: Ome metadata as a rust/python structure.
Keywords: bioformats,imread,ome,metadata
Home-Page: https://github.com/wimpomp/ome-metadata
Author: Wim Pomp <w.pomp@nki.nl>
Author-email: Wim Pomp <w.pomp@nki.nl>
License: MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Repository, https://github.com/wimpomp/ome-metadata

# ome-metadata

Open Microscopy XML metadata (https://www.openmicroscopy.org/Schemas/) as a collection of Rust structs and enums, with translation to Python.

## Rust
``` 
use std::fs::read_to_string;
use ome_metadata::Ome;

let xml = read_to_string($file)?;
let ome: Ome = xml.parse()?;
let image = &ome.image.unwrap()[0];
println!("acquisition date: {:#?}", image.acquisition_date);
```

## Python
```
from ome_metadata import Ome

with open($file) as f:
    xml = f.read()
ome = Ome.from_xml(xml)
image = ome.image[0]
print(f"acquisition date: {image.acquisition_date}")
```
