use pyo3::prelude::*;
use pyo3::wrap_pyfunction;
mod types;
mod functions;
mod errors;
use types::PyExtractionResult;
use functions::{extract_from_path, extract_from_bytes, supported_mime_types, is_mime_supported};
#[pymodule]
fn _omniparse(m: &Bound<'_, PyModule>) -> PyResult<()> {
m.add_function(wrap_pyfunction!(extract_from_path, m)?)?;
m.add_function(wrap_pyfunction!(extract_from_bytes, m)?)?;
m.add_function(wrap_pyfunction!(supported_mime_types, m)?)?;
m.add_function(wrap_pyfunction!(is_mime_supported, m)?)?;
m.add_class::<PyExtractionResult>()?;
Ok(())
}