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