Skip to main content

Ome metadata as a rust/python structure.

Project description

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}")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ome_metadata-0.2.0.tar.gz (55.0 kB view details)

Uploaded Source

File details

Details for the file ome_metadata-0.2.0.tar.gz.

File metadata

  • Download URL: ome_metadata-0.2.0.tar.gz
  • Upload date:
  • Size: 55.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ome_metadata-0.2.0.tar.gz
Algorithm Hash digest
SHA256 26287587eff56beac07629aa262445af184ad20e49dbbbf84c5e23e4ac6d08d6
MD5 803a4d658dad48b37e75edf6da5a177d
BLAKE2b-256 b0245f4e2a4973d71f1967ee1ca72198377336233cee39d532a89f2b84132014

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page