1#[cfg(feature = "python")]
25use crate::bindings::python;
26#[cfg(feature = "python")]
27use crate::exporters::Templates;
28#[cfg(feature = "python")]
29use pyo3::prelude::*;
30
31pub mod attribute;
32pub mod datamodel;
33pub mod error;
34pub mod exporters;
35pub mod object;
36pub mod option;
37pub mod pipeline;
38pub mod tree;
39pub mod validation;
40pub mod xmltype;
41
42pub mod prelude {
43 pub use crate::datamodel::DataModel;
44 pub use crate::exporters::Templates;
45 pub use crate::validation::Validator;
46}
47
48pub mod json {
49 pub mod export;
50 pub mod import;
51 pub mod schema;
52 pub mod validation;
53}
54
55pub mod jsonld {
56 pub mod export;
57 pub mod schema;
58}
59
60pub(crate) mod markdown {
61 pub mod frontmatter;
62 pub(crate) mod parser;
63 pub(crate) mod position;
64}
65
66#[cfg(feature = "openai")]
67pub mod llm {
68 pub mod extraction;
69 pub mod input;
70}
71
72pub mod bindings {
73 #[cfg(feature = "python")]
74 pub(crate) mod python;
75
76 #[cfg(feature = "wasm")]
77 pub(crate) mod wasm;
78}
79
80pub mod linkml {
81 pub mod export;
82 pub mod import;
83 pub mod schema;
84}
85
86#[cfg(feature = "python")]
87#[pymodule(name = "mdmodels_core")]
88fn mdmodels_core(m: &Bound<'_, PyModule>) -> PyResult<()> {
89 m.add("__version__", env!("CARGO_PKG_VERSION"))?;
90 m.add("__all__", ["DataModel", "Templates"])?;
91 m.add_class::<python::DataModel>()?;
92 m.add_class::<Templates>()?;
93 Ok(())
94}